From a308181834007667a13b2542f94725d8b859e8dc Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Fri, 17 May 2024 12:46:44 +0200 Subject: [PATCH] Add all systems effects scripts + translations --- .../{000699.log => 000703.log} | 0 packs/aides-de-jeu-fr/CURRENT | 2 +- packs/aides-de-jeu-fr/LOG | 14 +- packs/aides-de-jeu-fr/LOG.old | 14 +- .../{MANIFEST-000697 => MANIFEST-000701} | Bin 180 -> 180 bytes .../{000701.log => 000705.log} | 0 packs/antidotes-and-remedes/CURRENT | 2 +- packs/antidotes-and-remedes/LOG | 14 +- packs/antidotes-and-remedes/LOG.old | 14 +- .../{MANIFEST-000699 => MANIFEST-000703} | Bin 178 -> 178 bytes packs/apothicarium/{000699.log => 000703.log} | 0 packs/apothicarium/CURRENT | 2 +- packs/apothicarium/LOG | 14 +- packs/apothicarium/LOG.old | 14 +- .../{MANIFEST-000697 => MANIFEST-000701} | Bin 180 -> 180 bytes packs/dons-de-rhya/{000699.log => 000703.log} | 0 packs/dons-de-rhya/CURRENT | 2 +- packs/dons-de-rhya/LOG | 14 +- packs/dons-de-rhya/LOG.old | 14 +- .../{MANIFEST-000697 => MANIFEST-000701} | Bin 180 -> 180 bytes .../{000699.log => 000703.log} | 0 packs/plats-dauberges/CURRENT | 2 +- packs/plats-dauberges/LOG | 14 +- packs/plats-dauberges/LOG.old | 14 +- .../{MANIFEST-000697 => MANIFEST-000701} | Bin 229 -> 229 bytes .../{000342.log => 000346.log} | 0 packs/tables-des-traductions/CURRENT | 2 +- packs/tables-des-traductions/LOG | 16 +- packs/tables-des-traductions/LOG.old | 16 +- packs/tables-des-traductions/MANIFEST-000340 | Bin 143 -> 0 bytes packs/tables-des-traductions/MANIFEST-000344 | Bin 0 -> 143 bytes reference_scripts/00ZCnahnTGvzG9KA.js | 2 + reference_scripts/01VFjGVxkjb5P1ve.js | 1 + reference_scripts/03mJu59V4iByWlsO.js | 25 ++ reference_scripts/04bAiHISSW53w94Y.js | 1 + reference_scripts/06IaVCOC0RCJbxEf.js | 4 + reference_scripts/09sSpnW8z2zcVEdf.js | 5 + reference_scripts/0BP5l7bIkf744G1k.js | 1 + reference_scripts/0FNOq4J1AdPd2A0q.js | 1 + reference_scripts/0FWto1oEr3jbWggw.js | 22 ++ reference_scripts/0KG3HoTNoZhaINIj.js | 6 + reference_scripts/0LCQtsiK2aUfYRmD.js | 1 + reference_scripts/0R0QAr3D024kWPfo.js | 18 ++ reference_scripts/0Uly7OmkH0zqYbxQ.js | 21 ++ reference_scripts/0YKQGbsKdHSmYGE7.js | 9 + reference_scripts/0abwNjpzo3SbEOeO.js | 6 + reference_scripts/0e0UZT2FodOJDdgW.js | 3 + reference_scripts/0e7OkamNAaAk4Oit.js | 10 + reference_scripts/0iTLDgFHO9Rgc010.js | 1 + reference_scripts/0mrUnxzufYgsR0Ph.js | 7 + reference_scripts/0vaYwAlMWTmOBl8k.js | 7 + reference_scripts/0yyofYHeDRQlFliO.js | 1 + reference_scripts/11uCC0mK2uL783al.js | 6 + reference_scripts/16nCOByUaSFDym1V.js | 1 + reference_scripts/190PHSHKGaJ74wsR.js | 31 +++ reference_scripts/1A87vGLh2PXH0rG0.js | 1 + reference_scripts/1BT0MWM2cbhlEnrn.js | 40 ++++ reference_scripts/1E47r2ba6IGe8uFK.js | 1 + reference_scripts/1IodsW9ImamYoEYz.js | 1 + reference_scripts/1JwxZujbDcueLWBL.js | 2 + reference_scripts/1LDm3OB32skZe6Xv.js | 1 + reference_scripts/1MDOKny7IirJPoI6.js | 6 + reference_scripts/1OpT3CXs07XFWWCT.js | 1 + reference_scripts/1PQPxFjmRlulHHzo.js | 5 + reference_scripts/1UalUmNzjB4rp3SZ.js | 1 + reference_scripts/1ZArMNUI8qqH6zkX.js | 7 + reference_scripts/1ZrzpfVwPJHdwp23.js | 1 + reference_scripts/1exiWlVUHsXDLLAH.js | 1 + reference_scripts/1fQr1Dg7DX0vfz3r.js | 3 + reference_scripts/1kB2su7hLRYDhZ2H.js | 19 ++ reference_scripts/1l7Jz2ZHbAWko7Vm.js | 1 + reference_scripts/1mNkLj9JYNr3ofC6.js | 7 + reference_scripts/1wEjrgff7ASxKVmy.js | 2 + reference_scripts/1wKVvxRTHOyV4Qdv.js | 1 + reference_scripts/1wrPvP6lJwIAfmsl.js | 10 + reference_scripts/1yOvw74jzFfaI87b.js | 1 + reference_scripts/22bW97lkvCqisfHX.js | 1 + reference_scripts/23HgjCB1oecxANvA.js | 5 + reference_scripts/23vWiHUjxtRQ3Efz.js | 4 + reference_scripts/2AOo7KUyzMrgIlgM.js | 1 + reference_scripts/2AdSBXw7IwCiqawQ.js | 1 + reference_scripts/2Cw5j0iGAnFNegWr.js | 1 + reference_scripts/2GYAd4OC888oQFBp.js | 1 + reference_scripts/2NLINicPQWbuvp2n.js | 1 + reference_scripts/2OqLHRqEBEjBm2LW.js | 1 + reference_scripts/2Qi1hwLYhdE6v6Hs.js | 9 + reference_scripts/2VNnVrtktdGUqXEV.js | 9 + reference_scripts/2W9uMTT6iJhfQ044.js | 18 ++ reference_scripts/2WBq5gW780C6zfCp.js | 9 + reference_scripts/2WSN306tL4apjRtD.js | 4 + reference_scripts/2cKarG9ToyW2ptCd.js | 10 + reference_scripts/2hzDv8ROulOe1elK.js | 1 + reference_scripts/2mFNelLOAQ6iJsZl.js | 4 + reference_scripts/2miWWeRrEpq1beG4.js | 4 + reference_scripts/2p9IK6Y5Z4NQD6FY.js | 1 + reference_scripts/2rzxQlL7A9ujZ9uK.js | 6 + reference_scripts/2sDH6RvoOAR40oqH.js | 20 ++ reference_scripts/2vTVR0quRZQtjNfQ.js | 18 ++ reference_scripts/2wk0yrRPlPsdqr3L.js | 3 + reference_scripts/2yctEihGmdCfTTVx.js | 2 + reference_scripts/2zeP2nMSURjxrqYz.js | 6 + reference_scripts/33PWizq5F7pkKnQT.js | 4 + reference_scripts/33US8YRgaMqYu2We.js | 1 + reference_scripts/37UN17gb8suFeZIW.js | 1 + reference_scripts/3Cn2TlRahlm5LkSj.js | 1 + reference_scripts/3D5ImpMgpOTPucvv.js | 9 + reference_scripts/3IGO7xEjRjat937X.js | 7 + reference_scripts/3JEzEzF1SeYA9lsV.js | 44 ++++ reference_scripts/3LLiSgj6KGtgqcmo.js | 1 + reference_scripts/3R6Y4NpNTqPc83wh.js | 3 + reference_scripts/3TesBGh8HnlGuafu.js | 5 + reference_scripts/3Vbe6gdW8N0bIvXJ.js | 5 + reference_scripts/3aEzK0DehSHtVykd.js | 1 + reference_scripts/3eSaX0BeaUalNkEP.js | 1 + reference_scripts/3fdCQ3h3iVuhdDs9.js | 1 + reference_scripts/3hfMQkUKYI4rCuBy.js | 1 + reference_scripts/3jm0NoYpgB6ZuUSl.js | 1 + reference_scripts/3l7MQSa10Kve2K3P.js | 2 + reference_scripts/3plV9WFqs2prfAdp.js | 1 + reference_scripts/3sfD1nedXLzuYoXJ.js | 4 + reference_scripts/3tE8gFSl28EhCmo5.js | 2 + reference_scripts/454x3Q95pLvZm0Kx.js | 1 + reference_scripts/4FGKZk2f0xrmIDnp.js | 1 + reference_scripts/4HN98hMdQJxM35pA.js | 4 + reference_scripts/4JVIy5xtVwvadoqv.js | 1 + reference_scripts/4MQ7u4INxp51oyyR.js | 85 +++++++ reference_scripts/4QoxhoekgVeZcQA7.js | 3 + reference_scripts/4XrAeL2DitxE8OaK.js | 3 + reference_scripts/4cOZzUvu1nytcqNn.js | 1 + reference_scripts/4fnTKgl0HW9ZrWyJ.js | 10 + reference_scripts/4gkz3LR7CK1b8ulK.js | 1 + reference_scripts/4iuTz0uInAfMaoGl.js | 1 + reference_scripts/4pQW4WLyhjbZR85k.js | 7 + reference_scripts/4rTmV3TNxctUe0ly.js | 6 + reference_scripts/4rb7LfMq9CTnlrpn.js | 10 + reference_scripts/4rhxLzau7jZ4SDxg.js | 2 + reference_scripts/52kbfuWrOh6dsTtd.js | 2 + reference_scripts/52mwb33mGrQjq89B.js | 1 + reference_scripts/53HFDNuMnX1Aw1a4.js | 1 + reference_scripts/58rFc9HiBoX66J6p.js | 9 + reference_scripts/5DI6cHAg1LHo54Yv.js | 6 + reference_scripts/5Fe1ELaS6Gnvy0Cj.js | 1 + reference_scripts/5IoYTyedCMYwt3ys.js | 1 + reference_scripts/5JWC0l3JEpOsqbR9.js | 85 +++++++ reference_scripts/5JvKJZPcd6Hz5zvn.js | 85 +++++++ reference_scripts/5LdJCKfQem1AQK24.js | 6 + reference_scripts/5M6IgCUncCwyxHok.js | 35 +++ reference_scripts/5MxRDXzUBPfp2KKD.js | 1 + reference_scripts/5dR7Erj3nwsxLAV7.js | 85 +++++++ reference_scripts/5lc1eHIYQNpSRWip.js | 8 + reference_scripts/5o1XiceC4rutjMms.js | 1 + reference_scripts/5sI9iYh5j2nx2XyT.js | 1 + reference_scripts/62Ky6bC1EnTllSJA.js | 4 + reference_scripts/65o8pQj6oGNnXce6.js | 2 + reference_scripts/65xE9OV5sA1ZWT7j.js | 9 + reference_scripts/6Aqq4F4Xui923sc6.js | 12 + reference_scripts/6BmvV9c03FkfisnE.js | 20 ++ reference_scripts/6EXkbVTRBhKTEu81.js | 5 + reference_scripts/6Fe8M5MdklKS2olx.js | 1 + reference_scripts/6H6vNjzvMGl2ZqCR.js | 2 + reference_scripts/6JrUjs3g5x6bFnj3.js | 8 + reference_scripts/6MSodMuZ5xk2JJJ9.js | 4 + reference_scripts/6Mjy0jDqczA8BxhS.js | 1 + reference_scripts/6QZUX7ZrFxOzqI0b.js | 9 + reference_scripts/6U8xox4mBrn5eYIp.js | 2 + reference_scripts/6V3qHON3mcerlBlB.js | 6 + reference_scripts/6XWJWOUQPgKMsFul.js | 1 + reference_scripts/6ZS1rQLkNvMDO0Fp.js | 11 + reference_scripts/6elUNF58TaiYjxcx.js | 6 + reference_scripts/6fElmBxTjdAaubbK.js | 6 + reference_scripts/6hAgggYpNR3r4QWC.js | 5 + reference_scripts/6jcTzK1XEuWqAacN.js | 2 + reference_scripts/6kifXp2jXEaQVJsg.js | 21 ++ reference_scripts/6mpw9cGseG4W4eyd.js | 12 + reference_scripts/6qUKKep5vhFYmo1J.js | 1 + reference_scripts/6tjn0RH4VyOPFneS.js | 1 + reference_scripts/6uldpFvKOCoW92cC.js | 8 + reference_scripts/6xTtJEhRc4OjcDTf.js | 5 + reference_scripts/715G1Bf0haOHvmYQ.js | 1 + reference_scripts/71DmrxCTKGYL4Z7X.js | 1 + reference_scripts/7Ck0fkzE4WQ62qVe.js | 4 + reference_scripts/7F3miqRA0ceMUBIu.js | 1 + reference_scripts/7F6aGxZJjwxm5e5P.js | 18 ++ reference_scripts/7H6wYyJ6cpaoc2QQ.js | 1 + reference_scripts/7JW9t8AYSDkkzG2V.js | 21 ++ reference_scripts/7OmrMjaU48o2FEZi.js | 6 + reference_scripts/7ScfB4o1QhXnNUfq.js | 1 + reference_scripts/7VAhXHov6pR1SkgD.js | 1 + reference_scripts/7WR2hJjHPhHhHxAq.js | 8 + reference_scripts/7ZoFUMDG2WJd8RMg.js | 1 + reference_scripts/7e8FgQUF2oANANmx.js | 1 + reference_scripts/7f6OsttTzE7Hvzfk.js | 5 + reference_scripts/7n3SEAGRA5ESK8gV.js | 1 + reference_scripts/7szLG4VALuuy1cPm.js | 6 + reference_scripts/7wBWUw05q0igh508.js | 17 ++ reference_scripts/84IB8CWa55XzoAkv.js | 1 + reference_scripts/87rrZ3ojHrXa3lCn.js | 1 + reference_scripts/8AoA4bnstBtglRGZ.js | 3 + reference_scripts/8ByuHnUZ4RNTdGVv.js | 16 ++ reference_scripts/8GyJgdHVBaLrHCY8.js | 21 ++ reference_scripts/8K9tpCwvFC9INk5V.js | 8 + reference_scripts/8LmUVQxOwTLSeabg.js | 1 + reference_scripts/8N3Uqjq1ZxPxo4pk.js | 1 + reference_scripts/8RNziYGGb4sp3BGQ.js | 5 + reference_scripts/8ShLVT0bK1eQpinj.js | 4 + reference_scripts/8TRiAJ8thIKE4IoL.js | 5 + reference_scripts/8ThudCYRqkjQIwJH.js | 4 + reference_scripts/8WJsecxdndaHRxxS.js | 1 + reference_scripts/8WeYU5e5LN9UeWFs.js | 8 + reference_scripts/8ZAUBSH9CM9OTpTL.js | 11 + reference_scripts/8araLuwmBq8GKEw3.js | 7 + reference_scripts/8fefDfiYKFOWdPER.js | 1 + reference_scripts/8g2iitsgaJarKQpr.js | 3 + reference_scripts/8gCja0mfKt4nYVZc.js | 1 + reference_scripts/8hIyWDyfbgGAig65.js | 1 + reference_scripts/8jvEVPUCg3rKG48Y.js | 3 + reference_scripts/8noxHUQKR55Kx1YN.js | 1 + reference_scripts/8oE0DTzz0krOfFlV.js | 2 + reference_scripts/8rq4GL5d5nCn4kO7.js | 7 + reference_scripts/8tyMXDfHR8AJBdDu.js | 7 + reference_scripts/8vpAtJ93GIeye1qj.js | 1 + reference_scripts/8wG9l4T9fc1bM0TN.js | 3 + reference_scripts/8yBr6VbdKcrWUuqw.js | 4 + reference_scripts/8zTkDVziBPaNbMQX.js | 30 +++ reference_scripts/91S2GnBFYFbxmOCK.js | 2 + reference_scripts/93K85NnVwjVNXlZq.js | 1 + reference_scripts/956dUb5sd6OtbWZR.js | 1 + reference_scripts/96Y1yIH1lRjTs5hL.js | 5 + reference_scripts/98nKfcimlaPeM9h5.js | 2 + reference_scripts/9A7rYY3FKi5XLihG.js | 6 + reference_scripts/9EVj4bmZJex45Mt7.js | 1 + reference_scripts/9JnPK1jNUEso7Pv8.js | 4 + reference_scripts/9MDi3ok9gPwtbALf.js | 1 + reference_scripts/9MwRUzRinhq1IjhG.js | 1 + reference_scripts/9RFoasDcFnYZ1txR.js | 1 + reference_scripts/9VfeubiCV83LN9iY.js | 4 + reference_scripts/9WZa63lr0K3SsP4G.js | 7 + reference_scripts/9Yn9uViEjcuaESJ2.js | 12 + reference_scripts/9ZFPDCk8M2TQxh7x.js | 1 + reference_scripts/9bJGJrLqslV5lBya.js | 1 + reference_scripts/9eWR4mdaoCSQawDT.js | 4 + reference_scripts/9fK07tqqZyPg7dpx.js | 12 + reference_scripts/9nroaZDkW3WXNkB7.js | 2 + reference_scripts/9ob2lPnk3PDot9Tx.js | 1 + reference_scripts/9qWUuEF8F5nehF1y.js | 2 + reference_scripts/A0OK0qAMmnf8iNJf.js | 8 + reference_scripts/A1odAcuRbq9797ZB.js | 94 ++++++++ reference_scripts/A3MW0UksYrHGa0Qw.js | 1 + reference_scripts/A3fvV69RS1lYgma0.js | 15 ++ reference_scripts/A6DcKPzAGntzSCil.js | 5 + reference_scripts/ACgKpKrEEHoNGG0h.js | 1 + reference_scripts/ACtDCTLZXmd5uXjX.js | 15 ++ reference_scripts/AGD7zCyV4zruvnWu.js | 1 + reference_scripts/AHZ8f7dfN8jNsYk6.js | 22 ++ reference_scripts/AI6bFrjWk4NH9FBd.js | 1 + reference_scripts/ALuPRzf85dmkEfLo.js | 1 + reference_scripts/AMI2wDJqsIZsoq1e.js | 4 + reference_scripts/AMxezwtYnWCF6Oza.js | 1 + reference_scripts/AS7CstSosuCrwZ19.js | 12 + reference_scripts/AV2Kj6jgmIc45zKi.js | 1 + reference_scripts/AVROqafFhKjN6TPR.js | 3 + reference_scripts/AWgZnm9xLyIWCDnp.js | 9 + reference_scripts/AZGXrZOQ4EzjxRL9.js | 1 + reference_scripts/Adgs6Zs0FdefO6qx.js | 5 + reference_scripts/Ah2wyywkL8hjJNXM.js | 1 + reference_scripts/AjC4dsiuhVCOnRGI.js | 3 + reference_scripts/AmOMCUaWLJ2iJAt5.js | 3 + reference_scripts/AmpDbT0BkDHeaRzf.js | 4 + reference_scripts/ApaLcUhuty3EzJoP.js | 6 + reference_scripts/AqHLHp4kH6KULk3e.js | 12 + reference_scripts/AyNb5sj6FD2Z3Q5T.js | 3 + reference_scripts/AyS3iLljxHRKsHg4.js | 8 + reference_scripts/B063u4vrbvzMaCQt.js | 1 + reference_scripts/B1xgRS00RcTIZLnO.js | 1 + reference_scripts/B6ZbY3bxTPg6nCng.js | 1 + reference_scripts/B87v1twc65qyvUWi.js | 1 + reference_scripts/B950b0XnIUYCdVwu.js | 11 + reference_scripts/BAOv7moTxsKlT3JS.js | 6 + reference_scripts/BD7bVTU2pVoRSRBe.js | 30 +++ reference_scripts/BHbFqhJPzZI2txLs.js | 8 + reference_scripts/BcXTujburrHpjpwa.js | 1 + reference_scripts/Be5rdfnZorbILhpC.js | 4 + reference_scripts/Bexspr5viPhHiFmU.js | 3 + reference_scripts/Bj6bxItlgtI2sXVN.js | 5 + reference_scripts/BtyFhdGMKiMamGhM.js | 15 ++ reference_scripts/Bv3431tnG3VKaTJr.js | 4 + reference_scripts/ByhEa1BxQOyrOmqg.js | 1 + reference_scripts/BzDLuxBNw1QNIacg.js | 8 + reference_scripts/CCK1iIfPmB398ziT.js | 2 + reference_scripts/CCwuu3bPLCpVGAmb.js | 4 + reference_scripts/CDASLC4fWKSGQKf9.js | 5 + reference_scripts/CHnaBPHk6HdFS512.js | 6 + reference_scripts/CIxZYkHggBQ6EsHP.js | 2 + reference_scripts/CM43kvw5mIIE1OsB.js | 12 + reference_scripts/CMUFtmNA1kkD1ay7.js | 12 + reference_scripts/CPQoK7NjzOwVTFXS.js | 7 + reference_scripts/CW5Vlr57OaMkKJ8Q.js | 12 + reference_scripts/CWNGrg7se91RC95g.js | 11 + reference_scripts/Ca1fXHTA1e2QLx0D.js | 1 + reference_scripts/CiFeduksZJ6PRulx.js | 1 + reference_scripts/Cjj4iLkdY1NaZRCi.js | 26 +++ reference_scripts/CkE8NZOhzPkuRrKJ.js | 14 ++ reference_scripts/CoImIH9OCMx9DfQZ.js | 4 + reference_scripts/D5XmzrUGFa1JN0cl.js | 2 + reference_scripts/DANLE5HxrkTNelhl.js | 1 + reference_scripts/DBafsY1HrclJRTtA.js | 1 + reference_scripts/DHxUKY9LMyifFgCi.js | 1 + reference_scripts/DL9vYNft9aXdV2aW.js | 12 + reference_scripts/DMQ0taEpBUJU5njV.js | 1 + reference_scripts/DTiHS6RfwhF4THbf.js | 1 + reference_scripts/DVlZGbiuMIHEQOnM.js | 10 + reference_scripts/DWBxvzfWGcG7PVNP.js | 5 + reference_scripts/DcSJNRBXE9ZBBY7T.js | 1 + reference_scripts/DhZqJso1JWYtGrKk.js | 3 + reference_scripts/DmbWR9s5I8LHBwxB.js | 14 ++ reference_scripts/DpdSEHM6NMN1ey6h.js | 4 + reference_scripts/DqJFo74trI916qXN.js | 3 + reference_scripts/DsE6rTSzxEn6uWMz.js | 7 + reference_scripts/DuM5l2Yb4bdvDeaG.js | 1 + reference_scripts/DxQnamsb2AuW0p2e.js | 1 + reference_scripts/DyZ1jH88EAp1ueOK.js | 5 + reference_scripts/E1Xo4RVuN1YRRxg7.js | 1 + reference_scripts/E1vUepgop09FF5wy.js | 22 ++ reference_scripts/E2VfOVuju67qO3VL.js | 5 + reference_scripts/E4CHDe1xfmcV3oGv.js | 1 + reference_scripts/E6DMqfDeczqmVMFV.js | 3 + reference_scripts/E7D4bxz8gy4e1wL7.js | 1 + reference_scripts/EGWF3LHav3e2zFL4.js | 1 + reference_scripts/EJObiSth3WdcJOXN.js | 5 + reference_scripts/EJaBfqADqlo92Fx6.js | 4 + reference_scripts/EKkdyp51Wf4csw2B.js | 1 + reference_scripts/ENGmwaItRXO5s0XY.js | 5 + reference_scripts/EQ5dtGW5kQhtAb87.js | 7 + reference_scripts/ERxrWzSpw8qwxFVi.js | 1 + reference_scripts/EU5j0hnDTG9Z6d1e.js | 6 + reference_scripts/EVBSHEC5nmmj2X41.js | 1 + reference_scripts/EYny6z5oTOhxGDfb.js | 1 + reference_scripts/EaSNOmXUxAkUHnm5.js | 2 + reference_scripts/Eay7GpDyfsEE40jT.js | 4 + reference_scripts/EdTChmSouS0MSmk5.js | 10 + reference_scripts/EiLaZW4b4ypw5sLV.js | 2 + reference_scripts/EmXwcuycEH8slEn5.js | 6 + reference_scripts/EmmG49pMOPHRwDzR.js | 8 + reference_scripts/EpdMj9d9SYPeP44q.js | 1 + reference_scripts/ErgOwSiVnm9VLVHN.js | 2 + reference_scripts/Et4tPHlrkueLqP3T.js | 1 + reference_scripts/Ew3C2WmLCtc1KT46.js | 1 + reference_scripts/EwD053Fyy46b59ZI.js | 2 + reference_scripts/Eye6dranWpNsILjm.js | 4 + reference_scripts/F4aGsdzJ9SYcX57F.js | 10 + reference_scripts/FAB12eLcSCAOOQwk.js | 1 + reference_scripts/FAf4iXj5LkdvukS2.js | 1 + reference_scripts/FMA16PvoObBV8vDl.js | 5 + reference_scripts/FMSN5uRskkATexzB.js | 1 + reference_scripts/FSqUqSByMiztYOQM.js | 2 + reference_scripts/FUgCtIoj1Stgqxt7.js | 1 + reference_scripts/FXuyiJoXdAh6WhRK.js | 1 + reference_scripts/FXwfqF0jpXlBQ9Y3.js | 1 + reference_scripts/FYUPfYyTYZkxRLFT.js | 1 + reference_scripts/FZFOC7bip0oiWEzk.js | 5 + reference_scripts/FciJSTq7dZsZIPgl.js | 10 + reference_scripts/FfTqCPxCoxwGDTQs.js | 3 + reference_scripts/FiD3mvWIBHNNIuO9.js | 8 + reference_scripts/FkTwk8hfHpRLbAp2.js | 6 + reference_scripts/FmLx9pwOkzqqU7Ph.js | 1 + reference_scripts/FqevMs0ukQ9WuUHl.js | 9 + reference_scripts/Fvlc4RkeF4dHjW3m.js | 16 ++ reference_scripts/G1RletYc6BzigJrK.js | 2 + reference_scripts/G7sFEnJlXZvfXL3V.js | 12 + reference_scripts/GAO8AozttWOyRkta.js | 5 + reference_scripts/GEfWIFBSrXt0ldBM.js | 2 + reference_scripts/GFaTz8f6PBNWrlad.js | 3 + reference_scripts/GFkVnx4m9OwYsKGH.js | 1 + reference_scripts/GNl5Zk7BZ2jhRV1I.js | 4 + reference_scripts/GOq4TcnWbfyfCo2V.js | 26 +++ reference_scripts/GRfCxtYzmEx2LYU7.js | 9 + reference_scripts/GTZUO73pUJKpM1JB.js | 3 + reference_scripts/GUkpYdPwoC5pc9BT.js | 1 + reference_scripts/GZFsuynUhgZqwTGo.js | 10 + reference_scripts/GbPEy22VuCNzlNv2.js | 1 + reference_scripts/Gc8S5TYlVdV8NnOT.js | 8 + reference_scripts/GcIQtshex11AMmh2.js | 25 ++ reference_scripts/Gh7OidY6UdpWBS1g.js | 3 + reference_scripts/GjkxWj9wCAclM9WA.js | 17 ++ reference_scripts/GrF6tQ08jgKmUH4i.js | 1 + reference_scripts/GuUCErVbk5hrFzR3.js | 1 + reference_scripts/GuxbvztcvzJz2oH1.js | 1 + reference_scripts/GzSFlqL1YrIK1dxh.js | 16 ++ reference_scripts/GzsuEg7gZy1f0ljy.js | 10 + reference_scripts/H06Ysj7oPiemW7S6.js | 18 ++ reference_scripts/H1z3nWW7Rj3Oisxy.js | 1 + reference_scripts/H2CJvApKMnfGNNoo.js | 7 + reference_scripts/H3Wls12aVWAWTp9J.js | 3 + reference_scripts/H3pZ9UeIzIz3luKh.js | 5 + reference_scripts/HASsi6wYHVALExWq.js | 14 ++ reference_scripts/HJ2X4ZtXei0BXbxf.js | 19 ++ reference_scripts/HKhyn0kijKfzW6cw.js | 3 + reference_scripts/HMC6hPND9DWLFfZE.js | 43 ++++ reference_scripts/HOt2hHOiHDZ7oBgW.js | 4 + reference_scripts/HX6CjNapYdC0VmQ8.js | 3 + reference_scripts/HXJKkmpfxQUOnWOS.js | 4 + reference_scripts/Hcpn1gU58DIKIhty.js | 4 + reference_scripts/HfCxNd7mFGZH4s9Y.js | 13 ++ reference_scripts/HiMBS6GeOwEydWYN.js | 1 + reference_scripts/HmImVzvw6ecBy99l.js | 5 + reference_scripts/HoNTnPphrJISSQr1.js | 1 + reference_scripts/Hq1G30lhJYvtOSNb.js | 9 + reference_scripts/HrOBAXsEX073ReKl.js | 18 ++ reference_scripts/HrYchgkdZBiu1yPF.js | 1 + reference_scripts/HwbgUIbpX0D8JLOR.js | 2 + reference_scripts/I0Jo6cbNAJtXUloc.js | 2 + reference_scripts/I0oRZ7AWde5KI5jw.js | 1 + reference_scripts/I1J2m5uud84N50Lk.js | 6 + reference_scripts/I7ieW0hNYvvX0KFg.js | 1 + reference_scripts/I93i49wI9ZrDHT4n.js | 2 + reference_scripts/I9QAPKbaXwMMMBT4.js | 17 ++ reference_scripts/IAGla7HJlYN0wa4H.js | 8 + reference_scripts/ID8mCcjkl7PCQhDq.js | 8 + reference_scripts/IG4zYqtN9fRSYE7q.js | 1 + reference_scripts/IKiZv9YSFmKmHo6a.js | 1 + reference_scripts/ILqHxk7deotgI3KD.js | 10 + reference_scripts/IPPDvZdE8kn3H9z7.js | 7 + reference_scripts/IR5URcjnCuWBFMoN.js | 15 ++ reference_scripts/IR86DuMbVdbGOJYt.js | 1 + reference_scripts/IfEu1hO8sKEZBpvg.js | 14 ++ reference_scripts/IkGegSuQwwVPhrjF.js | 4 + reference_scripts/Ip8sctF9SIE1Z2vF.js | 4 + reference_scripts/IpoOOjYJs6RmVrpb.js | 4 + reference_scripts/IsLAvY9ikR1cOJWw.js | 1 + reference_scripts/IslMfFgpgQq2brpu.js | 5 + reference_scripts/IukS0clr1yAleacc.js | 3 + reference_scripts/IupskvzvoGyD2H5o.js | 23 ++ reference_scripts/IzZcsSngI8TZH4d8.js | 3 + reference_scripts/J0IWUhxada2ONowP.js | 1 + reference_scripts/J1FPDdrXGctKDTZz.js | 16 ++ reference_scripts/J8aPichsl25t1QZ9.js | 1 + reference_scripts/JEbs0WlqhKNDOo5A.js | 6 + reference_scripts/JFgXyb6bKjZJLmF8.js | 1 + reference_scripts/JQruHprM5R5vZ9DA.js | 10 + reference_scripts/JZIn1dsKHFE3smJU.js | 2 + reference_scripts/JaiC5P6nIgctOacH.js | 4 + reference_scripts/JavuFNZ9Pj5elVLc.js | 4 + reference_scripts/JeThJbOf6Xmbtgo1.js | 8 + reference_scripts/JgCcgDVZX54slrWx.js | 1 + reference_scripts/JibNjuQrJRnY0yf9.js | 1 + reference_scripts/JjDzMnUxaWQePIYh.js | 1 + reference_scripts/JjiPprLSlSmmB5Ga.js | 1 + reference_scripts/Jjq3oPYbI26zjxME.js | 21 ++ reference_scripts/Jk7OHqx06oCUVAzb.js | 1 + reference_scripts/JmZQRvdWjm9ykYfn.js | 5 + reference_scripts/Jnp5c09sPzDD61EK.js | 3 + reference_scripts/JstrA46EYSEuRSy5.js | 2 + reference_scripts/JwYZJGkZMSM2M3Si.js | 10 + reference_scripts/JwgFQmPQtXWAP94i.js | 1 + reference_scripts/JyTxUG5dNW670Sf7.js | 11 + reference_scripts/K06v93N4FXb70mB7.js | 1 + reference_scripts/KD4nCSdSXJVJmk0R.js | 2 + reference_scripts/KF69WqF4PSEtpdb2.js | 2 + reference_scripts/KG4TxnXiLLpfWOQO.js | 1 + reference_scripts/KGK9vL1Yl0qmCeCN.js | 88 +++++++ reference_scripts/KICZPwLvbUSxbDrE.js | 18 ++ reference_scripts/KIoVBinAZK8sMOqD.js | 11 + reference_scripts/KJLAan0glJlyOyqF.js | 11 + reference_scripts/KPQfupKuaf4LCv4R.js | 2 + reference_scripts/KQmb5B27eJ1lkbVL.js | 1 + reference_scripts/KQzbrpb0T5a7it4k.js | 4 + reference_scripts/KSjsDlsx3DD6cT16.js | 1 + reference_scripts/KT670CjGBEprx2fO.js | 2 + reference_scripts/KTBVDHUndI3qDOXM.js | 6 + reference_scripts/KUx0deSF3xNzMucL.js | 1 + reference_scripts/KVpDUEjHhd3nLa0f.js | 6 + reference_scripts/KVuPduDztyMZQNt9.js | 1 + reference_scripts/KXzDe7cN2vynHjJO.js | 3 + reference_scripts/KkjkYAGI9Em1NgiQ.js | 19 ++ reference_scripts/KmngDrPD72xn22kZ.js | 11 + reference_scripts/KnwYZbeRSBA94hfl.js | 5 + reference_scripts/KuUkUmOOLf05I4Bp.js | 1 + reference_scripts/KuuWAhoSzk0rCxxw.js | 1 + reference_scripts/KyUPYV1RXJxPOfyA.js | 6 + reference_scripts/KyswmGj1uG3QS3ng.js | 1 + reference_scripts/L1RMLvKtRPFtnczI.js | 3 + reference_scripts/L2cdQppcPwxz24hN.js | 1 + reference_scripts/L89UcafRHqUfxoux.js | 3 + reference_scripts/L9eAtDyaoHvqryk4.js | 1 + reference_scripts/LAyLbcC0lOPwZP3U.js | 1 + reference_scripts/LHUUXfZVLBhWqRvb.js | 1 + reference_scripts/LLqAT9wEUGMLfDhU.js | 1 + reference_scripts/LOL2TGf8p8KxP14D.js | 2 + reference_scripts/LQEWSN5KnHHATPsf.js | 4 + reference_scripts/LXEUhHuXe8keEPI9.js | 7 + reference_scripts/LeKLtvEDrWh4yHsx.js | 1 + reference_scripts/LedRsrVo2f7lm3Ix.js | 1 + reference_scripts/Lg1oRg4oNRvucsvi.js | 1 + reference_scripts/LjXPlgdXBdllnA3i.js | 1 + reference_scripts/LkPtgN9A36OI6Frh.js | 1 + reference_scripts/LlRhPGorLl5qJCU8.js | 8 + reference_scripts/Lm9IBkc918Duw3US.js | 6 + reference_scripts/Lp261O9fgEXmgPf3.js | 5 + reference_scripts/Lpv2N9LK9loeumiW.js | 6 + reference_scripts/Lrb1S2aK7SFVD0C7.js | 9 + reference_scripts/Lu27iXtJVkrJ8bOx.js | 1 + reference_scripts/LxdLkPxH3SFvYrCJ.js | 4 + reference_scripts/LyAK0dVDS5L09yq2.js | 9 + reference_scripts/M0XhKnWjG14pk3iH.js | 1 + reference_scripts/M2FshTX4PjKFVU8y.js | 9 + reference_scripts/M5bh0heeafA2fQQ8.js | 8 + reference_scripts/M9VgeYGiUO97ZUW4.js | 12 + reference_scripts/MCK6WyjwYT28lsTN.js | 3 + reference_scripts/MDLttXplnNthncGr.js | 1 + reference_scripts/MFKhU9vp8bQpHP3I.js | 14 ++ reference_scripts/MI2GgNi3fZtUCtQD.js | 1 + reference_scripts/MJB6WbZSF6Briz30.js | 1 + reference_scripts/MSJWJEUrX7ZmMvAD.js | 1 + reference_scripts/McLR9YcgVUG3MooC.js | 1 + reference_scripts/MfxWXZwaZUjGSBqw.js | 5 + reference_scripts/MfxzwJz2o9ho2hOM.js | 1 + reference_scripts/MgMMoC4Umpg7fmNI.js | 24 ++ reference_scripts/MgTqCMRjxhezT73T.js | 1 + reference_scripts/MgZreqq3Jua10c8s.js | 1 + reference_scripts/Mhb67xufvA9uWO21.js | 8 + reference_scripts/Mir4FMHQRdVqazAF.js | 13 ++ reference_scripts/MkEcdViivk7abf1x.js | 1 + reference_scripts/MnXny8SCh6OceJc9.js | 1 + reference_scripts/MnqQkXVp20Lw84I1.js | 6 + reference_scripts/Mp8UjuCLa9jdzhBS.js | 20 ++ reference_scripts/Msygc7oQQPB5fw0b.js | 14 ++ reference_scripts/MwUzyAgd0yPnmZCH.js | 4 + reference_scripts/Myl1Ishu9GBraYUZ.js | 1 + reference_scripts/N2MeOlf0GjPiRcSb.js | 2 + reference_scripts/N7nGncsPrTz2ZbDA.js | 1 + reference_scripts/N8hA6ysHCTlLd8Kj.js | 86 +++++++ reference_scripts/N9kA46ZQ9LiRjy6T.js | 1 + reference_scripts/NDvNGATDM2xPFJK0.js | 21 ++ reference_scripts/NNytXz5XFPrEF6dw.js | 5 + reference_scripts/NQSvFWhmBQAyx5Zz.js | 1 + reference_scripts/Na7Nanl9YmxZlTo7.js | 1 + reference_scripts/NdquQqyuOkGCj8Uo.js | 8 + reference_scripts/NkqtQaLEGYst0PUO.js | 5 + reference_scripts/NnA4zpuO6iUXKhH7.js | 7 + reference_scripts/NnDq4miIPNEtZUWb.js | 7 + reference_scripts/NrVFrIXM8GnIbojv.js | 1 + reference_scripts/O7lXFZLrLdFaShGR.js | 1 + reference_scripts/O9fc0hLHdkTgSuLg.js | 8 + reference_scripts/OCFrGXAYfo9OYnhc.js | 1 + reference_scripts/OEy2lxvic37dRBEt.js | 30 +++ reference_scripts/OGX4BneaYAnV25TO.js | 40 ++++ reference_scripts/OJMgS8ZQv0j4tEFf.js | 1 + reference_scripts/OMAUX1fnHyIpplul.js | 1 + reference_scripts/OXoqtpOdfkURZbuL.js | 3 + reference_scripts/Oa9FmLXRRZRpLrrq.js | 2 + reference_scripts/OcQe0zfksf1DCJYe.js | 17 ++ reference_scripts/OeCgX3hIsfLfmGvC.js | 6 + reference_scripts/OeKeQAAcJhdI4Qky.js | 5 + reference_scripts/Ofn6vDbP3fZ4UlSc.js | 2 + reference_scripts/OgSI0Z6SHjYuqKIz.js | 16 ++ reference_scripts/OicQSEVZBbqLtrcf.js | 4 + reference_scripts/OnkEe4ISru1hjJWP.js | 1 + reference_scripts/Op88kMtimSEWlY2h.js | 10 + reference_scripts/OqLKL0PiCvYH2QxW.js | 13 ++ reference_scripts/OqxeuZfZDfm9ax6h.js | 1 + reference_scripts/OvIELZLvnlN2H2uw.js | 11 + reference_scripts/OxsBnnVI3Smpknpb.js | 5 + reference_scripts/Oz7pWF9mEc1pQypj.js | 3 + reference_scripts/P29tT1eMMdAw3CPF.js | 12 + reference_scripts/PBW6IZtwawNHxB6y.js | 1 + reference_scripts/PI1QNaKFeqood6d7.js | 15 ++ reference_scripts/PMISUsaEDBA7D3od.js | 33 +++ reference_scripts/PVjaKAHTKDA0rA9J.js | 2 + reference_scripts/PdClojv7yNgQpOUc.js | 1 + reference_scripts/PeZYj8b0vedyJj00.js | 14 ++ reference_scripts/Pg9C6nJX5QHIdqa9.js | 1 + reference_scripts/Ph3TdQw1lGiFr049.js | 19 ++ reference_scripts/PjRxGuUDKGmSmVDc.js | 5 + reference_scripts/PmELrzD3RmF9qKkO.js | 9 + reference_scripts/PoNnT5EqvLj2r5yf.js | 1 + reference_scripts/PwqTmw7rsG8hzqCS.js | 10 + reference_scripts/Q1trEhtqjIiDvFPF.js | 1 + reference_scripts/Q4EQgP4gZR8TTm7S.js | 9 + reference_scripts/Q68WiUWY7GxiXBbT.js | 5 + reference_scripts/Q9EmlWmuDac83cJw.js | 1 + reference_scripts/QF8LanKNoAlTkQG0.js | 1 + reference_scripts/QKTA2TqZ77pvHWSJ.js | 9 + reference_scripts/QKjR6P1WEHXf4K77.js | 1 + reference_scripts/QPVVDPcJ4Xi5FmQl.js | 9 + reference_scripts/QQ2gHThZHdO4yLLX.js | 1 + reference_scripts/QQPiREc50HT5W2Tr.js | 2 + reference_scripts/QRSACifDrvojIXHB.js | 11 + reference_scripts/QaGNsqKm2Nf0zGVm.js | 1 + reference_scripts/QbIYnshWeP1U8SUy.js | 2 + reference_scripts/Qgn92fZyc3Psn8QJ.js | 10 + reference_scripts/Qk7t2l5ep9RDVpgE.js | 1 + reference_scripts/QoEOxRruQXYrZrv3.js | 17 ++ reference_scripts/QqkE7rlqhkeRohFD.js | 1 + reference_scripts/QqybHxNCzPEzG1Qh.js | 1 + reference_scripts/QwHoqu2oO8QO8Mad.js | 3 + reference_scripts/R32U01LBjBrK1pns.js | 33 +++ reference_scripts/R5dOZWFxE2n6tooX.js | 1 + reference_scripts/R6SnyF3y4Vsq6oga.js | 8 + reference_scripts/R95pDZMHnD9iHAl8.js | 1 + reference_scripts/RDtJXji3hgcKnEBk.js | 33 +++ reference_scripts/RHyBLYT5oHf7EPnG.js | 21 ++ reference_scripts/RI8crJxeD8JLDwMh.js | 1 + reference_scripts/RJpglw5eVRM1f9t0.js | 1 + reference_scripts/RKIFGN583PQnqHGk.js | 5 + reference_scripts/RNHrSTfMLXm5sXkC.js | 1 + reference_scripts/RNr9CwyvLhlnwD2h.js | 1 + reference_scripts/ROXCqAFSTLouJniL.js | 7 + reference_scripts/RSsGiDFibuqg3sHr.js | 15 ++ reference_scripts/RZlMkxJz5apn0mUj.js | 1 + reference_scripts/RprZWlnopSqZt7KZ.js | 1 + reference_scripts/RqWnhnwFxaHubgiA.js | 3 + reference_scripts/RrchOMpEdIvceJxl.js | 1 + reference_scripts/RuW1PWUFxIbbSlIm.js | 1 + reference_scripts/RvipIYj9H7n4UDMe.js | 84 +++++++ reference_scripts/S1QihXuvdEVzeRtB.js | 40 ++++ reference_scripts/S3DCTw4yJ85eSaKp.js | 1 + reference_scripts/S3Dev4hleOYqDNe9.js | 16 ++ reference_scripts/S4793DLFhjMxpM8x.js | 1 + reference_scripts/S6tUyFJvGMV19mvP.js | 1 + reference_scripts/S95QqpX1cZyIVCPy.js | 5 + reference_scripts/SGr50Hq1AHIEzIFN.js | 6 + reference_scripts/SLy1Fs3oXcHgFgjK.js | 5 + reference_scripts/SO4Aa9argKbuO9rQ.js | 1 + reference_scripts/SPOkFWZWziZk5b7A.js | 1 + reference_scripts/SRmfstEs278bP9Pz.js | 3 + reference_scripts/SSqGxyN9hw0HDmED.js | 1 + reference_scripts/SWIJjM2RCmzfr64u.js | 6 + reference_scripts/SrCHfOJFZwDickqa.js | 6 + reference_scripts/StAderQaQQsxb6Rv.js | 10 + reference_scripts/SvFKt9hMcFQjeILA.js | 1 + reference_scripts/T5fiTzhXEQAv9Drf.js | 20 ++ reference_scripts/T74FEjfFrh3f6MKv.js | 1 + reference_scripts/TAw9vXnfyIAl5DGs.js | 11 + reference_scripts/TBpNFRL5uehs0fze.js | 10 + reference_scripts/TEiNj5FgkoD3YbhS.js | 1 + reference_scripts/TGN070HeJLl3gSMY.js | 6 + reference_scripts/TNWmIkuubqBn38he.js | 1 + reference_scripts/TOyQLrugFGzwc5nY.js | 1 + reference_scripts/TQRL4mZhZohXg1Au.js | 2 + reference_scripts/TU2xjbJ0zFtytF3J.js | 1 + reference_scripts/TY0xSQ00XXyEr49r.js | 1 + reference_scripts/TcqumwUFAL6V0cty.js | 11 + reference_scripts/TdjlJro0RRVSh8g8.js | 1 + reference_scripts/TmaS8o33825QUMrx.js | 3 + reference_scripts/TnFobCxG4pxlYmKr.js | 16 ++ reference_scripts/ToKlHDAjJOsC51ag.js | 11 + reference_scripts/TpZItJ5Ugbazaobd.js | 15 ++ reference_scripts/Tq45Nd8J3eTvHT41.js | 1 + reference_scripts/TrIYdcG3jDER4WgY.js | 4 + reference_scripts/TwgdEucxcHloc4cX.js | 135 +++++++++++ reference_scripts/TwwKxFjK6TNGKbRB.js | 8 + reference_scripts/TxfmxDGBj04AQQpt.js | 11 + reference_scripts/TzgmYRXFXRspIo1i.js | 1 + reference_scripts/U1RUcgP8LD2qeGTm.js | 1 + reference_scripts/U1UpSRJOSjPpO4HS.js | 4 + reference_scripts/U26XMie3Kjoddisj.js | 10 + reference_scripts/U2xKn7R1gm8kiQm8.js | 4 + reference_scripts/U4A8FDNmwBGTuQZO.js | 5 + reference_scripts/U5ndCwcJ1s3Ns26w.js | 3 + reference_scripts/U78c4oUjKwyUu6jT.js | 1 + reference_scripts/U9xh2wriSqCosugW.js | 13 ++ reference_scripts/UC6G3pFQwzUhrw6F.js | 1 + reference_scripts/UH5MIzqi2MvEqTwj.js | 7 + reference_scripts/ULmZMLezDamerN04.js | 32 +++ reference_scripts/UTlgF4azrGQZsoDv.js | 2 + reference_scripts/UWrzokgabRKUpnkG.js | 1 + reference_scripts/UYLXm2W6jVn21Age.js | 1 + reference_scripts/UaImulhbPURkLJg2.js | 1 + reference_scripts/UgQW0UMPOZ0jwfVJ.js | 5 + reference_scripts/Um6xMMiUftLXJxEt.js | 1 + reference_scripts/UnqnWi0dZYLf5fTT.js | 133 +++++++++++ reference_scripts/UsAHQecRlWL5PhP6.js | 8 + reference_scripts/UsuwsmU1TUQLQVM2.js | 2 + reference_scripts/UvycHOjSPm5Zv9KJ.js | 10 + reference_scripts/UwjkHRAQHESdYXJs.js | 11 + reference_scripts/Ux4buMc7llF1Kg8p.js | 4 + reference_scripts/V1D2Uo3WDKYQePU3.js | 14 ++ reference_scripts/V2lsVTi6q28eL5jl.js | 1 + reference_scripts/V7qmFwUMCY2tfziH.js | 1 + reference_scripts/V9wD9FWHWxZUOGSI.js | 15 ++ reference_scripts/V9xm4X1x3lPYTQaI.js | 6 + reference_scripts/V9zm2hKUVLVZtAcN.js | 133 +++++++++++ reference_scripts/VAPsww9x3HAw1sKP.js | 1 + reference_scripts/VAs1nXvicdQK18Do.js | 1 + reference_scripts/VKpKq4RSbI1KkUQK.js | 1 + reference_scripts/VNOKTzCrFbZ6PJUj.js | 1 + reference_scripts/VQaC6ynouW5EQCbC.js | 13 ++ reference_scripts/Vb7rgl8T4VRswbnZ.js | 1 + reference_scripts/VbL0TgaBAmYjrezZ.js | 2 + reference_scripts/Vkuu70BZV4DPYO2Q.js | 1 + reference_scripts/VlFUDaKUYoBYKYn0.js | 7 + reference_scripts/VqTrKPtxv9hpn0Hr.js | 1 + reference_scripts/VuE1mhrB6X6MYTzg.js | 1 + reference_scripts/VurA2XNqC0d9U49C.js | 8 + reference_scripts/VzO0ZDcTWvaBn4vm.js | 13 ++ reference_scripts/VzgTGb5QXKoyPNh3.js | 14 ++ reference_scripts/W9nyUNQStMr1pUHJ.js | 5 + reference_scripts/WB6sIpLEPC8YPX67.js | 6 + reference_scripts/WKXyVHQwQCNTfSKv.js | 4 + reference_scripts/WO5n7Vbx8AgoVrwC.js | 84 +++++++ reference_scripts/WPQbVpD1uwSLAXq1.js | 4 + reference_scripts/WRe1eGmGVGejPcS8.js | 2 + reference_scripts/WTRYAEzwxRuGENyI.js | 18 ++ reference_scripts/WY3DajPRGcMNt158.js | 2 + reference_scripts/WiYtNU2Y5BJfIpeM.js | 15 ++ reference_scripts/WnWA0e0bgqBsZp2L.js | 1 + reference_scripts/Wo4wQKUxSItAhRzZ.js | 8 + reference_scripts/WwxXgsNxlccmqTze.js | 1 + reference_scripts/WzMmwjZbhyCbHxyZ.js | 2 + reference_scripts/X3bLbOfcJAftOMa7.js | 1 + reference_scripts/X7ikFOGKYzTMr4d1.js | 1 + reference_scripts/XClTZOjuhcxWLF51.js | 13 ++ reference_scripts/XO9m2AvFRAAeEuty.js | 5 + reference_scripts/XPxAKqPpPYE4E6B5.js | 1 + reference_scripts/XRrGBbplNLZpXnCH.js | 53 +++++ reference_scripts/XXnzUdsIYQ9Wjyu0.js | 1 + reference_scripts/XYaYeiVkc5GKYTjC.js | 1 + reference_scripts/XcvDYNZgJ2rpAdDV.js | 7 + reference_scripts/Xe8ijqWU3bbtq7ZY.js | 5 + reference_scripts/Xf4FcZ4ZLdWmOXBa.js | 1 + reference_scripts/XfRvVBTVIuAm8RaZ.js | 1 + reference_scripts/Xg4qHLsyXGuUZfT8.js | 1 + reference_scripts/Xk9XPklxxTvFlwpI.js | 1 + reference_scripts/XthZ3GCC3WhsEI2g.js | 11 + reference_scripts/Xu5cED1MhT4ba7da.js | 1 + reference_scripts/XuFxKPYheYF4WMmQ.js | 1 + reference_scripts/Y6ppJBerpM3TtSic.js | 2 + reference_scripts/Y7McxsHFeGhwQx0J.js | 11 + reference_scripts/Y8J66v8VTKUASGuK.js | 16 ++ reference_scripts/YDqpKJVy8ijEKdLX.js | 1 + reference_scripts/YEBw2CzHYxsTpTy5.js | 1 + reference_scripts/YFSgWRXel0bWE3EE.js | 1 + reference_scripts/YHEIkBKWXKNPqglh.js | 4 + reference_scripts/YMaxpXnml01bLGpO.js | 1 + reference_scripts/YOKoZFlBEpFavfOS.js | 1 + reference_scripts/YQ2LnLxp0xgy3meI.js | 3 + reference_scripts/YRUTliBzAQvncGNX.js | 2 + reference_scripts/YaKnYEbmmZZtByJc.js | 5 + reference_scripts/Yf2MmOzazzMdmoPU.js | 12 + reference_scripts/YhhiWEQbox3WZA3Q.js | 1 + reference_scripts/YjAIsFlxKTJvYs60.js | 1 + reference_scripts/YjJcRdytVRm88qLn.js | 1 + reference_scripts/YsS2RZsl2ZsqjhWV.js | 1 + reference_scripts/YwLEw4BiKq4EMy57.js | 19 ++ reference_scripts/YyKU2rIRmFSCqSlW.js | 6 + reference_scripts/Z1zriXibT0mAmdhb.js | 6 + reference_scripts/Z30zYayPryXOjT5N.js | 1 + reference_scripts/Z4WrrlVGpPY4iUbG.js | 1 + reference_scripts/Z52yZDm6lP6fOP3O.js | 6 + reference_scripts/Z6OmmC0irJzxSnMH.js | 59 +++++ reference_scripts/Z6jNlyZMECkW4Hon.js | 13 ++ reference_scripts/ZCkYe5XMVY1RWMXG.js | 1 + reference_scripts/ZCrfdLPOxiNDCDSg.js | 1 + reference_scripts/ZCuOjLAeENKN1Q4L.js | 15 ++ reference_scripts/ZEXhYJqqxF6QAixX.js | 1 + reference_scripts/ZEdDcBka21rnMuz5.js | 19 ++ reference_scripts/ZGlJnrIemqul24j7.js | 8 + reference_scripts/ZI2YnAAGoLpmVDIL.js | 4 + reference_scripts/ZJy2rvpKmUHXGrAi.js | 1 + reference_scripts/ZMwJad6v4G13SgjR.js | 1 + reference_scripts/ZNW3ubbKIYXAyE48.js | 29 +++ reference_scripts/ZNu4B0OdjkM9lmtu.js | 4 + reference_scripts/ZTE8LdRblyG4yYoE.js | 8 + reference_scripts/ZYsMgB4BwXBJcpYf.js | 3 + reference_scripts/ZbuW8y7t9Y8oUFWq.js | 1 + reference_scripts/ZdHvGvSJBsIuPphF.js | 1 + reference_scripts/Ze9E2zR1GFGWGMVH.js | 1 + reference_scripts/ZhuitY1KOU1Xe7cP.js | 1 + reference_scripts/ZqTW093qENOwGONP.js | 10 + reference_scripts/ZrePyV2spv3v65Tg.js | 1 + reference_scripts/ZsQR3AVKi0v5U593.js | 1 + reference_scripts/ZvbBM4gTJHPdU8jU.js | 3 + reference_scripts/Zxh4RAENoaAQAaNg.js | 1 + reference_scripts/ZxtOdwsM2Sqj9Zam.js | 5 + reference_scripts/a02tlRCXpaoaDjSN.js | 16 ++ reference_scripts/a0YU3whUm16wGBNu.js | 7 + reference_scripts/a4Aza4a9v8JMU8dC.js | 2 + reference_scripts/a6gacHsvgwtsIFSQ.js | 2 + reference_scripts/a7pEvCycVnFBXGAQ.js | 7 + reference_scripts/a8RabrnJ08O07rDX.js | 5 + reference_scripts/a8i0sA1RBnD8nHZt.js | 42 ++++ reference_scripts/aAvJrAKLzXhS9qN6.js | 1 + reference_scripts/aCVtaW8ag1WibcAr.js | 2 + reference_scripts/aIYUsBIDKWJ3CEtj.js | 1 + reference_scripts/aMHGjWyn6BXCI4pw.js | 2 + reference_scripts/abLWYtNTu1UVDQAs.js | 5 + reference_scripts/abVIvJBzuskNzCQv.js | 8 + reference_scripts/afdmOvPGMpEdZvCb.js | 1 + reference_scripts/agsm3NI1NDtHRG4y.js | 1 + reference_scripts/ahbA7o5G9dzMFl76.js | 2 + reference_scripts/alJgj25l3239h2SW.js | 3 + reference_scripts/ayIbw2Vw2t9xg33P.js | 2 + reference_scripts/b1zMefdoZYtzCm7i.js | 1 + reference_scripts/b2Kb4IuD22RhKhR0.js | 10 + reference_scripts/b2WaqRna5CFXmbDG.js | 1 + reference_scripts/b5DfAWtpV1x2R8If.js | 1 + reference_scripts/b5prg1FLjCAvBjLy.js | 13 ++ reference_scripts/bBdXzBmxgFFBwMMS.js | 9 + reference_scripts/bEVlJOOA1kLlzpWx.js | 86 +++++++ reference_scripts/bLkt8VpTTPoTxW0W.js | 5 + reference_scripts/bMEFHPCei2evnZZw.js | 14 ++ reference_scripts/bQyVajMN1ETwlzvM.js | 9 + reference_scripts/bRtZH0xRh8dgqMeW.js | 5 + reference_scripts/bWr8leucbWslBCYG.js | 1 + reference_scripts/bhXUW7IJtEaUGAoV.js | 7 + reference_scripts/brNRqfpPqD2Ki0cM.js | 1 + reference_scripts/btPrQkGRKUkhNe3N.js | 1 + reference_scripts/bwtQOSWn120NICkf.js | 8 + reference_scripts/bwx9wuEOJPF7btD1.js | 1 + reference_scripts/bzaoWcieMFaU5B5l.js | 1 + reference_scripts/c31hjp7k0hlpdGBC.js | 3 + reference_scripts/c3KA1knL2NYNUEww.js | 1 + reference_scripts/cAioHYtlxuOCwRLh.js | 2 + reference_scripts/cApfxL7Ic0NKdoSr.js | 3 + reference_scripts/cBSy9CR5NZvcLRg8.js | 5 + reference_scripts/cDBhmHn5kjgWBAlT.js | 3 + reference_scripts/cEg09bnvZD6Ysnpc.js | 4 + reference_scripts/cJFDnq1HI4gXWcJo.js | 8 + reference_scripts/cK1Jysfu5IMUUH0C.js | 11 + reference_scripts/cOuukVo8WakDZIUj.js | 1 + reference_scripts/cUFCL02JoaZObRcX.js | 4 + reference_scripts/cUnbADgOQ4fMKgrH.js | 20 ++ reference_scripts/cV9JiAgUPOeUHKnS.js | 5 + reference_scripts/cYPIXzl86a3LFsTE.js | 6 + reference_scripts/cgmA2N0MkjA7qIZy.js | 1 + reference_scripts/ch5SD2XOQfcYo0X5.js | 10 + reference_scripts/chUpiI3el8IO8MSs.js | 6 + reference_scripts/csLKDJKZaUK9vwLT.js | 4 + reference_scripts/ct6WGaRMfrcnHhyv.js | 4 + reference_scripts/cuqCtQsfLBBAGjnu.js | 1 + reference_scripts/cysQDjlDzT8HdNeo.js | 1 + reference_scripts/d29mu8vRt9AQUm0L.js | 7 + reference_scripts/d6mVm08o8SeklAcW.js | 1 + reference_scripts/d9iU08yvqcffF026.js | 1 + reference_scripts/dAMtbn3uQwF8KpKU.js | 1 + reference_scripts/dIxYt421K010eogY.js | 8 + reference_scripts/dM449AU0FQRnOc3l.js | 4 + reference_scripts/dM8FbRH2V8CpOkXw.js | 4 + reference_scripts/dSmRhZ6o1bUcOSF9.js | 1 + reference_scripts/dXGosSxdoYbET2O8.js | 11 + reference_scripts/dZ4c5pKDqQV02aIK.js | 4 + reference_scripts/dbOSvpgcPjsc2uvq.js | 7 + reference_scripts/dbYjr4oG67Z880To.js | 4 + reference_scripts/dcwY8dCd3PNCEzk6.js | 5 + reference_scripts/dfEgat3jz4EtWszH.js | 1 + reference_scripts/dfnCK8jCPXNLM7Gh.js | 12 + reference_scripts/dk02qSJfJaIo3Geh.js | 4 + reference_scripts/dkY7WRYjFVh8GB0m.js | 1 + reference_scripts/dkiNmwFXztIVbuxg.js | 8 + reference_scripts/dqvHDMlcitLx1pUx.js | 1 + reference_scripts/dt85W8pzZ09w1QLi.js | 4 + reference_scripts/dtFvpY96RPzNnphq.js | 1 + reference_scripts/dwSgcFxKN3S0hLJL.js | 1 + reference_scripts/e0TuMgYuI7ZtGoQr.js | 4 + reference_scripts/e34s1XxHckAWfwHt.js | 4 + reference_scripts/e7IxnxePdXSy6L4E.js | 4 + reference_scripts/eAtqyBd1HsDWuBuI.js | 1 + reference_scripts/eHRv7f2BTtle6Y1K.js | 3 + reference_scripts/eHgk3HZ6eyLFTZ9o.js | 1 + reference_scripts/ePPgxQOqL1Uhz2k9.js | 90 ++++++++ reference_scripts/eWWLmA2xINR321aK.js | 1 + reference_scripts/eb69QPmNQEJXtk4l.js | 1 + reference_scripts/ebDQH0MdGAG02CHl.js | 14 ++ reference_scripts/ed7Sud9HM3uB2j6b.js | 7 + reference_scripts/egDtqMxe3iekc6hv.js | 6 + reference_scripts/eh1J3s0s4A2AxoFp.js | 4 + reference_scripts/ekjJQHyMbZT2vqdc.js | 9 + reference_scripts/eqxE7nBO13yJS7hc.js | 6 + reference_scripts/esuLwq4g5T8k1kLT.js | 1 + reference_scripts/ezGqDoC9hNRBnFTB.js | 17 ++ reference_scripts/f062aa2BNClx08D6.js | 16 ++ reference_scripts/f3rXusHh6VIpVPUl.js | 1 + reference_scripts/f4vvAGQ8OGoEbrgy.js | 16 ++ reference_scripts/f5Mp3kXwCFdPkW6N.js | 1 + reference_scripts/f6WnrJvoNkfoNN9Y.js | 1 + reference_scripts/f7WZvYle9iqefRsh.js | 1 + reference_scripts/f8cnfvGKJH3bYVGN.js | 1 + reference_scripts/fEFfHFeJxkR0aIJK.js | 5 + reference_scripts/fEyKQqCjDwml3DXO.js | 2 + reference_scripts/fFGuTi0HLjwneMcJ.js | 1 + reference_scripts/fIUxKZMWJ8HMPmH9.js | 1 + reference_scripts/fKzlu6fFE2th9uIJ.js | 1 + reference_scripts/fP2edYbj6QjPPAjL.js | 1 + reference_scripts/fPKYkBllp7Et62lX.js | 4 + reference_scripts/fY0TsQwnU14fdPl2.js | 1 + reference_scripts/fYLSe6CrYciap5y8.js | 84 +++++++ reference_scripts/faRFSsrQylQRZFLk.js | 1 + reference_scripts/fcY3pa72dELnOFXV.js | 1 + reference_scripts/feMPZhhFeXRtKdKY.js | 10 + reference_scripts/ffvcCEazZBinHlUX.js | 1 + reference_scripts/fiF9sM5UpcHMYa33.js | 4 + reference_scripts/fkFmNcesqqNTMhVn.js | 4 + reference_scripts/fl762icfKrt9ear2.js | 1 + reference_scripts/ft0LaRWZT5WtnptP.js | 13 ++ reference_scripts/fve7tiyF5X9B7mHJ.js | 1 + reference_scripts/fzTB7t3x4bLmAXji.js | 5 + reference_scripts/g07HI7vyqiFXPB0o.js | 29 +++ reference_scripts/g0SzfsLyW7aD2F19.js | 13 ++ reference_scripts/g1L8OYO9nCOhdKGL.js | 16 ++ reference_scripts/g4t56A09yrpZaJQ2.js | 23 ++ reference_scripts/gFUXBbTskQBKjxqm.js | 8 + reference_scripts/gKIPujyuFSn0No9v.js | 5 + reference_scripts/gKPL3t4vlZAsvtGr.js | 1 + reference_scripts/gL0ftUnK5TNXBRRt.js | 1 + reference_scripts/gPQrszvIgGlW9yM4.js | 2 + reference_scripts/gVpFUka7qfGiEC1v.js | 1 + reference_scripts/ga6bQzPuoIiQQrKg.js | 11 + reference_scripts/gbhxWXboV9CytWNU.js | 1 + reference_scripts/gh2KS1prBKcsSK6M.js | 2 + reference_scripts/gnVpxOeBZpNF4HIF.js | 4 + reference_scripts/gpPaCe6yER79l4u8.js | 2 + reference_scripts/gpuBg3y9rocJL7yT.js | 1 + reference_scripts/gqZLfIr6svrtdwdC.js | 1 + reference_scripts/gsCnd3mf1vXFU2ei.js | 1 + reference_scripts/gu72JaTs9GrSiVTd.js | 1 + reference_scripts/h0DfPwUUOBjyAHMZ.js | 1 + reference_scripts/h1XKoMuVnS0bagRO.js | 1 + reference_scripts/h766UvswLCsxcMow.js | 133 +++++++++++ reference_scripts/hA8PzeiCsHqqlUZm.js | 2 + reference_scripts/hCzxUyO6mjLNIpaM.js | 7 + reference_scripts/hDC6lroDEPVBituR.js | 12 + reference_scripts/hK0YMJfYbpbJZizO.js | 12 + reference_scripts/hObTbWi4ZdwXimIW.js | 4 + reference_scripts/hR1qD2kpFHF8JT8h.js | 1 + reference_scripts/hSlEY2oh8quVmdXR.js | 4 + reference_scripts/hZAax4emLahEEqcZ.js | 5 + reference_scripts/hfO4INH3EeETDTFt.js | 1 + reference_scripts/hhCs5VBKx50S5IsY.js | 1 + reference_scripts/hhv7PrRdlf9sfC82.js | 84 +++++++ reference_scripts/hlHKeFWrOA8CsLr9.js | 2 + reference_scripts/hluehsCuBZYc1Ejt.js | 1 + reference_scripts/hmk8zV1LTElHUI8A.js | 8 + reference_scripts/hnsmzvcuiUYB065I.js | 1 + reference_scripts/hpwJRAhCsXTp9bd9.js | 115 ++++++++++ reference_scripts/hwHpIunCq3ifk2QU.js | 8 + reference_scripts/hwOZxgt7e65iWvYz.js | 8 + reference_scripts/hxmwtw5zAHyS2upG.js | 1 + reference_scripts/i59IpmZNLJEPWZ3L.js | 1 + reference_scripts/i5AN97A7IOeygEFA.js | 7 + reference_scripts/i7xl0jNpLnBT2h2l.js | 1 + reference_scripts/iAo3wxMLA64rsKjj.js | 1 + reference_scripts/iBEPQ3NwtI9DfkEy.js | 14 ++ reference_scripts/iHn3YzvqNfbwzjZz.js | 6 + reference_scripts/iLpq4yCFN6YACrYA.js | 4 + reference_scripts/iM4B3IZ4VtpZsl09.js | 1 + reference_scripts/iM6JLF8jDXMViReZ.js | 1 + reference_scripts/iMDZLr7ueJWBnilj.js | 1 + reference_scripts/iMu8BZ7eHMAbPEO1.js | 5 + reference_scripts/iNAQJa5HyaEckknX.js | 18 ++ reference_scripts/iT0h3VZLEBQnn5Bx.js | 1 + reference_scripts/iT3C15fMyQrj1RmG.js | 8 + reference_scripts/iVhi3Z6zPaf1bf8g.js | 1 + reference_scripts/iX0ctHYHg12pjaCU.js | 15 ++ reference_scripts/id9ZdkERMZnZTWXt.js | 7 + reference_scripts/igVAVU7DOuzhNG14.js | 1 + reference_scripts/imKVsCy8rya2gkwO.js | 18 ++ reference_scripts/inPxRSx0CDj1nwAm.js | 4 + reference_scripts/ioeTj5mx8jlA5EX5.js | 1 + reference_scripts/ipkkRffJh61WE7zR.js | 5 + reference_scripts/iuSoKntfJ4eAPafQ.js | 8 + reference_scripts/iuYuf05BNuZ5fllI.js | 4 + reference_scripts/j1AmrY1SxFJQyapo.js | 4 + reference_scripts/j3zDMWkns32Yrxn3.js | 1 + reference_scripts/j6Bf1iivH8cqSnnK.js | 2 + reference_scripts/j98hvy6r9G2Vjmid.js | 12 + reference_scripts/jC8o5PbnqEvOoZ9N.js | 1 + reference_scripts/jFwema0iwzBphxie.js | 9 + reference_scripts/jGDk7avWFSnyFoql.js | 9 + reference_scripts/jHgxpe6TJDlP3oTn.js | 9 + reference_scripts/jLsL4KRI6LEG9Ii2.js | 5 + reference_scripts/jObJanFoev4N6ZRv.js | 2 + reference_scripts/jRSgPhpfN7MH7TTp.js | 16 ++ reference_scripts/jW87rmQLtROdVEhW.js | 5 + reference_scripts/jWkfoVpHLiRaHTza.js | 4 + reference_scripts/jYJRO5XPyG7y6fih.js | 3 + reference_scripts/jbZPLb4wuqJpHLUx.js | 1 + reference_scripts/jdS2u1tQPYeO55WI.js | 61 +++++ reference_scripts/jfk5VDKMTIf4ee0v.js | 2 + reference_scripts/jgO1Kf60Ctt6R0qO.js | 1 + reference_scripts/jmxlpyLrIuoxQtvU.js | 1 + reference_scripts/jpcU8FFWSlQ3gD0L.js | 1 + reference_scripts/jrvj7bRyMBB9LixP.js | 1 + reference_scripts/jsgLEVYvMieyYT6L.js | 18 ++ reference_scripts/k3FqFgsF6a3TkxAD.js | 3 + reference_scripts/k8TC0yzp4xfOXD2n.js | 10 + reference_scripts/k9SvH4Lm3ZuI8S1N.js | 1 + reference_scripts/kBXVEnSWzaQZLkJH.js | 5 + reference_scripts/kIM4Fs1lFVV7TSnj.js | 1 + reference_scripts/kMSdRskYDI2J1gnp.js | 7 + reference_scripts/kWynO1lQzjiSs8RK.js | 1 + reference_scripts/kYiDBPRKIokFkr4Z.js | 4 + reference_scripts/kYmscP2HuXjDovBD.js | 1 + reference_scripts/kiJ6AiaYVUjt6aV6.js | 7 + reference_scripts/kkC5EhqA05U6U0gU.js | 17 ++ reference_scripts/kmsGLWGxCY8Z8jVG.js | 1 + reference_scripts/kvaN100w0nBUlLbj.js | 6 + reference_scripts/l8qFKSnMpy4P7XQR.js | 1 + reference_scripts/lCOdnKz8XpnkDs6Q.js | 2 + reference_scripts/lFO6XdfUODmFArqx.js | 1 + reference_scripts/lII4KMRblqwFBlsV.js | 133 +++++++++++ reference_scripts/lOzkngzye4RmvALp.js | 3 + reference_scripts/lPudo1grrVp05i7a.js | 11 + reference_scripts/lQJ68n3y1xDyNicE.js | 1 + reference_scripts/lSOAZ4FG44bT4jh1.js | 7 + reference_scripts/lU4s3UTtBkU38djI.js | 4 + reference_scripts/lYYkGzqNshiYc7WI.js | 6 + reference_scripts/laptAldsT0Fm1rDt.js | 6 + reference_scripts/lhemR8EP5tGNKout.js | 14 ++ reference_scripts/ljpM7muMyxGD04EX.js | 3 + reference_scripts/lol5J6h0pErzM71s.js | 1 + reference_scripts/lvjcddwRiN9iGruy.js | 38 ++++ reference_scripts/lwVhn4bSXJ3eoT9q.js | 8 + reference_scripts/m3qEVO5fseV6KHXa.js | 4 + reference_scripts/m58MpMZBblpq5LJu.js | 2 + reference_scripts/m8qBlbH7ROoqa22o.js | 1 + reference_scripts/mBcLf11upaHS8AQq.js | 1 + reference_scripts/mJ9eMPub4epJSf00.js | 1 + reference_scripts/mPxmCsXYirAIT913.js | 3 + reference_scripts/mRvLsSVxNyt8LVZb.js | 4 + reference_scripts/mTnmPcjWmvScIBWY.js | 1 + reference_scripts/mV4Tmc0yfpL09KV7.js | 1 + reference_scripts/mYL4i1vNlMl4vFYy.js | 1 + reference_scripts/ma0sWhebqwdRHWvY.js | 5 + reference_scripts/maKr58mvvyKxFyC3.js | 2 + reference_scripts/masOBNgSi5HYkf3m.js | 1 + reference_scripts/mgLGN1XPzPE4dReN.js | 1 + reference_scripts/mr8qm5Bg6k1idZ6Q.js | 1 + reference_scripts/mziJBUYcsrhkdcCJ.js | 6 + reference_scripts/n5RJqJL9fdRIxkuN.js | 12 + reference_scripts/nCWAflBj7Si2BI1Q.js | 4 + reference_scripts/nD2QVg3DrPK3foMf.js | 7 + reference_scripts/nEaF3jbCiVYD8jia.js | 1 + reference_scripts/nGTxNWBUBgTr87wU.js | 5 + reference_scripts/nHJdlqbOP0ECgywb.js | 3 + reference_scripts/nSXzktHyNjGUXjaw.js | 1 + reference_scripts/nYtAjSArsNbrU2ob.js | 8 + reference_scripts/naF5EWr1CBkYRZTK.js | 26 +++ reference_scripts/ncIjDE6TFx88IQA1.js | 1 + reference_scripts/neaaVy6D6tfcst5P.js | 1 + reference_scripts/ngMm7SgtVqVovFJG.js | 4 + reference_scripts/njPP9wDAsdh4WHIj.js | 4 + reference_scripts/nkbTnaeBpthyhw4J.js | 6 + reference_scripts/nkdKBJ8ItqWiRAWL.js | 21 ++ reference_scripts/nuIpPD4uaZRuJni8.js | 3 + reference_scripts/nvrFhHHVq3KzirlR.js | 1 + reference_scripts/nxNqWmmF6mJTnrLo.js | 1 + reference_scripts/nzh8d46l1ikhkz8Q.js | 1 + reference_scripts/o1zD8mej9TWKNxUq.js | 1 + reference_scripts/o3JUBKLvE6bBxK2n.js | 20 ++ reference_scripts/o88xuUConwt0vFLw.js | 5 + reference_scripts/oDNfCNyt5KaUYmg2.js | 10 + reference_scripts/oEsUsI74yGTZ9CwU.js | 1 + reference_scripts/oGdsGPgJWcyWkiWl.js | 6 + reference_scripts/oHenUKtaS3jT5xQn.js | 4 + reference_scripts/oPg4se8iQRD14kmB.js | 27 +++ reference_scripts/oV81zgbZsuTFG6L2.js | 5 + reference_scripts/oW1gtYVT5nrxDjM7.js | 1 + reference_scripts/oWM43EdUiyHgUlfW.js | 2 + reference_scripts/oWa7RkScnl6lR5vd.js | 11 + reference_scripts/obIXhQXKFyyQoNNV.js | 7 + reference_scripts/ocBW3osTFnb5JCfe.js | 3 + reference_scripts/ofddAHvzn1xUueSG.js | 15 ++ reference_scripts/ogJBAXTXyhTqACPO.js | 1 + reference_scripts/ohl803m0tUwNfKAk.js | 4 + reference_scripts/okW06V9UiPC4Vcrn.js | 86 +++++++ reference_scripts/okr3TtzpFoefUuJS.js | 4 + reference_scripts/oqgd9G6oI1ncPYLw.js | 2 + reference_scripts/p222EiR8RRtlPm31.js | 3 + reference_scripts/pAgiAGyaLJY10894.js | 1 + reference_scripts/pBMioPUtDn1mk9f5.js | 3 + reference_scripts/pG5OVokZzCRHIrwz.js | 3 + reference_scripts/pHyXdPnWwoFrUA5n.js | 1 + reference_scripts/pLKv4moua6XhNdmA.js | 4 + reference_scripts/pNPjXEoQGHLKzq0r.js | 12 + reference_scripts/pPV9oEydXb7oi6jX.js | 4 + reference_scripts/pR4Q2OnPxXtwRVli.js | 12 + reference_scripts/pnB9TzSEytkxk3Rb.js | 1 + reference_scripts/pq1YQffxtOcqCRTn.js | 6 + reference_scripts/px7eEdhOEt7zOTrq.js | 1 + reference_scripts/pzimrxrqpv282Oqb.js | 2 + reference_scripts/pzknBcJtZWeliE27.js | 1 + reference_scripts/q0LvphC8RDSyR0oY.js | 8 + reference_scripts/q3nRyXaxksdCiLFM.js | 3 + reference_scripts/qAEZgtu5CrfUkxhx.js | 16 ++ reference_scripts/qK4q4o6cQhcGzFX3.js | 7 + reference_scripts/qSwCYMMiIHmSV1X5.js | 13 ++ reference_scripts/qT0WBPxLMMO9gvCd.js | 4 + reference_scripts/qUwnVlWpsmDom3RK.js | 1 + reference_scripts/qZschZU0nee0kJlk.js | 1 + reference_scripts/qaVde0sTuMBRi2nl.js | 1 + reference_scripts/qcyl98GYD55BkJsD.js | 2 + reference_scripts/qijgjcOBCDmhglRX.js | 1 + reference_scripts/qjli5evn8UA9uTeZ.js | 1 + reference_scripts/qmOt7h17hGAKqQe0.js | 24 ++ reference_scripts/qu194dVXm9Vx1TGk.js | 10 + reference_scripts/quPcuKsq2fcild4a.js | 6 + reference_scripts/qxzhPtysAjPWspKf.js | 4 + reference_scripts/r6hi5vMdLhTaaPfb.js | 1 + reference_scripts/rCh3ltUrUMovd2Kc.js | 5 + reference_scripts/rF0Z3hTUUnSxL3Mq.js | 37 +++ reference_scripts/rIISfbCShejmJNKw.js | 3 + reference_scripts/rLMaVNEGdZ6xj5Au.js | 1 + reference_scripts/rRfff55c7elyvbCb.js | 1 + reference_scripts/rUGSx06BuBvX9kgf.js | 9 + reference_scripts/rVpPNILEzWL9lj6b.js | 4 + reference_scripts/rXMylpnEtZpwou6x.js | 8 + reference_scripts/ramav4ymrDDkPKK4.js | 9 + reference_scripts/ratP9ByLjQPiLlFK.js | 1 + reference_scripts/rdaMhMyHrJjQ6vVC.js | 1 + reference_scripts/re1UFtxvRRjpPB7Z.js | 13 ++ reference_scripts/red2bt4PGgIWAdTR.js | 14 ++ reference_scripts/rgSwSeB3shIMVMb6.js | 3 + reference_scripts/rnioLwiJP7ps5Jwy.js | 4 + reference_scripts/roKvPHDSpX4IV11C.js | 1 + reference_scripts/rpxQU26BU7nwjtqY.js | 20 ++ reference_scripts/rr4htuVq45onXdRG.js | 2 + reference_scripts/rxB1AqfVMDqTRieE.js | 1 + reference_scripts/s0kTuDE0qv68V2KI.js | 1 + reference_scripts/s5bO0Sf0qpS27Tve.js | 2 + reference_scripts/s6eZXfZkC1My6EXl.js | 5 + reference_scripts/s7gJQdzuM3fz2zQK.js | 11 + reference_scripts/s8idWt9YdMTRfnjV.js | 5 + reference_scripts/s8xU6OOZbbfo6VIw.js | 1 + reference_scripts/s94yKZ4o5XN4JWM1.js | 6 + reference_scripts/sAVpm7hFRHpbCLXm.js | 1 + reference_scripts/sB4KB9bT3nQhAoqG.js | 14 ++ reference_scripts/sHfkTRqTWPg2JAGN.js | 2 + reference_scripts/sKO8TcLIkCTnFvXu.js | 2 + reference_scripts/sNSfDBIA2k17hPYI.js | 6 + reference_scripts/sSMg43ZjnNmpytfj.js | 2 + reference_scripts/sUHuj00IpoZ7Gd03.js | 1 + reference_scripts/sWyO1DNaqb2EdHoW.js | 11 + reference_scripts/sYlGRLApZ3Ub24ea.js | 1 + reference_scripts/sZwLitzwKBTaFca3.js | 4 + reference_scripts/sagKJM6oDFlw4ED2.js | 3 + reference_scripts/sbK1a7txpSoXFzyB.js | 10 + reference_scripts/scfm5iWWBxWI6QaK.js | 6 + reference_scripts/sgS9rblPkQB36C8S.js | 29 +++ reference_scripts/shkBUtUuMPDKvFm7.js | 10 + reference_scripts/skVq3eDEYKFF2iZp.js | 2 + reference_scripts/sm9d5lk6cM0OuUkf.js | 1 + reference_scripts/sx7Ikn8WW00gBFb4.js | 32 +++ reference_scripts/syBgPp7rOymCZejX.js | 6 + reference_scripts/syqqBkyP5tGqZ78t.js | 8 + reference_scripts/t48hkacYdOpzWvK9.js | 1 + reference_scripts/t56mnblo1kv3gM1M.js | 1 + reference_scripts/t8LYOuN5peEdWeXP.js | 3 + reference_scripts/tCIT1a12Gt6k2ohA.js | 21 ++ reference_scripts/tDrs0aNIYmZPsOoS.js | 6 + reference_scripts/tFAKRRRfTjQfdQz3.js | 1 + reference_scripts/tG1qGqzBLmAR3WHm.js | 15 ++ reference_scripts/tGVEV6TLl310mFLP.js | 7 + reference_scripts/tKBq1nGZo8t6vvQ6.js | 2 + reference_scripts/tNTO1LVN7JqHf4YN.js | 8 + reference_scripts/tUwP7TjrOOOnaCYJ.js | 10 + reference_scripts/tcZug8ehU6lyYBd9.js | 1 + reference_scripts/tdICiJ26rJrDbxT6.js | 1 + reference_scripts/tn6SwmjAuNzqE6dx.js | 14 ++ reference_scripts/tnE8LF6E3svIlLca.js | 1 + reference_scripts/tnilBagajWM8UGQt.js | 1 + reference_scripts/toSrgcvWq9b5eN0K.js | 4 + reference_scripts/tolkNN5P7oOC8GKZ.js | 11 + reference_scripts/u3olS2p7Ls1JXfAH.js | 1 + reference_scripts/u5dNZ0s3lWfL8KFb.js | 1 + reference_scripts/u6CYMSZADrfXd48Q.js | 1 + reference_scripts/uACa6u4JLNMRgFlr.js | 2 + reference_scripts/uAy4w7y8Uu9POF8C.js | 1 + reference_scripts/uLBDnWC3S0lRitbj.js | 22 ++ reference_scripts/uNYstk3eXmWamhzs.js | 1 + reference_scripts/uOHAsKlkFuIaAmjb.js | 1 + reference_scripts/uSwkYENTOcnfRrqA.js | 1 + reference_scripts/ucF4aiJ1gpDB333G.js | 5 + reference_scripts/ugL5IBB6R2yWyMWd.js | 23 ++ reference_scripts/upfK6GM33qZCZjll.js | 1 + reference_scripts/uwdQvZtzy2HVeEzx.js | 14 ++ reference_scripts/ux3jaLpAUhZ5YqA6.js | 1 + reference_scripts/v00nVCRKqqRvY28t.js | 6 + reference_scripts/v4CCxVaVGf9i8U7X.js | 24 ++ reference_scripts/v4ITTsSY9EvCbhZP.js | 2 + reference_scripts/v5xrDWcrTNFJkyQB.js | 90 ++++++++ reference_scripts/v6LIG7EwWYALxCpP.js | 1 + reference_scripts/vFUVWZ1l8wpTjLcx.js | 14 ++ reference_scripts/vJQRBxDfPwHens0a.js | 11 + reference_scripts/vM2BPwYhHQaBAt2C.js | 3 + reference_scripts/vNp9wgdSvnNEjZyS.js | 1 + reference_scripts/vPG4rV640aSzKzxe.js | 1 + reference_scripts/vS2D9QUslR7ZtXXm.js | 9 + reference_scripts/vSDMygIT9nNvEGWG.js | 13 ++ reference_scripts/vY3xeTTL3ghPrJpN.js | 1 + reference_scripts/vZ5HCrhY8e4R1TrG.js | 3 + reference_scripts/vc4bELo0cWYoILfB.js | 4 + reference_scripts/vc8eVKtyjtOGvWlK.js | 4 + reference_scripts/vcM0IgsYVmfWrlO3.js | 3 + reference_scripts/vgfs0DXvF5iKrz1M.js | 1 + reference_scripts/vj3zArmX27vCxYJW.js | 1 + reference_scripts/vjyTKcNrJzX4XWnS.js | 4 + reference_scripts/vuzRRj5d9XdNYx3o.js | 6 + reference_scripts/vvVhAqreedtmOR9b.js | 2 + reference_scripts/vvdo1NxjmGVkmFCT.js | 24 ++ reference_scripts/vzMxIDjRlQSxXtCW.js | 11 + reference_scripts/w3r54pKZQKaH2Yer.js | 8 + reference_scripts/w4JKuTECFmu3YmTR.js | 1 + reference_scripts/w4zubIHP0XgMXsFe.js | 1 + reference_scripts/w7K0lbxQKJ2tsc6f.js | 4 + reference_scripts/wAETU6aTRr9d4oCU.js | 1 + reference_scripts/wAntJhgb8Og5vJXh.js | 1 + reference_scripts/wS6OIR3QN4mOUHn0.js | 12 + reference_scripts/wUlYLBT59Efys5aS.js | 1 + reference_scripts/wbM7tpw4TxvadcWm.js | 19 ++ reference_scripts/whUSkaR1yem21bXp.js | 133 +++++++++++ reference_scripts/wsqNM4NHnwaAAQym.js | 11 + reference_scripts/wyTCozh9qGTx6yK0.js | 5 + reference_scripts/wzkxiKjxVEeNS1di.js | 11 + reference_scripts/x2RLUUNB7BiIDYCP.js | 16 ++ reference_scripts/x76tKw4L8dX00ikE.js | 5 + reference_scripts/x8XK2fzzXCnSwfjt.js | 7 + reference_scripts/x9G6Du5EWV6byf4C.js | 8 + reference_scripts/x9iKFYYc4Ocy8PTS.js | 30 +++ reference_scripts/xBpLQa7yBPczDMY8.js | 7 + reference_scripts/xIRU2SaqLeWmqGDI.js | 4 + reference_scripts/xL4S0H1RP8hhXW7c.js | 3 + reference_scripts/xLKAuD6yzwjAL6tJ.js | 1 + reference_scripts/xMhhVol8Is3DJ3gb.js | 5 + reference_scripts/xPDMpOvC1ZBVxrNg.js | 1 + reference_scripts/xPwa3NftkpMBc2AO.js | 1 + reference_scripts/xQ3xR2Wf0wHFa76H.js | 1 + reference_scripts/xQnoRTHotZKrwPrx.js | 1 + reference_scripts/xRTmMwNfdirjsi8X.js | 3 + reference_scripts/xRd6oA1QWLVpfoBm.js | 6 + reference_scripts/xS2su09zcza9du09.js | 8 + reference_scripts/xUpKYT7BZCSmAfUy.js | 10 + reference_scripts/xYTkj8jhSVOSoLbC.js | 1 + reference_scripts/xcy5GOUSZ0meIejZ.js | 4 + reference_scripts/xgdhf0wlNP2cHIQx.js | 1 + reference_scripts/xgplXZMs459X7XXM.js | 21 ++ reference_scripts/xklncIMwQIespDxS.js | 8 + reference_scripts/xnHobI9HojObLHMp.js | 2 + reference_scripts/xobGBJbgFjQCrwvq.js | 17 ++ reference_scripts/xpgXWoK2zDnG1uiF.js | 31 +++ reference_scripts/xq3RANOtmPhy77ne.js | 1 + reference_scripts/xqWxV9w5ezBQdJkZ.js | 1 + reference_scripts/xvGxwv7X0Vq3vNqb.js | 1 + reference_scripts/xvH4PKJasHcehOZz.js | 1 + reference_scripts/y3agVFVBR8tVqWyx.js | 2 + reference_scripts/yAL0YwZWVm8o1nxa.js | 6 + reference_scripts/yCgH3N9AurIiAv0i.js | 29 +++ reference_scripts/yDvxF9llUYwJg0sE.js | 22 ++ reference_scripts/yFMvxecXAZ6T2O0S.js | 9 + reference_scripts/yIGItnshXI4W46cp.js | 1 + reference_scripts/yMMzZ7daCqRlGT3N.js | 5 + reference_scripts/yPxYRObUiqAIhlNB.js | 1 + reference_scripts/yRRzSKlcN3L7rEEe.js | 1 + reference_scripts/yTmRoUstxHMso91c.js | 4 + reference_scripts/yXUPiWuQ5o0JBY4i.js | 1 + reference_scripts/yatUu0cd7iKs50rq.js | 1 + reference_scripts/ybxDG2ezvRx02LYx.js | 1 + reference_scripts/ynNCBAYwJFkTiXV1.js | 1 + reference_scripts/ynV7tz0OdCwlsQp6.js | 6 + reference_scripts/ynoHNXXCGRS6fTqF.js | 26 +++ reference_scripts/yzN7ZNlgCiSVJqsU.js | 7 + reference_scripts/z5HfNUrHy5MS3K7a.js | 7 + reference_scripts/z926Cl2vxUfyLY0V.js | 4 + reference_scripts/z9NEbIUBsKMaTuCz.js | 4 + reference_scripts/zA6TDttpwMSMl7D8.js | 14 ++ reference_scripts/zBHTIBU8OlYj1YIO.js | 1 + reference_scripts/zFYCaGR0wbFWjl4T.js | 1 + reference_scripts/zK38Rl5t9zbFi4Se.js | 5 + reference_scripts/zR4WAjzXHTZuiu5G.js | 52 +++++ reference_scripts/zUv9e0A3OEXWY9Mv.js | 4 + reference_scripts/zY4ZjY7uyKIKMYmX.js | 8 + reference_scripts/zadppy7FEbXvgUON.js | 84 +++++++ reference_scripts/zi8Z3NlwVj3IfgAW.js | 10 + reference_scripts/ziG9H5Kdb7xC3dFE.js | 1 + reference_scripts/zk44dFEGkylB7kW6.js | 9 + reference_scripts/zphxI8VSWbNQCMBy.js | 1 + reference_scripts/zqShIJnrRReGgP94.js | 15 ++ reference_scripts/zsiV6XEHlCNGLLPl.js | 1 + reference_scripts/zsoTVkHe4nHY1M52.js | 1 + reference_scripts/zzk2uRSFjFHB5kjw.js | 9 + scripts/OGX4BneaYAnV25TO.js | 12 +- scripts/OicQSEVZBbqLtrcf.js | 4 +- scripts/Op88kMtimSEWlY2h.js | 2 +- scripts/OqLKL0PiCvYH2QxW.js | 2 +- scripts/OxsBnnVI3Smpknpb.js | 2 +- scripts/PMISUsaEDBA7D3od.js | 10 +- scripts/PVjaKAHTKDA0rA9J.js | 2 +- scripts/PeZYj8b0vedyJj00.js | 6 +- scripts/Ph3TdQw1lGiFr049.js | 4 +- scripts/PwqTmw7rsG8hzqCS.js | 2 +- scripts/Q4EQgP4gZR8TTm7S.js | 2 +- scripts/Q68WiUWY7GxiXBbT.js | 2 +- scripts/QRSACifDrvojIXHB.js | 4 +- scripts/Qgn92fZyc3Psn8QJ.js | 7 +- scripts/QoEOxRruQXYrZrv3.js | 2 +- scripts/QwHoqu2oO8QO8Mad.js | 2 +- scripts/R32U01LBjBrK1pns.js | 6 +- scripts/RDtJXji3hgcKnEBk.js | 2 +- scripts/RHyBLYT5oHf7EPnG.js | 4 +- scripts/RKIFGN583PQnqHGk.js | 2 +- scripts/ROXCqAFSTLouJniL.js | 2 +- scripts/RSsGiDFibuqg3sHr.js | 2 +- scripts/RrchOMpEdIvceJxl.js | 2 +- scripts/RvipIYj9H7n4UDMe.js | 4 +- scripts/S1QihXuvdEVzeRtB.js | 2 +- scripts/S3Dev4hleOYqDNe9.js | 4 +- scripts/SGr50Hq1AHIEzIFN.js | 2 +- scripts/T5fiTzhXEQAv9Drf.js | 2 +- scripts/TAw9vXnfyIAl5DGs.js | 2 +- scripts/TBpNFRL5uehs0fze.js | 2 +- scripts/TwgdEucxcHloc4cX.js | 214 +++++++++--------- scripts/U1UpSRJOSjPpO4HS.js | 4 +- scripts/U26XMie3Kjoddisj.js | 4 +- scripts/U4A8FDNmwBGTuQZO.js | 4 +- scripts/U9xh2wriSqCosugW.js | 2 +- scripts/ULmZMLezDamerN04.js | 8 +- scripts/UTlgF4azrGQZsoDv.js | 2 +- scripts/UaImulhbPURkLJg2.js | 2 +- scripts/UgQW0UMPOZ0jwfVJ.js | 2 +- scripts/UnqnWi0dZYLf5fTT.js | 64 +++--- scripts/V1D2Uo3WDKYQePU3.js | 2 +- scripts/V9wD9FWHWxZUOGSI.js | 4 +- scripts/V9xm4X1x3lPYTQaI.js | 2 +- scripts/V9zm2hKUVLVZtAcN.js | 14 +- scripts/VNOKTzCrFbZ6PJUj.js | 2 +- scripts/VbL0TgaBAmYjrezZ.js | 2 +- scripts/VlFUDaKUYoBYKYn0.js | 2 +- scripts/VqTrKPtxv9hpn0Hr.js | 2 +- scripts/VzO0ZDcTWvaBn4vm.js | 2 +- scripts/W9nyUNQStMr1pUHJ.js | 4 +- scripts/WB6sIpLEPC8YPX67.js | 2 +- scripts/WO5n7Vbx8AgoVrwC.js | 8 +- scripts/WiYtNU2Y5BJfIpeM.js | 2 +- scripts/XO9m2AvFRAAeEuty.js | 2 +- scripts/XcvDYNZgJ2rpAdDV.js | 11 +- scripts/Xe8ijqWU3bbtq7ZY.js | 2 +- scripts/Y8J66v8VTKUASGuK.js | 4 +- scripts/YDqpKJVy8ijEKdLX.js | 2 +- scripts/YQ2LnLxp0xgy3meI.js | 2 +- scripts/YRUTliBzAQvncGNX.js | 2 +- scripts/YaKnYEbmmZZtByJc.js | 2 +- scripts/YwLEw4BiKq4EMy57.js | 4 +- scripts/Z52yZDm6lP6fOP3O.js | 2 +- scripts/Z6OmmC0irJzxSnMH.js | 8 +- scripts/Z6jNlyZMECkW4Hon.js | 6 +- scripts/ZCuOjLAeENKN1Q4L.js | 4 +- scripts/ZNW3ubbKIYXAyE48.js | 6 +- scripts/ZNu4B0OdjkM9lmtu.js | 2 +- scripts/Ze9E2zR1GFGWGMVH.js | 2 +- scripts/oPg4se8iQRD14kmB.js | 2 +- scripts/oV81zgbZsuTFG6L2.js | 2 +- scripts/oWa7RkScnl6lR5vd.js | 2 +- scripts/okW06V9UiPC4Vcrn.js | 10 +- scripts/pNPjXEoQGHLKzq0r.js | 2 +- scripts/pR4Q2OnPxXtwRVli.js | 4 +- scripts/q0LvphC8RDSyR0oY.js | 2 +- scripts/qAEZgtu5CrfUkxhx.js | 4 +- scripts/qT0WBPxLMMO9gvCd.js | 2 +- scripts/qmOt7h17hGAKqQe0.js | 6 +- scripts/qu194dVXm9Vx1TGk.js | 14 +- scripts/qxzhPtysAjPWspKf.js | 4 +- scripts/rCh3ltUrUMovd2Kc.js | 2 +- scripts/rF0Z3hTUUnSxL3Mq.js | 8 +- scripts/ramav4ymrDDkPKK4.js | 4 +- scripts/red2bt4PGgIWAdTR.js | 4 +- scripts/rnioLwiJP7ps5Jwy.js | 2 +- scripts/rpxQU26BU7nwjtqY.js | 4 +- scripts/sB4KB9bT3nQhAoqG.js | 6 +- scripts/sKO8TcLIkCTnFvXu.js | 2 +- scripts/sNSfDBIA2k17hPYI.js | 2 +- scripts/sWyO1DNaqb2EdHoW.js | 2 +- scripts/sZwLitzwKBTaFca3.js | 2 +- scripts/sbK1a7txpSoXFzyB.js | 14 +- scripts/sgS9rblPkQB36C8S.js | 4 +- scripts/shkBUtUuMPDKvFm7.js | 4 +- scripts/sx7Ikn8WW00gBFb4.js | 8 +- scripts/syqqBkyP5tGqZ78t.js | 4 +- scripts/t56mnblo1kv3gM1M.js | 2 +- scripts/tCIT1a12Gt6k2ohA.js | 4 +- scripts/tGVEV6TLl310mFLP.js | 2 +- scripts/tNTO1LVN7JqHf4YN.js | 2 +- scripts/tUwP7TjrOOOnaCYJ.js | 4 +- scripts/tcZug8ehU6lyYBd9.js | 2 +- scripts/tn6SwmjAuNzqE6dx.js | 2 +- scripts/toSrgcvWq9b5eN0K.js | 2 +- scripts/uACa6u4JLNMRgFlr.js | 2 +- scripts/uLBDnWC3S0lRitbj.js | 2 +- scripts/ucF4aiJ1gpDB333G.js | 2 +- scripts/ugL5IBB6R2yWyMWd.js | 4 +- scripts/upfK6GM33qZCZjll.js | 2 +- scripts/uwdQvZtzy2HVeEzx.js | 2 +- scripts/v4CCxVaVGf9i8U7X.js | 4 +- scripts/v5xrDWcrTNFJkyQB.js | 14 +- scripts/vFUVWZ1l8wpTjLcx.js | 2 +- scripts/vSDMygIT9nNvEGWG.js | 2 +- scripts/vc4bELo0cWYoILfB.js | 4 +- scripts/vuzRRj5d9XdNYx3o.js | 2 +- scripts/vvdo1NxjmGVkmFCT.js | 2 +- scripts/wbM7tpw4TxvadcWm.js | 6 +- scripts/whUSkaR1yem21bXp.js | 12 +- scripts/wsqNM4NHnwaAAQym.js | 2 +- scripts/wyTCozh9qGTx6yK0.js | 2 +- scripts/x2RLUUNB7BiIDYCP.js | 4 +- scripts/x9iKFYYc4Ocy8PTS.js | 8 +- scripts/xRd6oA1QWLVpfoBm.js | 2 +- scripts/xS2su09zcza9du09.js | 4 +- scripts/xUpKYT7BZCSmAfUy.js | 2 +- scripts/xgplXZMs459X7XXM.js | 9 +- scripts/xobGBJbgFjQCrwvq.js | 4 +- scripts/yAL0YwZWVm8o1nxa.js | 2 +- scripts/yFMvxecXAZ6T2O0S.js | 2 +- scripts/yMMzZ7daCqRlGT3N.js | 2 +- scripts/yTmRoUstxHMso91c.js | 2 +- scripts/ynoHNXXCGRS6fTqF.js | 2 +- scripts/yzN7ZNlgCiSVJqsU.js | 2 +- scripts/z5HfNUrHy5MS3K7a.js | 2 +- scripts/zA6TDttpwMSMl7D8.js | 2 +- scripts/zK38Rl5t9zbFi4Se.js | 2 +- scripts/zR4WAjzXHTZuiu5G.js | 86 ++++--- scripts/zadppy7FEbXvgUON.js | 10 +- scripts/zi8Z3NlwVj3IfgAW.js | 2 +- scripts/zzk2uRSFjFHB5kjw.js | 15 +- 1421 files changed, 9940 insertions(+), 547 deletions(-) rename packs/aides-de-jeu-fr/{000699.log => 000703.log} (100%) rename packs/aides-de-jeu-fr/{MANIFEST-000697 => MANIFEST-000701} (71%) rename packs/antidotes-and-remedes/{000701.log => 000705.log} (100%) rename packs/antidotes-and-remedes/{MANIFEST-000699 => MANIFEST-000703} (71%) rename packs/apothicarium/{000699.log => 000703.log} (100%) rename packs/apothicarium/{MANIFEST-000697 => MANIFEST-000701} (71%) rename packs/dons-de-rhya/{000699.log => 000703.log} (100%) rename packs/dons-de-rhya/{MANIFEST-000697 => MANIFEST-000701} (71%) rename packs/plats-dauberges/{000699.log => 000703.log} (100%) rename packs/plats-dauberges/{MANIFEST-000697 => MANIFEST-000701} (83%) rename packs/tables-des-traductions/{000342.log => 000346.log} (100%) delete mode 100644 packs/tables-des-traductions/MANIFEST-000340 create mode 100644 packs/tables-des-traductions/MANIFEST-000344 create mode 100644 reference_scripts/00ZCnahnTGvzG9KA.js create mode 100644 reference_scripts/01VFjGVxkjb5P1ve.js create mode 100644 reference_scripts/03mJu59V4iByWlsO.js create mode 100644 reference_scripts/04bAiHISSW53w94Y.js create mode 100644 reference_scripts/06IaVCOC0RCJbxEf.js create mode 100644 reference_scripts/09sSpnW8z2zcVEdf.js create mode 100644 reference_scripts/0BP5l7bIkf744G1k.js create mode 100644 reference_scripts/0FNOq4J1AdPd2A0q.js create mode 100644 reference_scripts/0FWto1oEr3jbWggw.js create mode 100644 reference_scripts/0KG3HoTNoZhaINIj.js create mode 100644 reference_scripts/0LCQtsiK2aUfYRmD.js create mode 100644 reference_scripts/0R0QAr3D024kWPfo.js create mode 100644 reference_scripts/0Uly7OmkH0zqYbxQ.js create mode 100644 reference_scripts/0YKQGbsKdHSmYGE7.js create mode 100644 reference_scripts/0abwNjpzo3SbEOeO.js create mode 100644 reference_scripts/0e0UZT2FodOJDdgW.js create mode 100644 reference_scripts/0e7OkamNAaAk4Oit.js create mode 100644 reference_scripts/0iTLDgFHO9Rgc010.js create mode 100644 reference_scripts/0mrUnxzufYgsR0Ph.js create mode 100644 reference_scripts/0vaYwAlMWTmOBl8k.js create mode 100644 reference_scripts/0yyofYHeDRQlFliO.js create mode 100644 reference_scripts/11uCC0mK2uL783al.js create mode 100644 reference_scripts/16nCOByUaSFDym1V.js create mode 100644 reference_scripts/190PHSHKGaJ74wsR.js create mode 100644 reference_scripts/1A87vGLh2PXH0rG0.js create mode 100644 reference_scripts/1BT0MWM2cbhlEnrn.js create mode 100644 reference_scripts/1E47r2ba6IGe8uFK.js create mode 100644 reference_scripts/1IodsW9ImamYoEYz.js create mode 100644 reference_scripts/1JwxZujbDcueLWBL.js create mode 100644 reference_scripts/1LDm3OB32skZe6Xv.js create mode 100644 reference_scripts/1MDOKny7IirJPoI6.js create mode 100644 reference_scripts/1OpT3CXs07XFWWCT.js create mode 100644 reference_scripts/1PQPxFjmRlulHHzo.js create mode 100644 reference_scripts/1UalUmNzjB4rp3SZ.js create mode 100644 reference_scripts/1ZArMNUI8qqH6zkX.js create mode 100644 reference_scripts/1ZrzpfVwPJHdwp23.js create mode 100644 reference_scripts/1exiWlVUHsXDLLAH.js create mode 100644 reference_scripts/1fQr1Dg7DX0vfz3r.js create mode 100644 reference_scripts/1kB2su7hLRYDhZ2H.js create mode 100644 reference_scripts/1l7Jz2ZHbAWko7Vm.js create mode 100644 reference_scripts/1mNkLj9JYNr3ofC6.js create mode 100644 reference_scripts/1wEjrgff7ASxKVmy.js create mode 100644 reference_scripts/1wKVvxRTHOyV4Qdv.js create mode 100644 reference_scripts/1wrPvP6lJwIAfmsl.js create mode 100644 reference_scripts/1yOvw74jzFfaI87b.js create mode 100644 reference_scripts/22bW97lkvCqisfHX.js create mode 100644 reference_scripts/23HgjCB1oecxANvA.js create mode 100644 reference_scripts/23vWiHUjxtRQ3Efz.js create mode 100644 reference_scripts/2AOo7KUyzMrgIlgM.js create mode 100644 reference_scripts/2AdSBXw7IwCiqawQ.js create mode 100644 reference_scripts/2Cw5j0iGAnFNegWr.js create mode 100644 reference_scripts/2GYAd4OC888oQFBp.js create mode 100644 reference_scripts/2NLINicPQWbuvp2n.js create mode 100644 reference_scripts/2OqLHRqEBEjBm2LW.js create mode 100644 reference_scripts/2Qi1hwLYhdE6v6Hs.js create mode 100644 reference_scripts/2VNnVrtktdGUqXEV.js create mode 100644 reference_scripts/2W9uMTT6iJhfQ044.js create mode 100644 reference_scripts/2WBq5gW780C6zfCp.js create mode 100644 reference_scripts/2WSN306tL4apjRtD.js create mode 100644 reference_scripts/2cKarG9ToyW2ptCd.js create mode 100644 reference_scripts/2hzDv8ROulOe1elK.js create mode 100644 reference_scripts/2mFNelLOAQ6iJsZl.js create mode 100644 reference_scripts/2miWWeRrEpq1beG4.js create mode 100644 reference_scripts/2p9IK6Y5Z4NQD6FY.js create mode 100644 reference_scripts/2rzxQlL7A9ujZ9uK.js create mode 100644 reference_scripts/2sDH6RvoOAR40oqH.js create mode 100644 reference_scripts/2vTVR0quRZQtjNfQ.js create mode 100644 reference_scripts/2wk0yrRPlPsdqr3L.js create mode 100644 reference_scripts/2yctEihGmdCfTTVx.js create mode 100644 reference_scripts/2zeP2nMSURjxrqYz.js create mode 100644 reference_scripts/33PWizq5F7pkKnQT.js create mode 100644 reference_scripts/33US8YRgaMqYu2We.js create mode 100644 reference_scripts/37UN17gb8suFeZIW.js create mode 100644 reference_scripts/3Cn2TlRahlm5LkSj.js create mode 100644 reference_scripts/3D5ImpMgpOTPucvv.js create mode 100644 reference_scripts/3IGO7xEjRjat937X.js create mode 100644 reference_scripts/3JEzEzF1SeYA9lsV.js create mode 100644 reference_scripts/3LLiSgj6KGtgqcmo.js create mode 100644 reference_scripts/3R6Y4NpNTqPc83wh.js create mode 100644 reference_scripts/3TesBGh8HnlGuafu.js create mode 100644 reference_scripts/3Vbe6gdW8N0bIvXJ.js create mode 100644 reference_scripts/3aEzK0DehSHtVykd.js create mode 100644 reference_scripts/3eSaX0BeaUalNkEP.js create mode 100644 reference_scripts/3fdCQ3h3iVuhdDs9.js create mode 100644 reference_scripts/3hfMQkUKYI4rCuBy.js create mode 100644 reference_scripts/3jm0NoYpgB6ZuUSl.js create mode 100644 reference_scripts/3l7MQSa10Kve2K3P.js create mode 100644 reference_scripts/3plV9WFqs2prfAdp.js create mode 100644 reference_scripts/3sfD1nedXLzuYoXJ.js create mode 100644 reference_scripts/3tE8gFSl28EhCmo5.js create mode 100644 reference_scripts/454x3Q95pLvZm0Kx.js create mode 100644 reference_scripts/4FGKZk2f0xrmIDnp.js create mode 100644 reference_scripts/4HN98hMdQJxM35pA.js create mode 100644 reference_scripts/4JVIy5xtVwvadoqv.js create mode 100644 reference_scripts/4MQ7u4INxp51oyyR.js create mode 100644 reference_scripts/4QoxhoekgVeZcQA7.js create mode 100644 reference_scripts/4XrAeL2DitxE8OaK.js create mode 100644 reference_scripts/4cOZzUvu1nytcqNn.js create mode 100644 reference_scripts/4fnTKgl0HW9ZrWyJ.js create mode 100644 reference_scripts/4gkz3LR7CK1b8ulK.js create mode 100644 reference_scripts/4iuTz0uInAfMaoGl.js create mode 100644 reference_scripts/4pQW4WLyhjbZR85k.js create mode 100644 reference_scripts/4rTmV3TNxctUe0ly.js create mode 100644 reference_scripts/4rb7LfMq9CTnlrpn.js create mode 100644 reference_scripts/4rhxLzau7jZ4SDxg.js create mode 100644 reference_scripts/52kbfuWrOh6dsTtd.js create mode 100644 reference_scripts/52mwb33mGrQjq89B.js create mode 100644 reference_scripts/53HFDNuMnX1Aw1a4.js create mode 100644 reference_scripts/58rFc9HiBoX66J6p.js create mode 100644 reference_scripts/5DI6cHAg1LHo54Yv.js create mode 100644 reference_scripts/5Fe1ELaS6Gnvy0Cj.js create mode 100644 reference_scripts/5IoYTyedCMYwt3ys.js create mode 100644 reference_scripts/5JWC0l3JEpOsqbR9.js create mode 100644 reference_scripts/5JvKJZPcd6Hz5zvn.js create mode 100644 reference_scripts/5LdJCKfQem1AQK24.js create mode 100644 reference_scripts/5M6IgCUncCwyxHok.js create mode 100644 reference_scripts/5MxRDXzUBPfp2KKD.js create mode 100644 reference_scripts/5dR7Erj3nwsxLAV7.js create mode 100644 reference_scripts/5lc1eHIYQNpSRWip.js create mode 100644 reference_scripts/5o1XiceC4rutjMms.js create mode 100644 reference_scripts/5sI9iYh5j2nx2XyT.js create mode 100644 reference_scripts/62Ky6bC1EnTllSJA.js create mode 100644 reference_scripts/65o8pQj6oGNnXce6.js create mode 100644 reference_scripts/65xE9OV5sA1ZWT7j.js create mode 100644 reference_scripts/6Aqq4F4Xui923sc6.js create mode 100644 reference_scripts/6BmvV9c03FkfisnE.js create mode 100644 reference_scripts/6EXkbVTRBhKTEu81.js create mode 100644 reference_scripts/6Fe8M5MdklKS2olx.js create mode 100644 reference_scripts/6H6vNjzvMGl2ZqCR.js create mode 100644 reference_scripts/6JrUjs3g5x6bFnj3.js create mode 100644 reference_scripts/6MSodMuZ5xk2JJJ9.js create mode 100644 reference_scripts/6Mjy0jDqczA8BxhS.js create mode 100644 reference_scripts/6QZUX7ZrFxOzqI0b.js create mode 100644 reference_scripts/6U8xox4mBrn5eYIp.js create mode 100644 reference_scripts/6V3qHON3mcerlBlB.js create mode 100644 reference_scripts/6XWJWOUQPgKMsFul.js create mode 100644 reference_scripts/6ZS1rQLkNvMDO0Fp.js create mode 100644 reference_scripts/6elUNF58TaiYjxcx.js create mode 100644 reference_scripts/6fElmBxTjdAaubbK.js create mode 100644 reference_scripts/6hAgggYpNR3r4QWC.js create mode 100644 reference_scripts/6jcTzK1XEuWqAacN.js create mode 100644 reference_scripts/6kifXp2jXEaQVJsg.js create mode 100644 reference_scripts/6mpw9cGseG4W4eyd.js create mode 100644 reference_scripts/6qUKKep5vhFYmo1J.js create mode 100644 reference_scripts/6tjn0RH4VyOPFneS.js create mode 100644 reference_scripts/6uldpFvKOCoW92cC.js create mode 100644 reference_scripts/6xTtJEhRc4OjcDTf.js create mode 100644 reference_scripts/715G1Bf0haOHvmYQ.js create mode 100644 reference_scripts/71DmrxCTKGYL4Z7X.js create mode 100644 reference_scripts/7Ck0fkzE4WQ62qVe.js create mode 100644 reference_scripts/7F3miqRA0ceMUBIu.js create mode 100644 reference_scripts/7F6aGxZJjwxm5e5P.js create mode 100644 reference_scripts/7H6wYyJ6cpaoc2QQ.js create mode 100644 reference_scripts/7JW9t8AYSDkkzG2V.js create mode 100644 reference_scripts/7OmrMjaU48o2FEZi.js create mode 100644 reference_scripts/7ScfB4o1QhXnNUfq.js create mode 100644 reference_scripts/7VAhXHov6pR1SkgD.js create mode 100644 reference_scripts/7WR2hJjHPhHhHxAq.js create mode 100644 reference_scripts/7ZoFUMDG2WJd8RMg.js create mode 100644 reference_scripts/7e8FgQUF2oANANmx.js create mode 100644 reference_scripts/7f6OsttTzE7Hvzfk.js create mode 100644 reference_scripts/7n3SEAGRA5ESK8gV.js create mode 100644 reference_scripts/7szLG4VALuuy1cPm.js create mode 100644 reference_scripts/7wBWUw05q0igh508.js create mode 100644 reference_scripts/84IB8CWa55XzoAkv.js create mode 100644 reference_scripts/87rrZ3ojHrXa3lCn.js create mode 100644 reference_scripts/8AoA4bnstBtglRGZ.js create mode 100644 reference_scripts/8ByuHnUZ4RNTdGVv.js create mode 100644 reference_scripts/8GyJgdHVBaLrHCY8.js create mode 100644 reference_scripts/8K9tpCwvFC9INk5V.js create mode 100644 reference_scripts/8LmUVQxOwTLSeabg.js create mode 100644 reference_scripts/8N3Uqjq1ZxPxo4pk.js create mode 100644 reference_scripts/8RNziYGGb4sp3BGQ.js create mode 100644 reference_scripts/8ShLVT0bK1eQpinj.js create mode 100644 reference_scripts/8TRiAJ8thIKE4IoL.js create mode 100644 reference_scripts/8ThudCYRqkjQIwJH.js create mode 100644 reference_scripts/8WJsecxdndaHRxxS.js create mode 100644 reference_scripts/8WeYU5e5LN9UeWFs.js create mode 100644 reference_scripts/8ZAUBSH9CM9OTpTL.js create mode 100644 reference_scripts/8araLuwmBq8GKEw3.js create mode 100644 reference_scripts/8fefDfiYKFOWdPER.js create mode 100644 reference_scripts/8g2iitsgaJarKQpr.js create mode 100644 reference_scripts/8gCja0mfKt4nYVZc.js create mode 100644 reference_scripts/8hIyWDyfbgGAig65.js create mode 100644 reference_scripts/8jvEVPUCg3rKG48Y.js create mode 100644 reference_scripts/8noxHUQKR55Kx1YN.js create mode 100644 reference_scripts/8oE0DTzz0krOfFlV.js create mode 100644 reference_scripts/8rq4GL5d5nCn4kO7.js create mode 100644 reference_scripts/8tyMXDfHR8AJBdDu.js create mode 100644 reference_scripts/8vpAtJ93GIeye1qj.js create mode 100644 reference_scripts/8wG9l4T9fc1bM0TN.js create mode 100644 reference_scripts/8yBr6VbdKcrWUuqw.js create mode 100644 reference_scripts/8zTkDVziBPaNbMQX.js create mode 100644 reference_scripts/91S2GnBFYFbxmOCK.js create mode 100644 reference_scripts/93K85NnVwjVNXlZq.js create mode 100644 reference_scripts/956dUb5sd6OtbWZR.js create mode 100644 reference_scripts/96Y1yIH1lRjTs5hL.js create mode 100644 reference_scripts/98nKfcimlaPeM9h5.js create mode 100644 reference_scripts/9A7rYY3FKi5XLihG.js create mode 100644 reference_scripts/9EVj4bmZJex45Mt7.js create mode 100644 reference_scripts/9JnPK1jNUEso7Pv8.js create mode 100644 reference_scripts/9MDi3ok9gPwtbALf.js create mode 100644 reference_scripts/9MwRUzRinhq1IjhG.js create mode 100644 reference_scripts/9RFoasDcFnYZ1txR.js create mode 100644 reference_scripts/9VfeubiCV83LN9iY.js create mode 100644 reference_scripts/9WZa63lr0K3SsP4G.js create mode 100644 reference_scripts/9Yn9uViEjcuaESJ2.js create mode 100644 reference_scripts/9ZFPDCk8M2TQxh7x.js create mode 100644 reference_scripts/9bJGJrLqslV5lBya.js create mode 100644 reference_scripts/9eWR4mdaoCSQawDT.js create mode 100644 reference_scripts/9fK07tqqZyPg7dpx.js create mode 100644 reference_scripts/9nroaZDkW3WXNkB7.js create mode 100644 reference_scripts/9ob2lPnk3PDot9Tx.js create mode 100644 reference_scripts/9qWUuEF8F5nehF1y.js create mode 100644 reference_scripts/A0OK0qAMmnf8iNJf.js create mode 100644 reference_scripts/A1odAcuRbq9797ZB.js create mode 100644 reference_scripts/A3MW0UksYrHGa0Qw.js create mode 100644 reference_scripts/A3fvV69RS1lYgma0.js create mode 100644 reference_scripts/A6DcKPzAGntzSCil.js create mode 100644 reference_scripts/ACgKpKrEEHoNGG0h.js create mode 100644 reference_scripts/ACtDCTLZXmd5uXjX.js create mode 100644 reference_scripts/AGD7zCyV4zruvnWu.js create mode 100644 reference_scripts/AHZ8f7dfN8jNsYk6.js create mode 100644 reference_scripts/AI6bFrjWk4NH9FBd.js create mode 100644 reference_scripts/ALuPRzf85dmkEfLo.js create mode 100644 reference_scripts/AMI2wDJqsIZsoq1e.js create mode 100644 reference_scripts/AMxezwtYnWCF6Oza.js create mode 100644 reference_scripts/AS7CstSosuCrwZ19.js create mode 100644 reference_scripts/AV2Kj6jgmIc45zKi.js create mode 100644 reference_scripts/AVROqafFhKjN6TPR.js create mode 100644 reference_scripts/AWgZnm9xLyIWCDnp.js create mode 100644 reference_scripts/AZGXrZOQ4EzjxRL9.js create mode 100644 reference_scripts/Adgs6Zs0FdefO6qx.js create mode 100644 reference_scripts/Ah2wyywkL8hjJNXM.js create mode 100644 reference_scripts/AjC4dsiuhVCOnRGI.js create mode 100644 reference_scripts/AmOMCUaWLJ2iJAt5.js create mode 100644 reference_scripts/AmpDbT0BkDHeaRzf.js create mode 100644 reference_scripts/ApaLcUhuty3EzJoP.js create mode 100644 reference_scripts/AqHLHp4kH6KULk3e.js create mode 100644 reference_scripts/AyNb5sj6FD2Z3Q5T.js create mode 100644 reference_scripts/AyS3iLljxHRKsHg4.js create mode 100644 reference_scripts/B063u4vrbvzMaCQt.js create mode 100644 reference_scripts/B1xgRS00RcTIZLnO.js create mode 100644 reference_scripts/B6ZbY3bxTPg6nCng.js create mode 100644 reference_scripts/B87v1twc65qyvUWi.js create mode 100644 reference_scripts/B950b0XnIUYCdVwu.js create mode 100644 reference_scripts/BAOv7moTxsKlT3JS.js create mode 100644 reference_scripts/BD7bVTU2pVoRSRBe.js create mode 100644 reference_scripts/BHbFqhJPzZI2txLs.js create mode 100644 reference_scripts/BcXTujburrHpjpwa.js create mode 100644 reference_scripts/Be5rdfnZorbILhpC.js create mode 100644 reference_scripts/Bexspr5viPhHiFmU.js create mode 100644 reference_scripts/Bj6bxItlgtI2sXVN.js create mode 100644 reference_scripts/BtyFhdGMKiMamGhM.js create mode 100644 reference_scripts/Bv3431tnG3VKaTJr.js create mode 100644 reference_scripts/ByhEa1BxQOyrOmqg.js create mode 100644 reference_scripts/BzDLuxBNw1QNIacg.js create mode 100644 reference_scripts/CCK1iIfPmB398ziT.js create mode 100644 reference_scripts/CCwuu3bPLCpVGAmb.js create mode 100644 reference_scripts/CDASLC4fWKSGQKf9.js create mode 100644 reference_scripts/CHnaBPHk6HdFS512.js create mode 100644 reference_scripts/CIxZYkHggBQ6EsHP.js create mode 100644 reference_scripts/CM43kvw5mIIE1OsB.js create mode 100644 reference_scripts/CMUFtmNA1kkD1ay7.js create mode 100644 reference_scripts/CPQoK7NjzOwVTFXS.js create mode 100644 reference_scripts/CW5Vlr57OaMkKJ8Q.js create mode 100644 reference_scripts/CWNGrg7se91RC95g.js create mode 100644 reference_scripts/Ca1fXHTA1e2QLx0D.js create mode 100644 reference_scripts/CiFeduksZJ6PRulx.js create mode 100644 reference_scripts/Cjj4iLkdY1NaZRCi.js create mode 100644 reference_scripts/CkE8NZOhzPkuRrKJ.js create mode 100644 reference_scripts/CoImIH9OCMx9DfQZ.js create mode 100644 reference_scripts/D5XmzrUGFa1JN0cl.js create mode 100644 reference_scripts/DANLE5HxrkTNelhl.js create mode 100644 reference_scripts/DBafsY1HrclJRTtA.js create mode 100644 reference_scripts/DHxUKY9LMyifFgCi.js create mode 100644 reference_scripts/DL9vYNft9aXdV2aW.js create mode 100644 reference_scripts/DMQ0taEpBUJU5njV.js create mode 100644 reference_scripts/DTiHS6RfwhF4THbf.js create mode 100644 reference_scripts/DVlZGbiuMIHEQOnM.js create mode 100644 reference_scripts/DWBxvzfWGcG7PVNP.js create mode 100644 reference_scripts/DcSJNRBXE9ZBBY7T.js create mode 100644 reference_scripts/DhZqJso1JWYtGrKk.js create mode 100644 reference_scripts/DmbWR9s5I8LHBwxB.js create mode 100644 reference_scripts/DpdSEHM6NMN1ey6h.js create mode 100644 reference_scripts/DqJFo74trI916qXN.js create mode 100644 reference_scripts/DsE6rTSzxEn6uWMz.js create mode 100644 reference_scripts/DuM5l2Yb4bdvDeaG.js create mode 100644 reference_scripts/DxQnamsb2AuW0p2e.js create mode 100644 reference_scripts/DyZ1jH88EAp1ueOK.js create mode 100644 reference_scripts/E1Xo4RVuN1YRRxg7.js create mode 100644 reference_scripts/E1vUepgop09FF5wy.js create mode 100644 reference_scripts/E2VfOVuju67qO3VL.js create mode 100644 reference_scripts/E4CHDe1xfmcV3oGv.js create mode 100644 reference_scripts/E6DMqfDeczqmVMFV.js create mode 100644 reference_scripts/E7D4bxz8gy4e1wL7.js create mode 100644 reference_scripts/EGWF3LHav3e2zFL4.js create mode 100644 reference_scripts/EJObiSth3WdcJOXN.js create mode 100644 reference_scripts/EJaBfqADqlo92Fx6.js create mode 100644 reference_scripts/EKkdyp51Wf4csw2B.js create mode 100644 reference_scripts/ENGmwaItRXO5s0XY.js create mode 100644 reference_scripts/EQ5dtGW5kQhtAb87.js create mode 100644 reference_scripts/ERxrWzSpw8qwxFVi.js create mode 100644 reference_scripts/EU5j0hnDTG9Z6d1e.js create mode 100644 reference_scripts/EVBSHEC5nmmj2X41.js create mode 100644 reference_scripts/EYny6z5oTOhxGDfb.js create mode 100644 reference_scripts/EaSNOmXUxAkUHnm5.js create mode 100644 reference_scripts/Eay7GpDyfsEE40jT.js create mode 100644 reference_scripts/EdTChmSouS0MSmk5.js create mode 100644 reference_scripts/EiLaZW4b4ypw5sLV.js create mode 100644 reference_scripts/EmXwcuycEH8slEn5.js create mode 100644 reference_scripts/EmmG49pMOPHRwDzR.js create mode 100644 reference_scripts/EpdMj9d9SYPeP44q.js create mode 100644 reference_scripts/ErgOwSiVnm9VLVHN.js create mode 100644 reference_scripts/Et4tPHlrkueLqP3T.js create mode 100644 reference_scripts/Ew3C2WmLCtc1KT46.js create mode 100644 reference_scripts/EwD053Fyy46b59ZI.js create mode 100644 reference_scripts/Eye6dranWpNsILjm.js create mode 100644 reference_scripts/F4aGsdzJ9SYcX57F.js create mode 100644 reference_scripts/FAB12eLcSCAOOQwk.js create mode 100644 reference_scripts/FAf4iXj5LkdvukS2.js create mode 100644 reference_scripts/FMA16PvoObBV8vDl.js create mode 100644 reference_scripts/FMSN5uRskkATexzB.js create mode 100644 reference_scripts/FSqUqSByMiztYOQM.js create mode 100644 reference_scripts/FUgCtIoj1Stgqxt7.js create mode 100644 reference_scripts/FXuyiJoXdAh6WhRK.js create mode 100644 reference_scripts/FXwfqF0jpXlBQ9Y3.js create mode 100644 reference_scripts/FYUPfYyTYZkxRLFT.js create mode 100644 reference_scripts/FZFOC7bip0oiWEzk.js create mode 100644 reference_scripts/FciJSTq7dZsZIPgl.js create mode 100644 reference_scripts/FfTqCPxCoxwGDTQs.js create mode 100644 reference_scripts/FiD3mvWIBHNNIuO9.js create mode 100644 reference_scripts/FkTwk8hfHpRLbAp2.js create mode 100644 reference_scripts/FmLx9pwOkzqqU7Ph.js create mode 100644 reference_scripts/FqevMs0ukQ9WuUHl.js create mode 100644 reference_scripts/Fvlc4RkeF4dHjW3m.js create mode 100644 reference_scripts/G1RletYc6BzigJrK.js create mode 100644 reference_scripts/G7sFEnJlXZvfXL3V.js create mode 100644 reference_scripts/GAO8AozttWOyRkta.js create mode 100644 reference_scripts/GEfWIFBSrXt0ldBM.js create mode 100644 reference_scripts/GFaTz8f6PBNWrlad.js create mode 100644 reference_scripts/GFkVnx4m9OwYsKGH.js create mode 100644 reference_scripts/GNl5Zk7BZ2jhRV1I.js create mode 100644 reference_scripts/GOq4TcnWbfyfCo2V.js create mode 100644 reference_scripts/GRfCxtYzmEx2LYU7.js create mode 100644 reference_scripts/GTZUO73pUJKpM1JB.js create mode 100644 reference_scripts/GUkpYdPwoC5pc9BT.js create mode 100644 reference_scripts/GZFsuynUhgZqwTGo.js create mode 100644 reference_scripts/GbPEy22VuCNzlNv2.js create mode 100644 reference_scripts/Gc8S5TYlVdV8NnOT.js create mode 100644 reference_scripts/GcIQtshex11AMmh2.js create mode 100644 reference_scripts/Gh7OidY6UdpWBS1g.js create mode 100644 reference_scripts/GjkxWj9wCAclM9WA.js create mode 100644 reference_scripts/GrF6tQ08jgKmUH4i.js create mode 100644 reference_scripts/GuUCErVbk5hrFzR3.js create mode 100644 reference_scripts/GuxbvztcvzJz2oH1.js create mode 100644 reference_scripts/GzSFlqL1YrIK1dxh.js create mode 100644 reference_scripts/GzsuEg7gZy1f0ljy.js create mode 100644 reference_scripts/H06Ysj7oPiemW7S6.js create mode 100644 reference_scripts/H1z3nWW7Rj3Oisxy.js create mode 100644 reference_scripts/H2CJvApKMnfGNNoo.js create mode 100644 reference_scripts/H3Wls12aVWAWTp9J.js create mode 100644 reference_scripts/H3pZ9UeIzIz3luKh.js create mode 100644 reference_scripts/HASsi6wYHVALExWq.js create mode 100644 reference_scripts/HJ2X4ZtXei0BXbxf.js create mode 100644 reference_scripts/HKhyn0kijKfzW6cw.js create mode 100644 reference_scripts/HMC6hPND9DWLFfZE.js create mode 100644 reference_scripts/HOt2hHOiHDZ7oBgW.js create mode 100644 reference_scripts/HX6CjNapYdC0VmQ8.js create mode 100644 reference_scripts/HXJKkmpfxQUOnWOS.js create mode 100644 reference_scripts/Hcpn1gU58DIKIhty.js create mode 100644 reference_scripts/HfCxNd7mFGZH4s9Y.js create mode 100644 reference_scripts/HiMBS6GeOwEydWYN.js create mode 100644 reference_scripts/HmImVzvw6ecBy99l.js create mode 100644 reference_scripts/HoNTnPphrJISSQr1.js create mode 100644 reference_scripts/Hq1G30lhJYvtOSNb.js create mode 100644 reference_scripts/HrOBAXsEX073ReKl.js create mode 100644 reference_scripts/HrYchgkdZBiu1yPF.js create mode 100644 reference_scripts/HwbgUIbpX0D8JLOR.js create mode 100644 reference_scripts/I0Jo6cbNAJtXUloc.js create mode 100644 reference_scripts/I0oRZ7AWde5KI5jw.js create mode 100644 reference_scripts/I1J2m5uud84N50Lk.js create mode 100644 reference_scripts/I7ieW0hNYvvX0KFg.js create mode 100644 reference_scripts/I93i49wI9ZrDHT4n.js create mode 100644 reference_scripts/I9QAPKbaXwMMMBT4.js create mode 100644 reference_scripts/IAGla7HJlYN0wa4H.js create mode 100644 reference_scripts/ID8mCcjkl7PCQhDq.js create mode 100644 reference_scripts/IG4zYqtN9fRSYE7q.js create mode 100644 reference_scripts/IKiZv9YSFmKmHo6a.js create mode 100644 reference_scripts/ILqHxk7deotgI3KD.js create mode 100644 reference_scripts/IPPDvZdE8kn3H9z7.js create mode 100644 reference_scripts/IR5URcjnCuWBFMoN.js create mode 100644 reference_scripts/IR86DuMbVdbGOJYt.js create mode 100644 reference_scripts/IfEu1hO8sKEZBpvg.js create mode 100644 reference_scripts/IkGegSuQwwVPhrjF.js create mode 100644 reference_scripts/Ip8sctF9SIE1Z2vF.js create mode 100644 reference_scripts/IpoOOjYJs6RmVrpb.js create mode 100644 reference_scripts/IsLAvY9ikR1cOJWw.js create mode 100644 reference_scripts/IslMfFgpgQq2brpu.js create mode 100644 reference_scripts/IukS0clr1yAleacc.js create mode 100644 reference_scripts/IupskvzvoGyD2H5o.js create mode 100644 reference_scripts/IzZcsSngI8TZH4d8.js create mode 100644 reference_scripts/J0IWUhxada2ONowP.js create mode 100644 reference_scripts/J1FPDdrXGctKDTZz.js create mode 100644 reference_scripts/J8aPichsl25t1QZ9.js create mode 100644 reference_scripts/JEbs0WlqhKNDOo5A.js create mode 100644 reference_scripts/JFgXyb6bKjZJLmF8.js create mode 100644 reference_scripts/JQruHprM5R5vZ9DA.js create mode 100644 reference_scripts/JZIn1dsKHFE3smJU.js create mode 100644 reference_scripts/JaiC5P6nIgctOacH.js create mode 100644 reference_scripts/JavuFNZ9Pj5elVLc.js create mode 100644 reference_scripts/JeThJbOf6Xmbtgo1.js create mode 100644 reference_scripts/JgCcgDVZX54slrWx.js create mode 100644 reference_scripts/JibNjuQrJRnY0yf9.js create mode 100644 reference_scripts/JjDzMnUxaWQePIYh.js create mode 100644 reference_scripts/JjiPprLSlSmmB5Ga.js create mode 100644 reference_scripts/Jjq3oPYbI26zjxME.js create mode 100644 reference_scripts/Jk7OHqx06oCUVAzb.js create mode 100644 reference_scripts/JmZQRvdWjm9ykYfn.js create mode 100644 reference_scripts/Jnp5c09sPzDD61EK.js create mode 100644 reference_scripts/JstrA46EYSEuRSy5.js create mode 100644 reference_scripts/JwYZJGkZMSM2M3Si.js create mode 100644 reference_scripts/JwgFQmPQtXWAP94i.js create mode 100644 reference_scripts/JyTxUG5dNW670Sf7.js create mode 100644 reference_scripts/K06v93N4FXb70mB7.js create mode 100644 reference_scripts/KD4nCSdSXJVJmk0R.js create mode 100644 reference_scripts/KF69WqF4PSEtpdb2.js create mode 100644 reference_scripts/KG4TxnXiLLpfWOQO.js create mode 100644 reference_scripts/KGK9vL1Yl0qmCeCN.js create mode 100644 reference_scripts/KICZPwLvbUSxbDrE.js create mode 100644 reference_scripts/KIoVBinAZK8sMOqD.js create mode 100644 reference_scripts/KJLAan0glJlyOyqF.js create mode 100644 reference_scripts/KPQfupKuaf4LCv4R.js create mode 100644 reference_scripts/KQmb5B27eJ1lkbVL.js create mode 100644 reference_scripts/KQzbrpb0T5a7it4k.js create mode 100644 reference_scripts/KSjsDlsx3DD6cT16.js create mode 100644 reference_scripts/KT670CjGBEprx2fO.js create mode 100644 reference_scripts/KTBVDHUndI3qDOXM.js create mode 100644 reference_scripts/KUx0deSF3xNzMucL.js create mode 100644 reference_scripts/KVpDUEjHhd3nLa0f.js create mode 100644 reference_scripts/KVuPduDztyMZQNt9.js create mode 100644 reference_scripts/KXzDe7cN2vynHjJO.js create mode 100644 reference_scripts/KkjkYAGI9Em1NgiQ.js create mode 100644 reference_scripts/KmngDrPD72xn22kZ.js create mode 100644 reference_scripts/KnwYZbeRSBA94hfl.js create mode 100644 reference_scripts/KuUkUmOOLf05I4Bp.js create mode 100644 reference_scripts/KuuWAhoSzk0rCxxw.js create mode 100644 reference_scripts/KyUPYV1RXJxPOfyA.js create mode 100644 reference_scripts/KyswmGj1uG3QS3ng.js create mode 100644 reference_scripts/L1RMLvKtRPFtnczI.js create mode 100644 reference_scripts/L2cdQppcPwxz24hN.js create mode 100644 reference_scripts/L89UcafRHqUfxoux.js create mode 100644 reference_scripts/L9eAtDyaoHvqryk4.js create mode 100644 reference_scripts/LAyLbcC0lOPwZP3U.js create mode 100644 reference_scripts/LHUUXfZVLBhWqRvb.js create mode 100644 reference_scripts/LLqAT9wEUGMLfDhU.js create mode 100644 reference_scripts/LOL2TGf8p8KxP14D.js create mode 100644 reference_scripts/LQEWSN5KnHHATPsf.js create mode 100644 reference_scripts/LXEUhHuXe8keEPI9.js create mode 100644 reference_scripts/LeKLtvEDrWh4yHsx.js create mode 100644 reference_scripts/LedRsrVo2f7lm3Ix.js create mode 100644 reference_scripts/Lg1oRg4oNRvucsvi.js create mode 100644 reference_scripts/LjXPlgdXBdllnA3i.js create mode 100644 reference_scripts/LkPtgN9A36OI6Frh.js create mode 100644 reference_scripts/LlRhPGorLl5qJCU8.js create mode 100644 reference_scripts/Lm9IBkc918Duw3US.js create mode 100644 reference_scripts/Lp261O9fgEXmgPf3.js create mode 100644 reference_scripts/Lpv2N9LK9loeumiW.js create mode 100644 reference_scripts/Lrb1S2aK7SFVD0C7.js create mode 100644 reference_scripts/Lu27iXtJVkrJ8bOx.js create mode 100644 reference_scripts/LxdLkPxH3SFvYrCJ.js create mode 100644 reference_scripts/LyAK0dVDS5L09yq2.js create mode 100644 reference_scripts/M0XhKnWjG14pk3iH.js create mode 100644 reference_scripts/M2FshTX4PjKFVU8y.js create mode 100644 reference_scripts/M5bh0heeafA2fQQ8.js create mode 100644 reference_scripts/M9VgeYGiUO97ZUW4.js create mode 100644 reference_scripts/MCK6WyjwYT28lsTN.js create mode 100644 reference_scripts/MDLttXplnNthncGr.js create mode 100644 reference_scripts/MFKhU9vp8bQpHP3I.js create mode 100644 reference_scripts/MI2GgNi3fZtUCtQD.js create mode 100644 reference_scripts/MJB6WbZSF6Briz30.js create mode 100644 reference_scripts/MSJWJEUrX7ZmMvAD.js create mode 100644 reference_scripts/McLR9YcgVUG3MooC.js create mode 100644 reference_scripts/MfxWXZwaZUjGSBqw.js create mode 100644 reference_scripts/MfxzwJz2o9ho2hOM.js create mode 100644 reference_scripts/MgMMoC4Umpg7fmNI.js create mode 100644 reference_scripts/MgTqCMRjxhezT73T.js create mode 100644 reference_scripts/MgZreqq3Jua10c8s.js create mode 100644 reference_scripts/Mhb67xufvA9uWO21.js create mode 100644 reference_scripts/Mir4FMHQRdVqazAF.js create mode 100644 reference_scripts/MkEcdViivk7abf1x.js create mode 100644 reference_scripts/MnXny8SCh6OceJc9.js create mode 100644 reference_scripts/MnqQkXVp20Lw84I1.js create mode 100644 reference_scripts/Mp8UjuCLa9jdzhBS.js create mode 100644 reference_scripts/Msygc7oQQPB5fw0b.js create mode 100644 reference_scripts/MwUzyAgd0yPnmZCH.js create mode 100644 reference_scripts/Myl1Ishu9GBraYUZ.js create mode 100644 reference_scripts/N2MeOlf0GjPiRcSb.js create mode 100644 reference_scripts/N7nGncsPrTz2ZbDA.js create mode 100644 reference_scripts/N8hA6ysHCTlLd8Kj.js create mode 100644 reference_scripts/N9kA46ZQ9LiRjy6T.js create mode 100644 reference_scripts/NDvNGATDM2xPFJK0.js create mode 100644 reference_scripts/NNytXz5XFPrEF6dw.js create mode 100644 reference_scripts/NQSvFWhmBQAyx5Zz.js create mode 100644 reference_scripts/Na7Nanl9YmxZlTo7.js create mode 100644 reference_scripts/NdquQqyuOkGCj8Uo.js create mode 100644 reference_scripts/NkqtQaLEGYst0PUO.js create mode 100644 reference_scripts/NnA4zpuO6iUXKhH7.js create mode 100644 reference_scripts/NnDq4miIPNEtZUWb.js create mode 100644 reference_scripts/NrVFrIXM8GnIbojv.js create mode 100644 reference_scripts/O7lXFZLrLdFaShGR.js create mode 100644 reference_scripts/O9fc0hLHdkTgSuLg.js create mode 100644 reference_scripts/OCFrGXAYfo9OYnhc.js create mode 100644 reference_scripts/OEy2lxvic37dRBEt.js create mode 100644 reference_scripts/OGX4BneaYAnV25TO.js create mode 100644 reference_scripts/OJMgS8ZQv0j4tEFf.js create mode 100644 reference_scripts/OMAUX1fnHyIpplul.js create mode 100644 reference_scripts/OXoqtpOdfkURZbuL.js create mode 100644 reference_scripts/Oa9FmLXRRZRpLrrq.js create mode 100644 reference_scripts/OcQe0zfksf1DCJYe.js create mode 100644 reference_scripts/OeCgX3hIsfLfmGvC.js create mode 100644 reference_scripts/OeKeQAAcJhdI4Qky.js create mode 100644 reference_scripts/Ofn6vDbP3fZ4UlSc.js create mode 100644 reference_scripts/OgSI0Z6SHjYuqKIz.js create mode 100644 reference_scripts/OicQSEVZBbqLtrcf.js create mode 100644 reference_scripts/OnkEe4ISru1hjJWP.js create mode 100644 reference_scripts/Op88kMtimSEWlY2h.js create mode 100644 reference_scripts/OqLKL0PiCvYH2QxW.js create mode 100644 reference_scripts/OqxeuZfZDfm9ax6h.js create mode 100644 reference_scripts/OvIELZLvnlN2H2uw.js create mode 100644 reference_scripts/OxsBnnVI3Smpknpb.js create mode 100644 reference_scripts/Oz7pWF9mEc1pQypj.js create mode 100644 reference_scripts/P29tT1eMMdAw3CPF.js create mode 100644 reference_scripts/PBW6IZtwawNHxB6y.js create mode 100644 reference_scripts/PI1QNaKFeqood6d7.js create mode 100644 reference_scripts/PMISUsaEDBA7D3od.js create mode 100644 reference_scripts/PVjaKAHTKDA0rA9J.js create mode 100644 reference_scripts/PdClojv7yNgQpOUc.js create mode 100644 reference_scripts/PeZYj8b0vedyJj00.js create mode 100644 reference_scripts/Pg9C6nJX5QHIdqa9.js create mode 100644 reference_scripts/Ph3TdQw1lGiFr049.js create mode 100644 reference_scripts/PjRxGuUDKGmSmVDc.js create mode 100644 reference_scripts/PmELrzD3RmF9qKkO.js create mode 100644 reference_scripts/PoNnT5EqvLj2r5yf.js create mode 100644 reference_scripts/PwqTmw7rsG8hzqCS.js create mode 100644 reference_scripts/Q1trEhtqjIiDvFPF.js create mode 100644 reference_scripts/Q4EQgP4gZR8TTm7S.js create mode 100644 reference_scripts/Q68WiUWY7GxiXBbT.js create mode 100644 reference_scripts/Q9EmlWmuDac83cJw.js create mode 100644 reference_scripts/QF8LanKNoAlTkQG0.js create mode 100644 reference_scripts/QKTA2TqZ77pvHWSJ.js create mode 100644 reference_scripts/QKjR6P1WEHXf4K77.js create mode 100644 reference_scripts/QPVVDPcJ4Xi5FmQl.js create mode 100644 reference_scripts/QQ2gHThZHdO4yLLX.js create mode 100644 reference_scripts/QQPiREc50HT5W2Tr.js create mode 100644 reference_scripts/QRSACifDrvojIXHB.js create mode 100644 reference_scripts/QaGNsqKm2Nf0zGVm.js create mode 100644 reference_scripts/QbIYnshWeP1U8SUy.js create mode 100644 reference_scripts/Qgn92fZyc3Psn8QJ.js create mode 100644 reference_scripts/Qk7t2l5ep9RDVpgE.js create mode 100644 reference_scripts/QoEOxRruQXYrZrv3.js create mode 100644 reference_scripts/QqkE7rlqhkeRohFD.js create mode 100644 reference_scripts/QqybHxNCzPEzG1Qh.js create mode 100644 reference_scripts/QwHoqu2oO8QO8Mad.js create mode 100644 reference_scripts/R32U01LBjBrK1pns.js create mode 100644 reference_scripts/R5dOZWFxE2n6tooX.js create mode 100644 reference_scripts/R6SnyF3y4Vsq6oga.js create mode 100644 reference_scripts/R95pDZMHnD9iHAl8.js create mode 100644 reference_scripts/RDtJXji3hgcKnEBk.js create mode 100644 reference_scripts/RHyBLYT5oHf7EPnG.js create mode 100644 reference_scripts/RI8crJxeD8JLDwMh.js create mode 100644 reference_scripts/RJpglw5eVRM1f9t0.js create mode 100644 reference_scripts/RKIFGN583PQnqHGk.js create mode 100644 reference_scripts/RNHrSTfMLXm5sXkC.js create mode 100644 reference_scripts/RNr9CwyvLhlnwD2h.js create mode 100644 reference_scripts/ROXCqAFSTLouJniL.js create mode 100644 reference_scripts/RSsGiDFibuqg3sHr.js create mode 100644 reference_scripts/RZlMkxJz5apn0mUj.js create mode 100644 reference_scripts/RprZWlnopSqZt7KZ.js create mode 100644 reference_scripts/RqWnhnwFxaHubgiA.js create mode 100644 reference_scripts/RrchOMpEdIvceJxl.js create mode 100644 reference_scripts/RuW1PWUFxIbbSlIm.js create mode 100644 reference_scripts/RvipIYj9H7n4UDMe.js create mode 100644 reference_scripts/S1QihXuvdEVzeRtB.js create mode 100644 reference_scripts/S3DCTw4yJ85eSaKp.js create mode 100644 reference_scripts/S3Dev4hleOYqDNe9.js create mode 100644 reference_scripts/S4793DLFhjMxpM8x.js create mode 100644 reference_scripts/S6tUyFJvGMV19mvP.js create mode 100644 reference_scripts/S95QqpX1cZyIVCPy.js create mode 100644 reference_scripts/SGr50Hq1AHIEzIFN.js create mode 100644 reference_scripts/SLy1Fs3oXcHgFgjK.js create mode 100644 reference_scripts/SO4Aa9argKbuO9rQ.js create mode 100644 reference_scripts/SPOkFWZWziZk5b7A.js create mode 100644 reference_scripts/SRmfstEs278bP9Pz.js create mode 100644 reference_scripts/SSqGxyN9hw0HDmED.js create mode 100644 reference_scripts/SWIJjM2RCmzfr64u.js create mode 100644 reference_scripts/SrCHfOJFZwDickqa.js create mode 100644 reference_scripts/StAderQaQQsxb6Rv.js create mode 100644 reference_scripts/SvFKt9hMcFQjeILA.js create mode 100644 reference_scripts/T5fiTzhXEQAv9Drf.js create mode 100644 reference_scripts/T74FEjfFrh3f6MKv.js create mode 100644 reference_scripts/TAw9vXnfyIAl5DGs.js create mode 100644 reference_scripts/TBpNFRL5uehs0fze.js create mode 100644 reference_scripts/TEiNj5FgkoD3YbhS.js create mode 100644 reference_scripts/TGN070HeJLl3gSMY.js create mode 100644 reference_scripts/TNWmIkuubqBn38he.js create mode 100644 reference_scripts/TOyQLrugFGzwc5nY.js create mode 100644 reference_scripts/TQRL4mZhZohXg1Au.js create mode 100644 reference_scripts/TU2xjbJ0zFtytF3J.js create mode 100644 reference_scripts/TY0xSQ00XXyEr49r.js create mode 100644 reference_scripts/TcqumwUFAL6V0cty.js create mode 100644 reference_scripts/TdjlJro0RRVSh8g8.js create mode 100644 reference_scripts/TmaS8o33825QUMrx.js create mode 100644 reference_scripts/TnFobCxG4pxlYmKr.js create mode 100644 reference_scripts/ToKlHDAjJOsC51ag.js create mode 100644 reference_scripts/TpZItJ5Ugbazaobd.js create mode 100644 reference_scripts/Tq45Nd8J3eTvHT41.js create mode 100644 reference_scripts/TrIYdcG3jDER4WgY.js create mode 100644 reference_scripts/TwgdEucxcHloc4cX.js create mode 100644 reference_scripts/TwwKxFjK6TNGKbRB.js create mode 100644 reference_scripts/TxfmxDGBj04AQQpt.js create mode 100644 reference_scripts/TzgmYRXFXRspIo1i.js create mode 100644 reference_scripts/U1RUcgP8LD2qeGTm.js create mode 100644 reference_scripts/U1UpSRJOSjPpO4HS.js create mode 100644 reference_scripts/U26XMie3Kjoddisj.js create mode 100644 reference_scripts/U2xKn7R1gm8kiQm8.js create mode 100644 reference_scripts/U4A8FDNmwBGTuQZO.js create mode 100644 reference_scripts/U5ndCwcJ1s3Ns26w.js create mode 100644 reference_scripts/U78c4oUjKwyUu6jT.js create mode 100644 reference_scripts/U9xh2wriSqCosugW.js create mode 100644 reference_scripts/UC6G3pFQwzUhrw6F.js create mode 100644 reference_scripts/UH5MIzqi2MvEqTwj.js create mode 100644 reference_scripts/ULmZMLezDamerN04.js create mode 100644 reference_scripts/UTlgF4azrGQZsoDv.js create mode 100644 reference_scripts/UWrzokgabRKUpnkG.js create mode 100644 reference_scripts/UYLXm2W6jVn21Age.js create mode 100644 reference_scripts/UaImulhbPURkLJg2.js create mode 100644 reference_scripts/UgQW0UMPOZ0jwfVJ.js create mode 100644 reference_scripts/Um6xMMiUftLXJxEt.js create mode 100644 reference_scripts/UnqnWi0dZYLf5fTT.js create mode 100644 reference_scripts/UsAHQecRlWL5PhP6.js create mode 100644 reference_scripts/UsuwsmU1TUQLQVM2.js create mode 100644 reference_scripts/UvycHOjSPm5Zv9KJ.js create mode 100644 reference_scripts/UwjkHRAQHESdYXJs.js create mode 100644 reference_scripts/Ux4buMc7llF1Kg8p.js create mode 100644 reference_scripts/V1D2Uo3WDKYQePU3.js create mode 100644 reference_scripts/V2lsVTi6q28eL5jl.js create mode 100644 reference_scripts/V7qmFwUMCY2tfziH.js create mode 100644 reference_scripts/V9wD9FWHWxZUOGSI.js create mode 100644 reference_scripts/V9xm4X1x3lPYTQaI.js create mode 100644 reference_scripts/V9zm2hKUVLVZtAcN.js create mode 100644 reference_scripts/VAPsww9x3HAw1sKP.js create mode 100644 reference_scripts/VAs1nXvicdQK18Do.js create mode 100644 reference_scripts/VKpKq4RSbI1KkUQK.js create mode 100644 reference_scripts/VNOKTzCrFbZ6PJUj.js create mode 100644 reference_scripts/VQaC6ynouW5EQCbC.js create mode 100644 reference_scripts/Vb7rgl8T4VRswbnZ.js create mode 100644 reference_scripts/VbL0TgaBAmYjrezZ.js create mode 100644 reference_scripts/Vkuu70BZV4DPYO2Q.js create mode 100644 reference_scripts/VlFUDaKUYoBYKYn0.js create mode 100644 reference_scripts/VqTrKPtxv9hpn0Hr.js create mode 100644 reference_scripts/VuE1mhrB6X6MYTzg.js create mode 100644 reference_scripts/VurA2XNqC0d9U49C.js create mode 100644 reference_scripts/VzO0ZDcTWvaBn4vm.js create mode 100644 reference_scripts/VzgTGb5QXKoyPNh3.js create mode 100644 reference_scripts/W9nyUNQStMr1pUHJ.js create mode 100644 reference_scripts/WB6sIpLEPC8YPX67.js create mode 100644 reference_scripts/WKXyVHQwQCNTfSKv.js create mode 100644 reference_scripts/WO5n7Vbx8AgoVrwC.js create mode 100644 reference_scripts/WPQbVpD1uwSLAXq1.js create mode 100644 reference_scripts/WRe1eGmGVGejPcS8.js create mode 100644 reference_scripts/WTRYAEzwxRuGENyI.js create mode 100644 reference_scripts/WY3DajPRGcMNt158.js create mode 100644 reference_scripts/WiYtNU2Y5BJfIpeM.js create mode 100644 reference_scripts/WnWA0e0bgqBsZp2L.js create mode 100644 reference_scripts/Wo4wQKUxSItAhRzZ.js create mode 100644 reference_scripts/WwxXgsNxlccmqTze.js create mode 100644 reference_scripts/WzMmwjZbhyCbHxyZ.js create mode 100644 reference_scripts/X3bLbOfcJAftOMa7.js create mode 100644 reference_scripts/X7ikFOGKYzTMr4d1.js create mode 100644 reference_scripts/XClTZOjuhcxWLF51.js create mode 100644 reference_scripts/XO9m2AvFRAAeEuty.js create mode 100644 reference_scripts/XPxAKqPpPYE4E6B5.js create mode 100644 reference_scripts/XRrGBbplNLZpXnCH.js create mode 100644 reference_scripts/XXnzUdsIYQ9Wjyu0.js create mode 100644 reference_scripts/XYaYeiVkc5GKYTjC.js create mode 100644 reference_scripts/XcvDYNZgJ2rpAdDV.js create mode 100644 reference_scripts/Xe8ijqWU3bbtq7ZY.js create mode 100644 reference_scripts/Xf4FcZ4ZLdWmOXBa.js create mode 100644 reference_scripts/XfRvVBTVIuAm8RaZ.js create mode 100644 reference_scripts/Xg4qHLsyXGuUZfT8.js create mode 100644 reference_scripts/Xk9XPklxxTvFlwpI.js create mode 100644 reference_scripts/XthZ3GCC3WhsEI2g.js create mode 100644 reference_scripts/Xu5cED1MhT4ba7da.js create mode 100644 reference_scripts/XuFxKPYheYF4WMmQ.js create mode 100644 reference_scripts/Y6ppJBerpM3TtSic.js create mode 100644 reference_scripts/Y7McxsHFeGhwQx0J.js create mode 100644 reference_scripts/Y8J66v8VTKUASGuK.js create mode 100644 reference_scripts/YDqpKJVy8ijEKdLX.js create mode 100644 reference_scripts/YEBw2CzHYxsTpTy5.js create mode 100644 reference_scripts/YFSgWRXel0bWE3EE.js create mode 100644 reference_scripts/YHEIkBKWXKNPqglh.js create mode 100644 reference_scripts/YMaxpXnml01bLGpO.js create mode 100644 reference_scripts/YOKoZFlBEpFavfOS.js create mode 100644 reference_scripts/YQ2LnLxp0xgy3meI.js create mode 100644 reference_scripts/YRUTliBzAQvncGNX.js create mode 100644 reference_scripts/YaKnYEbmmZZtByJc.js create mode 100644 reference_scripts/Yf2MmOzazzMdmoPU.js create mode 100644 reference_scripts/YhhiWEQbox3WZA3Q.js create mode 100644 reference_scripts/YjAIsFlxKTJvYs60.js create mode 100644 reference_scripts/YjJcRdytVRm88qLn.js create mode 100644 reference_scripts/YsS2RZsl2ZsqjhWV.js create mode 100644 reference_scripts/YwLEw4BiKq4EMy57.js create mode 100644 reference_scripts/YyKU2rIRmFSCqSlW.js create mode 100644 reference_scripts/Z1zriXibT0mAmdhb.js create mode 100644 reference_scripts/Z30zYayPryXOjT5N.js create mode 100644 reference_scripts/Z4WrrlVGpPY4iUbG.js create mode 100644 reference_scripts/Z52yZDm6lP6fOP3O.js create mode 100644 reference_scripts/Z6OmmC0irJzxSnMH.js create mode 100644 reference_scripts/Z6jNlyZMECkW4Hon.js create mode 100644 reference_scripts/ZCkYe5XMVY1RWMXG.js create mode 100644 reference_scripts/ZCrfdLPOxiNDCDSg.js create mode 100644 reference_scripts/ZCuOjLAeENKN1Q4L.js create mode 100644 reference_scripts/ZEXhYJqqxF6QAixX.js create mode 100644 reference_scripts/ZEdDcBka21rnMuz5.js create mode 100644 reference_scripts/ZGlJnrIemqul24j7.js create mode 100644 reference_scripts/ZI2YnAAGoLpmVDIL.js create mode 100644 reference_scripts/ZJy2rvpKmUHXGrAi.js create mode 100644 reference_scripts/ZMwJad6v4G13SgjR.js create mode 100644 reference_scripts/ZNW3ubbKIYXAyE48.js create mode 100644 reference_scripts/ZNu4B0OdjkM9lmtu.js create mode 100644 reference_scripts/ZTE8LdRblyG4yYoE.js create mode 100644 reference_scripts/ZYsMgB4BwXBJcpYf.js create mode 100644 reference_scripts/ZbuW8y7t9Y8oUFWq.js create mode 100644 reference_scripts/ZdHvGvSJBsIuPphF.js create mode 100644 reference_scripts/Ze9E2zR1GFGWGMVH.js create mode 100644 reference_scripts/ZhuitY1KOU1Xe7cP.js create mode 100644 reference_scripts/ZqTW093qENOwGONP.js create mode 100644 reference_scripts/ZrePyV2spv3v65Tg.js create mode 100644 reference_scripts/ZsQR3AVKi0v5U593.js create mode 100644 reference_scripts/ZvbBM4gTJHPdU8jU.js create mode 100644 reference_scripts/Zxh4RAENoaAQAaNg.js create mode 100644 reference_scripts/ZxtOdwsM2Sqj9Zam.js create mode 100644 reference_scripts/a02tlRCXpaoaDjSN.js create mode 100644 reference_scripts/a0YU3whUm16wGBNu.js create mode 100644 reference_scripts/a4Aza4a9v8JMU8dC.js create mode 100644 reference_scripts/a6gacHsvgwtsIFSQ.js create mode 100644 reference_scripts/a7pEvCycVnFBXGAQ.js create mode 100644 reference_scripts/a8RabrnJ08O07rDX.js create mode 100644 reference_scripts/a8i0sA1RBnD8nHZt.js create mode 100644 reference_scripts/aAvJrAKLzXhS9qN6.js create mode 100644 reference_scripts/aCVtaW8ag1WibcAr.js create mode 100644 reference_scripts/aIYUsBIDKWJ3CEtj.js create mode 100644 reference_scripts/aMHGjWyn6BXCI4pw.js create mode 100644 reference_scripts/abLWYtNTu1UVDQAs.js create mode 100644 reference_scripts/abVIvJBzuskNzCQv.js create mode 100644 reference_scripts/afdmOvPGMpEdZvCb.js create mode 100644 reference_scripts/agsm3NI1NDtHRG4y.js create mode 100644 reference_scripts/ahbA7o5G9dzMFl76.js create mode 100644 reference_scripts/alJgj25l3239h2SW.js create mode 100644 reference_scripts/ayIbw2Vw2t9xg33P.js create mode 100644 reference_scripts/b1zMefdoZYtzCm7i.js create mode 100644 reference_scripts/b2Kb4IuD22RhKhR0.js create mode 100644 reference_scripts/b2WaqRna5CFXmbDG.js create mode 100644 reference_scripts/b5DfAWtpV1x2R8If.js create mode 100644 reference_scripts/b5prg1FLjCAvBjLy.js create mode 100644 reference_scripts/bBdXzBmxgFFBwMMS.js create mode 100644 reference_scripts/bEVlJOOA1kLlzpWx.js create mode 100644 reference_scripts/bLkt8VpTTPoTxW0W.js create mode 100644 reference_scripts/bMEFHPCei2evnZZw.js create mode 100644 reference_scripts/bQyVajMN1ETwlzvM.js create mode 100644 reference_scripts/bRtZH0xRh8dgqMeW.js create mode 100644 reference_scripts/bWr8leucbWslBCYG.js create mode 100644 reference_scripts/bhXUW7IJtEaUGAoV.js create mode 100644 reference_scripts/brNRqfpPqD2Ki0cM.js create mode 100644 reference_scripts/btPrQkGRKUkhNe3N.js create mode 100644 reference_scripts/bwtQOSWn120NICkf.js create mode 100644 reference_scripts/bwx9wuEOJPF7btD1.js create mode 100644 reference_scripts/bzaoWcieMFaU5B5l.js create mode 100644 reference_scripts/c31hjp7k0hlpdGBC.js create mode 100644 reference_scripts/c3KA1knL2NYNUEww.js create mode 100644 reference_scripts/cAioHYtlxuOCwRLh.js create mode 100644 reference_scripts/cApfxL7Ic0NKdoSr.js create mode 100644 reference_scripts/cBSy9CR5NZvcLRg8.js create mode 100644 reference_scripts/cDBhmHn5kjgWBAlT.js create mode 100644 reference_scripts/cEg09bnvZD6Ysnpc.js create mode 100644 reference_scripts/cJFDnq1HI4gXWcJo.js create mode 100644 reference_scripts/cK1Jysfu5IMUUH0C.js create mode 100644 reference_scripts/cOuukVo8WakDZIUj.js create mode 100644 reference_scripts/cUFCL02JoaZObRcX.js create mode 100644 reference_scripts/cUnbADgOQ4fMKgrH.js create mode 100644 reference_scripts/cV9JiAgUPOeUHKnS.js create mode 100644 reference_scripts/cYPIXzl86a3LFsTE.js create mode 100644 reference_scripts/cgmA2N0MkjA7qIZy.js create mode 100644 reference_scripts/ch5SD2XOQfcYo0X5.js create mode 100644 reference_scripts/chUpiI3el8IO8MSs.js create mode 100644 reference_scripts/csLKDJKZaUK9vwLT.js create mode 100644 reference_scripts/ct6WGaRMfrcnHhyv.js create mode 100644 reference_scripts/cuqCtQsfLBBAGjnu.js create mode 100644 reference_scripts/cysQDjlDzT8HdNeo.js create mode 100644 reference_scripts/d29mu8vRt9AQUm0L.js create mode 100644 reference_scripts/d6mVm08o8SeklAcW.js create mode 100644 reference_scripts/d9iU08yvqcffF026.js create mode 100644 reference_scripts/dAMtbn3uQwF8KpKU.js create mode 100644 reference_scripts/dIxYt421K010eogY.js create mode 100644 reference_scripts/dM449AU0FQRnOc3l.js create mode 100644 reference_scripts/dM8FbRH2V8CpOkXw.js create mode 100644 reference_scripts/dSmRhZ6o1bUcOSF9.js create mode 100644 reference_scripts/dXGosSxdoYbET2O8.js create mode 100644 reference_scripts/dZ4c5pKDqQV02aIK.js create mode 100644 reference_scripts/dbOSvpgcPjsc2uvq.js create mode 100644 reference_scripts/dbYjr4oG67Z880To.js create mode 100644 reference_scripts/dcwY8dCd3PNCEzk6.js create mode 100644 reference_scripts/dfEgat3jz4EtWszH.js create mode 100644 reference_scripts/dfnCK8jCPXNLM7Gh.js create mode 100644 reference_scripts/dk02qSJfJaIo3Geh.js create mode 100644 reference_scripts/dkY7WRYjFVh8GB0m.js create mode 100644 reference_scripts/dkiNmwFXztIVbuxg.js create mode 100644 reference_scripts/dqvHDMlcitLx1pUx.js create mode 100644 reference_scripts/dt85W8pzZ09w1QLi.js create mode 100644 reference_scripts/dtFvpY96RPzNnphq.js create mode 100644 reference_scripts/dwSgcFxKN3S0hLJL.js create mode 100644 reference_scripts/e0TuMgYuI7ZtGoQr.js create mode 100644 reference_scripts/e34s1XxHckAWfwHt.js create mode 100644 reference_scripts/e7IxnxePdXSy6L4E.js create mode 100644 reference_scripts/eAtqyBd1HsDWuBuI.js create mode 100644 reference_scripts/eHRv7f2BTtle6Y1K.js create mode 100644 reference_scripts/eHgk3HZ6eyLFTZ9o.js create mode 100644 reference_scripts/ePPgxQOqL1Uhz2k9.js create mode 100644 reference_scripts/eWWLmA2xINR321aK.js create mode 100644 reference_scripts/eb69QPmNQEJXtk4l.js create mode 100644 reference_scripts/ebDQH0MdGAG02CHl.js create mode 100644 reference_scripts/ed7Sud9HM3uB2j6b.js create mode 100644 reference_scripts/egDtqMxe3iekc6hv.js create mode 100644 reference_scripts/eh1J3s0s4A2AxoFp.js create mode 100644 reference_scripts/ekjJQHyMbZT2vqdc.js create mode 100644 reference_scripts/eqxE7nBO13yJS7hc.js create mode 100644 reference_scripts/esuLwq4g5T8k1kLT.js create mode 100644 reference_scripts/ezGqDoC9hNRBnFTB.js create mode 100644 reference_scripts/f062aa2BNClx08D6.js create mode 100644 reference_scripts/f3rXusHh6VIpVPUl.js create mode 100644 reference_scripts/f4vvAGQ8OGoEbrgy.js create mode 100644 reference_scripts/f5Mp3kXwCFdPkW6N.js create mode 100644 reference_scripts/f6WnrJvoNkfoNN9Y.js create mode 100644 reference_scripts/f7WZvYle9iqefRsh.js create mode 100644 reference_scripts/f8cnfvGKJH3bYVGN.js create mode 100644 reference_scripts/fEFfHFeJxkR0aIJK.js create mode 100644 reference_scripts/fEyKQqCjDwml3DXO.js create mode 100644 reference_scripts/fFGuTi0HLjwneMcJ.js create mode 100644 reference_scripts/fIUxKZMWJ8HMPmH9.js create mode 100644 reference_scripts/fKzlu6fFE2th9uIJ.js create mode 100644 reference_scripts/fP2edYbj6QjPPAjL.js create mode 100644 reference_scripts/fPKYkBllp7Et62lX.js create mode 100644 reference_scripts/fY0TsQwnU14fdPl2.js create mode 100644 reference_scripts/fYLSe6CrYciap5y8.js create mode 100644 reference_scripts/faRFSsrQylQRZFLk.js create mode 100644 reference_scripts/fcY3pa72dELnOFXV.js create mode 100644 reference_scripts/feMPZhhFeXRtKdKY.js create mode 100644 reference_scripts/ffvcCEazZBinHlUX.js create mode 100644 reference_scripts/fiF9sM5UpcHMYa33.js create mode 100644 reference_scripts/fkFmNcesqqNTMhVn.js create mode 100644 reference_scripts/fl762icfKrt9ear2.js create mode 100644 reference_scripts/ft0LaRWZT5WtnptP.js create mode 100644 reference_scripts/fve7tiyF5X9B7mHJ.js create mode 100644 reference_scripts/fzTB7t3x4bLmAXji.js create mode 100644 reference_scripts/g07HI7vyqiFXPB0o.js create mode 100644 reference_scripts/g0SzfsLyW7aD2F19.js create mode 100644 reference_scripts/g1L8OYO9nCOhdKGL.js create mode 100644 reference_scripts/g4t56A09yrpZaJQ2.js create mode 100644 reference_scripts/gFUXBbTskQBKjxqm.js create mode 100644 reference_scripts/gKIPujyuFSn0No9v.js create mode 100644 reference_scripts/gKPL3t4vlZAsvtGr.js create mode 100644 reference_scripts/gL0ftUnK5TNXBRRt.js create mode 100644 reference_scripts/gPQrszvIgGlW9yM4.js create mode 100644 reference_scripts/gVpFUka7qfGiEC1v.js create mode 100644 reference_scripts/ga6bQzPuoIiQQrKg.js create mode 100644 reference_scripts/gbhxWXboV9CytWNU.js create mode 100644 reference_scripts/gh2KS1prBKcsSK6M.js create mode 100644 reference_scripts/gnVpxOeBZpNF4HIF.js create mode 100644 reference_scripts/gpPaCe6yER79l4u8.js create mode 100644 reference_scripts/gpuBg3y9rocJL7yT.js create mode 100644 reference_scripts/gqZLfIr6svrtdwdC.js create mode 100644 reference_scripts/gsCnd3mf1vXFU2ei.js create mode 100644 reference_scripts/gu72JaTs9GrSiVTd.js create mode 100644 reference_scripts/h0DfPwUUOBjyAHMZ.js create mode 100644 reference_scripts/h1XKoMuVnS0bagRO.js create mode 100644 reference_scripts/h766UvswLCsxcMow.js create mode 100644 reference_scripts/hA8PzeiCsHqqlUZm.js create mode 100644 reference_scripts/hCzxUyO6mjLNIpaM.js create mode 100644 reference_scripts/hDC6lroDEPVBituR.js create mode 100644 reference_scripts/hK0YMJfYbpbJZizO.js create mode 100644 reference_scripts/hObTbWi4ZdwXimIW.js create mode 100644 reference_scripts/hR1qD2kpFHF8JT8h.js create mode 100644 reference_scripts/hSlEY2oh8quVmdXR.js create mode 100644 reference_scripts/hZAax4emLahEEqcZ.js create mode 100644 reference_scripts/hfO4INH3EeETDTFt.js create mode 100644 reference_scripts/hhCs5VBKx50S5IsY.js create mode 100644 reference_scripts/hhv7PrRdlf9sfC82.js create mode 100644 reference_scripts/hlHKeFWrOA8CsLr9.js create mode 100644 reference_scripts/hluehsCuBZYc1Ejt.js create mode 100644 reference_scripts/hmk8zV1LTElHUI8A.js create mode 100644 reference_scripts/hnsmzvcuiUYB065I.js create mode 100644 reference_scripts/hpwJRAhCsXTp9bd9.js create mode 100644 reference_scripts/hwHpIunCq3ifk2QU.js create mode 100644 reference_scripts/hwOZxgt7e65iWvYz.js create mode 100644 reference_scripts/hxmwtw5zAHyS2upG.js create mode 100644 reference_scripts/i59IpmZNLJEPWZ3L.js create mode 100644 reference_scripts/i5AN97A7IOeygEFA.js create mode 100644 reference_scripts/i7xl0jNpLnBT2h2l.js create mode 100644 reference_scripts/iAo3wxMLA64rsKjj.js create mode 100644 reference_scripts/iBEPQ3NwtI9DfkEy.js create mode 100644 reference_scripts/iHn3YzvqNfbwzjZz.js create mode 100644 reference_scripts/iLpq4yCFN6YACrYA.js create mode 100644 reference_scripts/iM4B3IZ4VtpZsl09.js create mode 100644 reference_scripts/iM6JLF8jDXMViReZ.js create mode 100644 reference_scripts/iMDZLr7ueJWBnilj.js create mode 100644 reference_scripts/iMu8BZ7eHMAbPEO1.js create mode 100644 reference_scripts/iNAQJa5HyaEckknX.js create mode 100644 reference_scripts/iT0h3VZLEBQnn5Bx.js create mode 100644 reference_scripts/iT3C15fMyQrj1RmG.js create mode 100644 reference_scripts/iVhi3Z6zPaf1bf8g.js create mode 100644 reference_scripts/iX0ctHYHg12pjaCU.js create mode 100644 reference_scripts/id9ZdkERMZnZTWXt.js create mode 100644 reference_scripts/igVAVU7DOuzhNG14.js create mode 100644 reference_scripts/imKVsCy8rya2gkwO.js create mode 100644 reference_scripts/inPxRSx0CDj1nwAm.js create mode 100644 reference_scripts/ioeTj5mx8jlA5EX5.js create mode 100644 reference_scripts/ipkkRffJh61WE7zR.js create mode 100644 reference_scripts/iuSoKntfJ4eAPafQ.js create mode 100644 reference_scripts/iuYuf05BNuZ5fllI.js create mode 100644 reference_scripts/j1AmrY1SxFJQyapo.js create mode 100644 reference_scripts/j3zDMWkns32Yrxn3.js create mode 100644 reference_scripts/j6Bf1iivH8cqSnnK.js create mode 100644 reference_scripts/j98hvy6r9G2Vjmid.js create mode 100644 reference_scripts/jC8o5PbnqEvOoZ9N.js create mode 100644 reference_scripts/jFwema0iwzBphxie.js create mode 100644 reference_scripts/jGDk7avWFSnyFoql.js create mode 100644 reference_scripts/jHgxpe6TJDlP3oTn.js create mode 100644 reference_scripts/jLsL4KRI6LEG9Ii2.js create mode 100644 reference_scripts/jObJanFoev4N6ZRv.js create mode 100644 reference_scripts/jRSgPhpfN7MH7TTp.js create mode 100644 reference_scripts/jW87rmQLtROdVEhW.js create mode 100644 reference_scripts/jWkfoVpHLiRaHTza.js create mode 100644 reference_scripts/jYJRO5XPyG7y6fih.js create mode 100644 reference_scripts/jbZPLb4wuqJpHLUx.js create mode 100644 reference_scripts/jdS2u1tQPYeO55WI.js create mode 100644 reference_scripts/jfk5VDKMTIf4ee0v.js create mode 100644 reference_scripts/jgO1Kf60Ctt6R0qO.js create mode 100644 reference_scripts/jmxlpyLrIuoxQtvU.js create mode 100644 reference_scripts/jpcU8FFWSlQ3gD0L.js create mode 100644 reference_scripts/jrvj7bRyMBB9LixP.js create mode 100644 reference_scripts/jsgLEVYvMieyYT6L.js create mode 100644 reference_scripts/k3FqFgsF6a3TkxAD.js create mode 100644 reference_scripts/k8TC0yzp4xfOXD2n.js create mode 100644 reference_scripts/k9SvH4Lm3ZuI8S1N.js create mode 100644 reference_scripts/kBXVEnSWzaQZLkJH.js create mode 100644 reference_scripts/kIM4Fs1lFVV7TSnj.js create mode 100644 reference_scripts/kMSdRskYDI2J1gnp.js create mode 100644 reference_scripts/kWynO1lQzjiSs8RK.js create mode 100644 reference_scripts/kYiDBPRKIokFkr4Z.js create mode 100644 reference_scripts/kYmscP2HuXjDovBD.js create mode 100644 reference_scripts/kiJ6AiaYVUjt6aV6.js create mode 100644 reference_scripts/kkC5EhqA05U6U0gU.js create mode 100644 reference_scripts/kmsGLWGxCY8Z8jVG.js create mode 100644 reference_scripts/kvaN100w0nBUlLbj.js create mode 100644 reference_scripts/l8qFKSnMpy4P7XQR.js create mode 100644 reference_scripts/lCOdnKz8XpnkDs6Q.js create mode 100644 reference_scripts/lFO6XdfUODmFArqx.js create mode 100644 reference_scripts/lII4KMRblqwFBlsV.js create mode 100644 reference_scripts/lOzkngzye4RmvALp.js create mode 100644 reference_scripts/lPudo1grrVp05i7a.js create mode 100644 reference_scripts/lQJ68n3y1xDyNicE.js create mode 100644 reference_scripts/lSOAZ4FG44bT4jh1.js create mode 100644 reference_scripts/lU4s3UTtBkU38djI.js create mode 100644 reference_scripts/lYYkGzqNshiYc7WI.js create mode 100644 reference_scripts/laptAldsT0Fm1rDt.js create mode 100644 reference_scripts/lhemR8EP5tGNKout.js create mode 100644 reference_scripts/ljpM7muMyxGD04EX.js create mode 100644 reference_scripts/lol5J6h0pErzM71s.js create mode 100644 reference_scripts/lvjcddwRiN9iGruy.js create mode 100644 reference_scripts/lwVhn4bSXJ3eoT9q.js create mode 100644 reference_scripts/m3qEVO5fseV6KHXa.js create mode 100644 reference_scripts/m58MpMZBblpq5LJu.js create mode 100644 reference_scripts/m8qBlbH7ROoqa22o.js create mode 100644 reference_scripts/mBcLf11upaHS8AQq.js create mode 100644 reference_scripts/mJ9eMPub4epJSf00.js create mode 100644 reference_scripts/mPxmCsXYirAIT913.js create mode 100644 reference_scripts/mRvLsSVxNyt8LVZb.js create mode 100644 reference_scripts/mTnmPcjWmvScIBWY.js create mode 100644 reference_scripts/mV4Tmc0yfpL09KV7.js create mode 100644 reference_scripts/mYL4i1vNlMl4vFYy.js create mode 100644 reference_scripts/ma0sWhebqwdRHWvY.js create mode 100644 reference_scripts/maKr58mvvyKxFyC3.js create mode 100644 reference_scripts/masOBNgSi5HYkf3m.js create mode 100644 reference_scripts/mgLGN1XPzPE4dReN.js create mode 100644 reference_scripts/mr8qm5Bg6k1idZ6Q.js create mode 100644 reference_scripts/mziJBUYcsrhkdcCJ.js create mode 100644 reference_scripts/n5RJqJL9fdRIxkuN.js create mode 100644 reference_scripts/nCWAflBj7Si2BI1Q.js create mode 100644 reference_scripts/nD2QVg3DrPK3foMf.js create mode 100644 reference_scripts/nEaF3jbCiVYD8jia.js create mode 100644 reference_scripts/nGTxNWBUBgTr87wU.js create mode 100644 reference_scripts/nHJdlqbOP0ECgywb.js create mode 100644 reference_scripts/nSXzktHyNjGUXjaw.js create mode 100644 reference_scripts/nYtAjSArsNbrU2ob.js create mode 100644 reference_scripts/naF5EWr1CBkYRZTK.js create mode 100644 reference_scripts/ncIjDE6TFx88IQA1.js create mode 100644 reference_scripts/neaaVy6D6tfcst5P.js create mode 100644 reference_scripts/ngMm7SgtVqVovFJG.js create mode 100644 reference_scripts/njPP9wDAsdh4WHIj.js create mode 100644 reference_scripts/nkbTnaeBpthyhw4J.js create mode 100644 reference_scripts/nkdKBJ8ItqWiRAWL.js create mode 100644 reference_scripts/nuIpPD4uaZRuJni8.js create mode 100644 reference_scripts/nvrFhHHVq3KzirlR.js create mode 100644 reference_scripts/nxNqWmmF6mJTnrLo.js create mode 100644 reference_scripts/nzh8d46l1ikhkz8Q.js create mode 100644 reference_scripts/o1zD8mej9TWKNxUq.js create mode 100644 reference_scripts/o3JUBKLvE6bBxK2n.js create mode 100644 reference_scripts/o88xuUConwt0vFLw.js create mode 100644 reference_scripts/oDNfCNyt5KaUYmg2.js create mode 100644 reference_scripts/oEsUsI74yGTZ9CwU.js create mode 100644 reference_scripts/oGdsGPgJWcyWkiWl.js create mode 100644 reference_scripts/oHenUKtaS3jT5xQn.js create mode 100644 reference_scripts/oPg4se8iQRD14kmB.js create mode 100644 reference_scripts/oV81zgbZsuTFG6L2.js create mode 100644 reference_scripts/oW1gtYVT5nrxDjM7.js create mode 100644 reference_scripts/oWM43EdUiyHgUlfW.js create mode 100644 reference_scripts/oWa7RkScnl6lR5vd.js create mode 100644 reference_scripts/obIXhQXKFyyQoNNV.js create mode 100644 reference_scripts/ocBW3osTFnb5JCfe.js create mode 100644 reference_scripts/ofddAHvzn1xUueSG.js create mode 100644 reference_scripts/ogJBAXTXyhTqACPO.js create mode 100644 reference_scripts/ohl803m0tUwNfKAk.js create mode 100644 reference_scripts/okW06V9UiPC4Vcrn.js create mode 100644 reference_scripts/okr3TtzpFoefUuJS.js create mode 100644 reference_scripts/oqgd9G6oI1ncPYLw.js create mode 100644 reference_scripts/p222EiR8RRtlPm31.js create mode 100644 reference_scripts/pAgiAGyaLJY10894.js create mode 100644 reference_scripts/pBMioPUtDn1mk9f5.js create mode 100644 reference_scripts/pG5OVokZzCRHIrwz.js create mode 100644 reference_scripts/pHyXdPnWwoFrUA5n.js create mode 100644 reference_scripts/pLKv4moua6XhNdmA.js create mode 100644 reference_scripts/pNPjXEoQGHLKzq0r.js create mode 100644 reference_scripts/pPV9oEydXb7oi6jX.js create mode 100644 reference_scripts/pR4Q2OnPxXtwRVli.js create mode 100644 reference_scripts/pnB9TzSEytkxk3Rb.js create mode 100644 reference_scripts/pq1YQffxtOcqCRTn.js create mode 100644 reference_scripts/px7eEdhOEt7zOTrq.js create mode 100644 reference_scripts/pzimrxrqpv282Oqb.js create mode 100644 reference_scripts/pzknBcJtZWeliE27.js create mode 100644 reference_scripts/q0LvphC8RDSyR0oY.js create mode 100644 reference_scripts/q3nRyXaxksdCiLFM.js create mode 100644 reference_scripts/qAEZgtu5CrfUkxhx.js create mode 100644 reference_scripts/qK4q4o6cQhcGzFX3.js create mode 100644 reference_scripts/qSwCYMMiIHmSV1X5.js create mode 100644 reference_scripts/qT0WBPxLMMO9gvCd.js create mode 100644 reference_scripts/qUwnVlWpsmDom3RK.js create mode 100644 reference_scripts/qZschZU0nee0kJlk.js create mode 100644 reference_scripts/qaVde0sTuMBRi2nl.js create mode 100644 reference_scripts/qcyl98GYD55BkJsD.js create mode 100644 reference_scripts/qijgjcOBCDmhglRX.js create mode 100644 reference_scripts/qjli5evn8UA9uTeZ.js create mode 100644 reference_scripts/qmOt7h17hGAKqQe0.js create mode 100644 reference_scripts/qu194dVXm9Vx1TGk.js create mode 100644 reference_scripts/quPcuKsq2fcild4a.js create mode 100644 reference_scripts/qxzhPtysAjPWspKf.js create mode 100644 reference_scripts/r6hi5vMdLhTaaPfb.js create mode 100644 reference_scripts/rCh3ltUrUMovd2Kc.js create mode 100644 reference_scripts/rF0Z3hTUUnSxL3Mq.js create mode 100644 reference_scripts/rIISfbCShejmJNKw.js create mode 100644 reference_scripts/rLMaVNEGdZ6xj5Au.js create mode 100644 reference_scripts/rRfff55c7elyvbCb.js create mode 100644 reference_scripts/rUGSx06BuBvX9kgf.js create mode 100644 reference_scripts/rVpPNILEzWL9lj6b.js create mode 100644 reference_scripts/rXMylpnEtZpwou6x.js create mode 100644 reference_scripts/ramav4ymrDDkPKK4.js create mode 100644 reference_scripts/ratP9ByLjQPiLlFK.js create mode 100644 reference_scripts/rdaMhMyHrJjQ6vVC.js create mode 100644 reference_scripts/re1UFtxvRRjpPB7Z.js create mode 100644 reference_scripts/red2bt4PGgIWAdTR.js create mode 100644 reference_scripts/rgSwSeB3shIMVMb6.js create mode 100644 reference_scripts/rnioLwiJP7ps5Jwy.js create mode 100644 reference_scripts/roKvPHDSpX4IV11C.js create mode 100644 reference_scripts/rpxQU26BU7nwjtqY.js create mode 100644 reference_scripts/rr4htuVq45onXdRG.js create mode 100644 reference_scripts/rxB1AqfVMDqTRieE.js create mode 100644 reference_scripts/s0kTuDE0qv68V2KI.js create mode 100644 reference_scripts/s5bO0Sf0qpS27Tve.js create mode 100644 reference_scripts/s6eZXfZkC1My6EXl.js create mode 100644 reference_scripts/s7gJQdzuM3fz2zQK.js create mode 100644 reference_scripts/s8idWt9YdMTRfnjV.js create mode 100644 reference_scripts/s8xU6OOZbbfo6VIw.js create mode 100644 reference_scripts/s94yKZ4o5XN4JWM1.js create mode 100644 reference_scripts/sAVpm7hFRHpbCLXm.js create mode 100644 reference_scripts/sB4KB9bT3nQhAoqG.js create mode 100644 reference_scripts/sHfkTRqTWPg2JAGN.js create mode 100644 reference_scripts/sKO8TcLIkCTnFvXu.js create mode 100644 reference_scripts/sNSfDBIA2k17hPYI.js create mode 100644 reference_scripts/sSMg43ZjnNmpytfj.js create mode 100644 reference_scripts/sUHuj00IpoZ7Gd03.js create mode 100644 reference_scripts/sWyO1DNaqb2EdHoW.js create mode 100644 reference_scripts/sYlGRLApZ3Ub24ea.js create mode 100644 reference_scripts/sZwLitzwKBTaFca3.js create mode 100644 reference_scripts/sagKJM6oDFlw4ED2.js create mode 100644 reference_scripts/sbK1a7txpSoXFzyB.js create mode 100644 reference_scripts/scfm5iWWBxWI6QaK.js create mode 100644 reference_scripts/sgS9rblPkQB36C8S.js create mode 100644 reference_scripts/shkBUtUuMPDKvFm7.js create mode 100644 reference_scripts/skVq3eDEYKFF2iZp.js create mode 100644 reference_scripts/sm9d5lk6cM0OuUkf.js create mode 100644 reference_scripts/sx7Ikn8WW00gBFb4.js create mode 100644 reference_scripts/syBgPp7rOymCZejX.js create mode 100644 reference_scripts/syqqBkyP5tGqZ78t.js create mode 100644 reference_scripts/t48hkacYdOpzWvK9.js create mode 100644 reference_scripts/t56mnblo1kv3gM1M.js create mode 100644 reference_scripts/t8LYOuN5peEdWeXP.js create mode 100644 reference_scripts/tCIT1a12Gt6k2ohA.js create mode 100644 reference_scripts/tDrs0aNIYmZPsOoS.js create mode 100644 reference_scripts/tFAKRRRfTjQfdQz3.js create mode 100644 reference_scripts/tG1qGqzBLmAR3WHm.js create mode 100644 reference_scripts/tGVEV6TLl310mFLP.js create mode 100644 reference_scripts/tKBq1nGZo8t6vvQ6.js create mode 100644 reference_scripts/tNTO1LVN7JqHf4YN.js create mode 100644 reference_scripts/tUwP7TjrOOOnaCYJ.js create mode 100644 reference_scripts/tcZug8ehU6lyYBd9.js create mode 100644 reference_scripts/tdICiJ26rJrDbxT6.js create mode 100644 reference_scripts/tn6SwmjAuNzqE6dx.js create mode 100644 reference_scripts/tnE8LF6E3svIlLca.js create mode 100644 reference_scripts/tnilBagajWM8UGQt.js create mode 100644 reference_scripts/toSrgcvWq9b5eN0K.js create mode 100644 reference_scripts/tolkNN5P7oOC8GKZ.js create mode 100644 reference_scripts/u3olS2p7Ls1JXfAH.js create mode 100644 reference_scripts/u5dNZ0s3lWfL8KFb.js create mode 100644 reference_scripts/u6CYMSZADrfXd48Q.js create mode 100644 reference_scripts/uACa6u4JLNMRgFlr.js create mode 100644 reference_scripts/uAy4w7y8Uu9POF8C.js create mode 100644 reference_scripts/uLBDnWC3S0lRitbj.js create mode 100644 reference_scripts/uNYstk3eXmWamhzs.js create mode 100644 reference_scripts/uOHAsKlkFuIaAmjb.js create mode 100644 reference_scripts/uSwkYENTOcnfRrqA.js create mode 100644 reference_scripts/ucF4aiJ1gpDB333G.js create mode 100644 reference_scripts/ugL5IBB6R2yWyMWd.js create mode 100644 reference_scripts/upfK6GM33qZCZjll.js create mode 100644 reference_scripts/uwdQvZtzy2HVeEzx.js create mode 100644 reference_scripts/ux3jaLpAUhZ5YqA6.js create mode 100644 reference_scripts/v00nVCRKqqRvY28t.js create mode 100644 reference_scripts/v4CCxVaVGf9i8U7X.js create mode 100644 reference_scripts/v4ITTsSY9EvCbhZP.js create mode 100644 reference_scripts/v5xrDWcrTNFJkyQB.js create mode 100644 reference_scripts/v6LIG7EwWYALxCpP.js create mode 100644 reference_scripts/vFUVWZ1l8wpTjLcx.js create mode 100644 reference_scripts/vJQRBxDfPwHens0a.js create mode 100644 reference_scripts/vM2BPwYhHQaBAt2C.js create mode 100644 reference_scripts/vNp9wgdSvnNEjZyS.js create mode 100644 reference_scripts/vPG4rV640aSzKzxe.js create mode 100644 reference_scripts/vS2D9QUslR7ZtXXm.js create mode 100644 reference_scripts/vSDMygIT9nNvEGWG.js create mode 100644 reference_scripts/vY3xeTTL3ghPrJpN.js create mode 100644 reference_scripts/vZ5HCrhY8e4R1TrG.js create mode 100644 reference_scripts/vc4bELo0cWYoILfB.js create mode 100644 reference_scripts/vc8eVKtyjtOGvWlK.js create mode 100644 reference_scripts/vcM0IgsYVmfWrlO3.js create mode 100644 reference_scripts/vgfs0DXvF5iKrz1M.js create mode 100644 reference_scripts/vj3zArmX27vCxYJW.js create mode 100644 reference_scripts/vjyTKcNrJzX4XWnS.js create mode 100644 reference_scripts/vuzRRj5d9XdNYx3o.js create mode 100644 reference_scripts/vvVhAqreedtmOR9b.js create mode 100644 reference_scripts/vvdo1NxjmGVkmFCT.js create mode 100644 reference_scripts/vzMxIDjRlQSxXtCW.js create mode 100644 reference_scripts/w3r54pKZQKaH2Yer.js create mode 100644 reference_scripts/w4JKuTECFmu3YmTR.js create mode 100644 reference_scripts/w4zubIHP0XgMXsFe.js create mode 100644 reference_scripts/w7K0lbxQKJ2tsc6f.js create mode 100644 reference_scripts/wAETU6aTRr9d4oCU.js create mode 100644 reference_scripts/wAntJhgb8Og5vJXh.js create mode 100644 reference_scripts/wS6OIR3QN4mOUHn0.js create mode 100644 reference_scripts/wUlYLBT59Efys5aS.js create mode 100644 reference_scripts/wbM7tpw4TxvadcWm.js create mode 100644 reference_scripts/whUSkaR1yem21bXp.js create mode 100644 reference_scripts/wsqNM4NHnwaAAQym.js create mode 100644 reference_scripts/wyTCozh9qGTx6yK0.js create mode 100644 reference_scripts/wzkxiKjxVEeNS1di.js create mode 100644 reference_scripts/x2RLUUNB7BiIDYCP.js create mode 100644 reference_scripts/x76tKw4L8dX00ikE.js create mode 100644 reference_scripts/x8XK2fzzXCnSwfjt.js create mode 100644 reference_scripts/x9G6Du5EWV6byf4C.js create mode 100644 reference_scripts/x9iKFYYc4Ocy8PTS.js create mode 100644 reference_scripts/xBpLQa7yBPczDMY8.js create mode 100644 reference_scripts/xIRU2SaqLeWmqGDI.js create mode 100644 reference_scripts/xL4S0H1RP8hhXW7c.js create mode 100644 reference_scripts/xLKAuD6yzwjAL6tJ.js create mode 100644 reference_scripts/xMhhVol8Is3DJ3gb.js create mode 100644 reference_scripts/xPDMpOvC1ZBVxrNg.js create mode 100644 reference_scripts/xPwa3NftkpMBc2AO.js create mode 100644 reference_scripts/xQ3xR2Wf0wHFa76H.js create mode 100644 reference_scripts/xQnoRTHotZKrwPrx.js create mode 100644 reference_scripts/xRTmMwNfdirjsi8X.js create mode 100644 reference_scripts/xRd6oA1QWLVpfoBm.js create mode 100644 reference_scripts/xS2su09zcza9du09.js create mode 100644 reference_scripts/xUpKYT7BZCSmAfUy.js create mode 100644 reference_scripts/xYTkj8jhSVOSoLbC.js create mode 100644 reference_scripts/xcy5GOUSZ0meIejZ.js create mode 100644 reference_scripts/xgdhf0wlNP2cHIQx.js create mode 100644 reference_scripts/xgplXZMs459X7XXM.js create mode 100644 reference_scripts/xklncIMwQIespDxS.js create mode 100644 reference_scripts/xnHobI9HojObLHMp.js create mode 100644 reference_scripts/xobGBJbgFjQCrwvq.js create mode 100644 reference_scripts/xpgXWoK2zDnG1uiF.js create mode 100644 reference_scripts/xq3RANOtmPhy77ne.js create mode 100644 reference_scripts/xqWxV9w5ezBQdJkZ.js create mode 100644 reference_scripts/xvGxwv7X0Vq3vNqb.js create mode 100644 reference_scripts/xvH4PKJasHcehOZz.js create mode 100644 reference_scripts/y3agVFVBR8tVqWyx.js create mode 100644 reference_scripts/yAL0YwZWVm8o1nxa.js create mode 100644 reference_scripts/yCgH3N9AurIiAv0i.js create mode 100644 reference_scripts/yDvxF9llUYwJg0sE.js create mode 100644 reference_scripts/yFMvxecXAZ6T2O0S.js create mode 100644 reference_scripts/yIGItnshXI4W46cp.js create mode 100644 reference_scripts/yMMzZ7daCqRlGT3N.js create mode 100644 reference_scripts/yPxYRObUiqAIhlNB.js create mode 100644 reference_scripts/yRRzSKlcN3L7rEEe.js create mode 100644 reference_scripts/yTmRoUstxHMso91c.js create mode 100644 reference_scripts/yXUPiWuQ5o0JBY4i.js create mode 100644 reference_scripts/yatUu0cd7iKs50rq.js create mode 100644 reference_scripts/ybxDG2ezvRx02LYx.js create mode 100644 reference_scripts/ynNCBAYwJFkTiXV1.js create mode 100644 reference_scripts/ynV7tz0OdCwlsQp6.js create mode 100644 reference_scripts/ynoHNXXCGRS6fTqF.js create mode 100644 reference_scripts/yzN7ZNlgCiSVJqsU.js create mode 100644 reference_scripts/z5HfNUrHy5MS3K7a.js create mode 100644 reference_scripts/z926Cl2vxUfyLY0V.js create mode 100644 reference_scripts/z9NEbIUBsKMaTuCz.js create mode 100644 reference_scripts/zA6TDttpwMSMl7D8.js create mode 100644 reference_scripts/zBHTIBU8OlYj1YIO.js create mode 100644 reference_scripts/zFYCaGR0wbFWjl4T.js create mode 100644 reference_scripts/zK38Rl5t9zbFi4Se.js create mode 100644 reference_scripts/zR4WAjzXHTZuiu5G.js create mode 100644 reference_scripts/zUv9e0A3OEXWY9Mv.js create mode 100644 reference_scripts/zY4ZjY7uyKIKMYmX.js create mode 100644 reference_scripts/zadppy7FEbXvgUON.js create mode 100644 reference_scripts/zi8Z3NlwVj3IfgAW.js create mode 100644 reference_scripts/ziG9H5Kdb7xC3dFE.js create mode 100644 reference_scripts/zk44dFEGkylB7kW6.js create mode 100644 reference_scripts/zphxI8VSWbNQCMBy.js create mode 100644 reference_scripts/zqShIJnrRReGgP94.js create mode 100644 reference_scripts/zsiV6XEHlCNGLLPl.js create mode 100644 reference_scripts/zsoTVkHe4nHY1M52.js create mode 100644 reference_scripts/zzk2uRSFjFHB5kjw.js diff --git a/packs/aides-de-jeu-fr/000699.log b/packs/aides-de-jeu-fr/000703.log similarity index 100% rename from packs/aides-de-jeu-fr/000699.log rename to packs/aides-de-jeu-fr/000703.log diff --git a/packs/aides-de-jeu-fr/CURRENT b/packs/aides-de-jeu-fr/CURRENT index 0b27d8d..1b61662 100644 --- a/packs/aides-de-jeu-fr/CURRENT +++ b/packs/aides-de-jeu-fr/CURRENT @@ -1 +1 @@ -MANIFEST-000697 +MANIFEST-000701 diff --git a/packs/aides-de-jeu-fr/LOG b/packs/aides-de-jeu-fr/LOG index 57d3b71..b1b3d69 100644 --- a/packs/aides-de-jeu-fr/LOG +++ b/packs/aides-de-jeu-fr/LOG @@ -1,7 +1,7 @@ -2024/05/17-09:18:35.938297 7fe534c006c0 Recovering log #695 -2024/05/17-09:18:35.991443 7fe534c006c0 Delete type=3 #693 -2024/05/17-09:18:35.991560 7fe534c006c0 Delete type=0 #695 -2024/05/17-09:19:36.697860 7fe52e2006c0 Level-0 table #700: started -2024/05/17-09:19:36.697941 7fe52e2006c0 Level-0 table #700: 0 bytes OK -2024/05/17-09:19:36.704693 7fe52e2006c0 Delete type=0 #698 -2024/05/17-09:19:36.718677 7fe52e2006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal!suuYN87Al1ZZWtQQ' @ 0 : 0; will stop at (end) +2024/05/17-11:04:57.796036 7f27116006c0 Recovering log #699 +2024/05/17-11:04:57.806593 7f27116006c0 Delete type=3 #697 +2024/05/17-11:04:57.806662 7f27116006c0 Delete type=0 #699 +2024/05/17-12:44:44.836364 7f270d8006c0 Level-0 table #704: started +2024/05/17-12:44:44.836392 7f270d8006c0 Level-0 table #704: 0 bytes OK +2024/05/17-12:44:44.842760 7f270d8006c0 Delete type=0 #702 +2024/05/17-12:44:44.863585 7f270d8006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal!suuYN87Al1ZZWtQQ' @ 0 : 0; will stop at (end) diff --git a/packs/aides-de-jeu-fr/LOG.old b/packs/aides-de-jeu-fr/LOG.old index 281dc62..57d3b71 100644 --- a/packs/aides-de-jeu-fr/LOG.old +++ b/packs/aides-de-jeu-fr/LOG.old @@ -1,7 +1,7 @@ -2024/05/17-08:21:24.883877 7fe5360006c0 Recovering log #691 -2024/05/17-08:21:24.937952 7fe5360006c0 Delete type=3 #689 -2024/05/17-08:21:24.938049 7fe5360006c0 Delete type=0 #691 -2024/05/17-09:04:58.970123 7fe52e2006c0 Level-0 table #696: started -2024/05/17-09:04:58.970194 7fe52e2006c0 Level-0 table #696: 0 bytes OK -2024/05/17-09:04:58.976736 7fe52e2006c0 Delete type=0 #694 -2024/05/17-09:04:58.984265 7fe52e2006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal!suuYN87Al1ZZWtQQ' @ 0 : 0; will stop at (end) +2024/05/17-09:18:35.938297 7fe534c006c0 Recovering log #695 +2024/05/17-09:18:35.991443 7fe534c006c0 Delete type=3 #693 +2024/05/17-09:18:35.991560 7fe534c006c0 Delete type=0 #695 +2024/05/17-09:19:36.697860 7fe52e2006c0 Level-0 table #700: started +2024/05/17-09:19:36.697941 7fe52e2006c0 Level-0 table #700: 0 bytes OK +2024/05/17-09:19:36.704693 7fe52e2006c0 Delete type=0 #698 +2024/05/17-09:19:36.718677 7fe52e2006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal!suuYN87Al1ZZWtQQ' @ 0 : 0; will stop at (end) diff --git a/packs/aides-de-jeu-fr/MANIFEST-000697 b/packs/aides-de-jeu-fr/MANIFEST-000701 similarity index 71% rename from packs/aides-de-jeu-fr/MANIFEST-000697 rename to packs/aides-de-jeu-fr/MANIFEST-000701 index 8f608bdf79337008f955382574e1425f8d726409..1ee920d6c68d77fbbcf976690db89dfe49110067 100644 GIT binary patch delta 41 scmdnOxP@`TB&Ec8VQpLtj7pGxSjc^upfj7$euIT@G_va;M`%t^_*1QIz25;+VK0RS563%vjU delta 43 tcmdnQxQTH>pGt9qV364(zCI0zH~0Ol(S5&!@I delta 41 scmdnOxP@`TB&9;uXS`etj7+;&IT@IDv$BZ0rOs*v3G4<5>;(z{0ODH-O8@`> diff --git a/packs/plats-dauberges/000699.log b/packs/plats-dauberges/000703.log similarity index 100% rename from packs/plats-dauberges/000699.log rename to packs/plats-dauberges/000703.log diff --git a/packs/plats-dauberges/CURRENT b/packs/plats-dauberges/CURRENT index 0b27d8d..1b61662 100644 --- a/packs/plats-dauberges/CURRENT +++ b/packs/plats-dauberges/CURRENT @@ -1 +1 @@ -MANIFEST-000697 +MANIFEST-000701 diff --git a/packs/plats-dauberges/LOG b/packs/plats-dauberges/LOG index 9b1fbb6..bdd8db4 100644 --- a/packs/plats-dauberges/LOG +++ b/packs/plats-dauberges/LOG @@ -1,7 +1,7 @@ -2024/05/17-09:18:35.800961 7fe534c006c0 Recovering log #695 -2024/05/17-09:18:35.861612 7fe534c006c0 Delete type=3 #693 -2024/05/17-09:18:35.861767 7fe534c006c0 Delete type=0 #695 -2024/05/17-09:19:36.683771 7fe52e2006c0 Level-0 table #700: started -2024/05/17-09:19:36.683809 7fe52e2006c0 Level-0 table #700: 0 bytes OK -2024/05/17-09:19:36.690012 7fe52e2006c0 Delete type=0 #698 -2024/05/17-09:19:36.697655 7fe52e2006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end) +2024/05/17-11:04:57.769897 7f27116006c0 Recovering log #699 +2024/05/17-11:04:57.779543 7f27116006c0 Delete type=3 #697 +2024/05/17-11:04:57.779674 7f27116006c0 Delete type=0 #699 +2024/05/17-12:44:44.827875 7f270d8006c0 Level-0 table #704: started +2024/05/17-12:44:44.827939 7f270d8006c0 Level-0 table #704: 0 bytes OK +2024/05/17-12:44:44.835981 7f270d8006c0 Delete type=0 #702 +2024/05/17-12:44:44.836202 7f270d8006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end) diff --git a/packs/plats-dauberges/LOG.old b/packs/plats-dauberges/LOG.old index a7a8d38..9b1fbb6 100644 --- a/packs/plats-dauberges/LOG.old +++ b/packs/plats-dauberges/LOG.old @@ -1,7 +1,7 @@ -2024/05/17-08:21:24.759453 7fe5360006c0 Recovering log #691 -2024/05/17-08:21:24.814916 7fe5360006c0 Delete type=3 #689 -2024/05/17-08:21:24.815076 7fe5360006c0 Delete type=0 #691 -2024/05/17-09:04:58.947462 7fe52e2006c0 Level-0 table #696: started -2024/05/17-09:04:58.947511 7fe52e2006c0 Level-0 table #696: 0 bytes OK -2024/05/17-09:04:58.954096 7fe52e2006c0 Delete type=0 #694 -2024/05/17-09:04:58.969969 7fe52e2006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end) +2024/05/17-09:18:35.800961 7fe534c006c0 Recovering log #695 +2024/05/17-09:18:35.861612 7fe534c006c0 Delete type=3 #693 +2024/05/17-09:18:35.861767 7fe534c006c0 Delete type=0 #695 +2024/05/17-09:19:36.683771 7fe52e2006c0 Level-0 table #700: started +2024/05/17-09:19:36.683809 7fe52e2006c0 Level-0 table #700: 0 bytes OK +2024/05/17-09:19:36.690012 7fe52e2006c0 Delete type=0 #698 +2024/05/17-09:19:36.697655 7fe52e2006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end) diff --git a/packs/plats-dauberges/MANIFEST-000697 b/packs/plats-dauberges/MANIFEST-000701 similarity index 83% rename from packs/plats-dauberges/MANIFEST-000697 rename to packs/plats-dauberges/MANIFEST-000701 index a18d37cc1f6164708bab50785e93e9a48345fdbd..f4f36e9ae4c734805b6aa4b7abf887936b26b280 100644 GIT binary patch delta 43 tcmaFL_>^(NL6!BEMeN)Rj7^(NL6x}8%u~4;7@2mlaxyUQW@UNBxF>UN21sN#NMtWa1OO_@3@88q diff --git a/packs/tables-des-traductions/000342.log b/packs/tables-des-traductions/000346.log similarity index 100% rename from packs/tables-des-traductions/000342.log rename to packs/tables-des-traductions/000346.log diff --git a/packs/tables-des-traductions/CURRENT b/packs/tables-des-traductions/CURRENT index 757ec85..0f17308 100644 --- a/packs/tables-des-traductions/CURRENT +++ b/packs/tables-des-traductions/CURRENT @@ -1 +1 @@ -MANIFEST-000340 +MANIFEST-000344 diff --git a/packs/tables-des-traductions/LOG b/packs/tables-des-traductions/LOG index ed0f40e..3016e1f 100644 --- a/packs/tables-des-traductions/LOG +++ b/packs/tables-des-traductions/LOG @@ -1,8 +1,8 @@ -2024/05/17-09:18:36.061831 7fe534c006c0 Recovering log #338 -2024/05/17-09:18:36.115673 7fe534c006c0 Delete type=3 #336 -2024/05/17-09:18:36.115838 7fe534c006c0 Delete type=0 #338 -2024/05/17-09:19:36.711754 7fe52e2006c0 Level-0 table #343: started -2024/05/17-09:19:36.711813 7fe52e2006c0 Level-0 table #343: 0 bytes OK -2024/05/17-09:19:36.718459 7fe52e2006c0 Delete type=0 #341 -2024/05/17-09:19:36.718736 7fe52e2006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end) -2024/05/17-09:19:36.718776 7fe52e2006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end) +2024/05/17-11:04:57.822877 7f27116006c0 Recovering log #342 +2024/05/17-11:04:57.832725 7f27116006c0 Delete type=3 #340 +2024/05/17-11:04:57.832777 7f27116006c0 Delete type=0 #342 +2024/05/17-12:44:44.842930 7f270d8006c0 Level-0 table #347: started +2024/05/17-12:44:44.842995 7f270d8006c0 Level-0 table #347: 0 bytes OK +2024/05/17-12:44:44.850266 7f270d8006c0 Delete type=0 #345 +2024/05/17-12:44:44.863607 7f270d8006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end) +2024/05/17-12:44:44.864005 7f270d8006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end) diff --git a/packs/tables-des-traductions/LOG.old b/packs/tables-des-traductions/LOG.old index faae7cf..ed0f40e 100644 --- a/packs/tables-des-traductions/LOG.old +++ b/packs/tables-des-traductions/LOG.old @@ -1,8 +1,8 @@ -2024/05/17-08:21:25.004562 7fe5360006c0 Recovering log #334 -2024/05/17-08:21:25.072829 7fe5360006c0 Delete type=3 #332 -2024/05/17-08:21:25.072953 7fe5360006c0 Delete type=0 #334 -2024/05/17-09:04:58.961703 7fe52e2006c0 Level-0 table #339: started -2024/05/17-09:04:58.961771 7fe52e2006c0 Level-0 table #339: 0 bytes OK -2024/05/17-09:04:58.969548 7fe52e2006c0 Delete type=0 #337 -2024/05/17-09:04:58.970030 7fe52e2006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end) -2024/05/17-09:04:58.970097 7fe52e2006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end) +2024/05/17-09:18:36.061831 7fe534c006c0 Recovering log #338 +2024/05/17-09:18:36.115673 7fe534c006c0 Delete type=3 #336 +2024/05/17-09:18:36.115838 7fe534c006c0 Delete type=0 #338 +2024/05/17-09:19:36.711754 7fe52e2006c0 Level-0 table #343: started +2024/05/17-09:19:36.711813 7fe52e2006c0 Level-0 table #343: 0 bytes OK +2024/05/17-09:19:36.718459 7fe52e2006c0 Delete type=0 #341 +2024/05/17-09:19:36.718736 7fe52e2006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end) +2024/05/17-09:19:36.718776 7fe52e2006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end) diff --git a/packs/tables-des-traductions/MANIFEST-000340 b/packs/tables-des-traductions/MANIFEST-000340 deleted file mode 100644 index 8cf45ce9f8771f0c6b6ca0f9b4b0609f7bf01416..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 143 zcmWGJz2r<910$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAei1tp>(4LDii%nJrA2v( zIf@3RW}ZHNenmc+0folynZ}Ha3}ApzQJEH1kz?X%9^qIT>Sk7C%*X>#(XhVg8y5p3 a(^V!;2Igx_EIeoGB)mZa*FXX{fC2#8#3*3^ diff --git a/packs/tables-des-traductions/MANIFEST-000344 b/packs/tables-des-traductions/MANIFEST-000344 new file mode 100644 index 0000000000000000000000000000000000000000..6e35c58aae7107b7b0cf802bcd816425bdeeca95 GIT binary patch literal 143 zcmWGJz2r<910$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAei1tp>(4LDii%nJrA2v( zIf@3RW}ZHNenmc+0folynZ}Ha3}ApzQJEH1kz?X%9^qIT>Sk7C%*X>#@#Qa{B^LuD b(@iE$2IgB#EIbP)@ACl(+yV*Q0SW*B+4Cr( literal 0 HcmV?d00001 diff --git a/reference_scripts/00ZCnahnTGvzG9KA.js b/reference_scripts/00ZCnahnTGvzG9KA.js new file mode 100644 index 0000000..4018161 --- /dev/null +++ b/reference_scripts/00ZCnahnTGvzG9KA.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.weczkAMPlTjX7lqU") +this.actor.createEmbeddedDocuments("Item", [item]) \ No newline at end of file diff --git a/reference_scripts/01VFjGVxkjb5P1ve.js b/reference_scripts/01VFjGVxkjb5P1ve.js new file mode 100644 index 0000000..fe302f4 --- /dev/null +++ b/reference_scripts/01VFjGVxkjb5P1ve.js @@ -0,0 +1 @@ +return args.item?.system?.isRanged && args.data.targets[0]?.actor?.sizeNum < 3 \ No newline at end of file diff --git a/reference_scripts/03mJu59V4iByWlsO.js b/reference_scripts/03mJu59V4iByWlsO.js new file mode 100644 index 0000000..bba8bab --- /dev/null +++ b/reference_scripts/03mJu59V4iByWlsO.js @@ -0,0 +1,25 @@ +// The imbiber immediately +// takes 3 Poisoned Conditions that cannot be resisted at first, +await this.actor.addCondition("poisoned", 3) + +// recovers a number of Wounds equal to their Toughness Bonus, +await this.actor.modifyWounds(this.actor.system.characteristics.t.bonus) + +// and acquires the Regenerate Creature Trait. +const hasRegenerate = this.actor.has("Regenerate") +if (hasRegenerate === undefined) { + fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR").then(trait => { + let traitItem = trait.toObject() + this.actor.createEmbeddedDocuments("Item", [traitItem], {fromEffect: this.effect.id}) + }) +} + +this.script.scriptMessage(`

${this.actor.prototypeToken.name} has +

    +
  • gained 3 Poisoned Conditions that cannot be resisted at first
  • +
  • recovered ${this.actor.system.characteristics.t.bonus} Wounds
  • +
  • acquired the Regenerate Creature Trait.
  • +
+ It’s up to Ranald if their regenerating can outpace their poisoning.

+

When all Poisoned Conditions are lost, so too is Regenerate.

`, + { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) diff --git a/reference_scripts/04bAiHISSW53w94Y.js b/reference_scripts/04bAiHISSW53w94Y.js new file mode 100644 index 0000000..2909e9f --- /dev/null +++ b/reference_scripts/04bAiHISSW53w94Y.js @@ -0,0 +1 @@ +this.actor.addCondition("blinded", 3) \ No newline at end of file diff --git a/reference_scripts/06IaVCOC0RCJbxEf.js b/reference_scripts/06IaVCOC0RCJbxEf.js new file mode 100644 index 0000000..b2f49cb --- /dev/null +++ b/reference_scripts/06IaVCOC0RCJbxEf.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.8piWcBKFlQ2J1E3A") +let data = item.toObject(); +data.system.location.key= this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data]) \ No newline at end of file diff --git a/reference_scripts/09sSpnW8z2zcVEdf.js b/reference_scripts/09sSpnW8z2zcVEdf.js new file mode 100644 index 0000000..7079a3c --- /dev/null +++ b/reference_scripts/09sSpnW8z2zcVEdf.js @@ -0,0 +1,5 @@ +if (!args.flags.quietenedApplied) +{ + args.fields.modifier += 10; + args.flags.quietenedApplied = true +} \ No newline at end of file diff --git a/reference_scripts/0BP5l7bIkf744G1k.js b/reference_scripts/0BP5l7bIkf744G1k.js new file mode 100644 index 0000000..22f117a --- /dev/null +++ b/reference_scripts/0BP5l7bIkf744G1k.js @@ -0,0 +1 @@ +return !args.options.terror && !args.extendedTest?.flags.wfrp4e?.fear \ No newline at end of file diff --git a/reference_scripts/0FNOq4J1AdPd2A0q.js b/reference_scripts/0FNOq4J1AdPd2A0q.js new file mode 100644 index 0000000..ed69d87 --- /dev/null +++ b/reference_scripts/0FNOq4J1AdPd2A0q.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Row")) && !args.skill?.name.includes(game.i18n.localize("NAME.Sail")); \ No newline at end of file diff --git a/reference_scripts/0FWto1oEr3jbWggw.js b/reference_scripts/0FWto1oEr3jbWggw.js new file mode 100644 index 0000000..cf49a45 --- /dev/null +++ b/reference_scripts/0FWto1oEr3jbWggw.js @@ -0,0 +1,22 @@ +let spells = await game.wfrp4e.utility.findAll("spell", "Loading Spells") + +let text = (await game.wfrp4e.tables.rollTable("random-caster", {hideDSN: true})).result + +lore = Array.from(text.matchAll(/{(.+?)}/gm))[0][1] + +if (text == "GM's Choice") +{ + return this.script.scriptNotification(text) +} + +if (spellsWithLore.length > 0) +{ + let spellsWithLore = spells.filter(i => game.wfrp4e.config.magicLores[i.system.lore.value] == lore) + let selectedSpell = spellsWithLore[Math.floor(CONFIG.Dice.randomUniform() * spellsWithLore.length)] + this.script.scriptNotification(selectedSpell.name); + this.actor.createEmbeddedDocuments("Item", [selectedSpell]) +} +else +{ + ui.notifications.notify(`Could not find ${lore} spell. Try Again`) +} \ No newline at end of file diff --git a/reference_scripts/0KG3HoTNoZhaINIj.js b/reference_scripts/0KG3HoTNoZhaINIj.js new file mode 100644 index 0000000..195442f --- /dev/null +++ b/reference_scripts/0KG3HoTNoZhaINIj.js @@ -0,0 +1,6 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.4CMKeDTDrRQZbPIJ") +let fixation = (await game.wfrp4e.tables.rollTable("fixations")) +let data = item.toObject(); +data.system.specification.value = fixation.result; +this.item.updateSource({name : this.item.name += ` (${fixation.result})`}); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/0LCQtsiK2aUfYRmD.js b/reference_scripts/0LCQtsiK2aUfYRmD.js new file mode 100644 index 0000000..8bdb4ef --- /dev/null +++ b/reference_scripts/0LCQtsiK2aUfYRmD.js @@ -0,0 +1 @@ +return !["t", "wp"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/0R0QAr3D024kWPfo.js b/reference_scripts/0R0QAr3D024kWPfo.js new file mode 100644 index 0000000..1158f1b --- /dev/null +++ b/reference_scripts/0R0QAr3D024kWPfo.js @@ -0,0 +1,18 @@ +let table = game.wfrp4e.tables.findTable("mutatephys"); +if (!table) +{ + return ui.notifications.error("Mutation table not found, please ensure a table with the `mutatephys` key is imported in the world.") +} +let result = (await table.roll()).results[0]; +let uuid = `Compendium.${result.documentCollection}.${result.documentId}` +let item = await fromUuid(uuid); + +if (item) +{ + this.script.scriptNotification(`${item.name} added`) + this.actor.createEmbeddedDocuments("Item", [item]) +} +else +{ + ui.notifications.error("Item could not be found: " + uuid) +} \ No newline at end of file diff --git a/reference_scripts/0Uly7OmkH0zqYbxQ.js b/reference_scripts/0Uly7OmkH0zqYbxQ.js new file mode 100644 index 0000000..1f6cc4b --- /dev/null +++ b/reference_scripts/0Uly7OmkH0zqYbxQ.js @@ -0,0 +1,21 @@ +let location = this.item.system.location.key; + +if (location) +{ + let dropped = this.item.system.weaponsAtLocation; + + if (dropped.length) + { + this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + for(let weapon of dropped) + { + await weapon.system.toggleEquip(); + } + } +} + +let roll = await new Roll("max(1, 1d10 - @system.characteristics.t.bonus)", this.actor).roll() + +roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Duration)`})); + +this.effect.updateSource({"duration.rounds" : roll.total}) \ No newline at end of file diff --git a/reference_scripts/0YKQGbsKdHSmYGE7.js b/reference_scripts/0YKQGbsKdHSmYGE7.js new file mode 100644 index 0000000..bb5ad3c --- /dev/null +++ b/reference_scripts/0YKQGbsKdHSmYGE7.js @@ -0,0 +1,9 @@ +if (args.skill?.name != game.i18n.localize("NAME.Gossip")) +{ + return true; +} +else +{ + args.data.canReverse = true; // 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 +} + \ No newline at end of file diff --git a/reference_scripts/0abwNjpzo3SbEOeO.js b/reference_scripts/0abwNjpzo3SbEOeO.js new file mode 100644 index 0000000..e114510 --- /dev/null +++ b/reference_scripts/0abwNjpzo3SbEOeO.js @@ -0,0 +1,6 @@ +if (args.applyAP && args.modifiers.ap.metal) +{ + args.modifiers.ap.ignored += args.modifiers.ap.metal + args.modifiers.ap.details.push("" + this.effect.name + ": Ignore Metal (" + args.modifiers.ap.metal + ")"); + args.modifiers.ap.metal = 0 +} \ No newline at end of file diff --git a/reference_scripts/0e0UZT2FodOJDdgW.js b/reference_scripts/0e0UZT2FodOJDdgW.js new file mode 100644 index 0000000..b4db0a3 --- /dev/null +++ b/reference_scripts/0e0UZT2FodOJDdgW.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/0e7OkamNAaAk4Oit.js b/reference_scripts/0e7OkamNAaAk4Oit.js new file mode 100644 index 0000000..60cb5c0 --- /dev/null +++ b/reference_scripts/0e7OkamNAaAk4Oit.js @@ -0,0 +1,10 @@ +let item1 = await fromUuid("Compendium.wfrp4e-core.items.3S4OYOZLauXctmev") +let item2 = await fromUuid("Compendium.wfrp4e-core.items.7mCcI3q7hgWcmbBU") + +let data1 = item1.toObject(); +data1.system.location.key = this.item.system.location.key + +let data2 = item2.toObject(); +data2.system.location.key = this.item.system.location.key + +this.actor.createEmbeddedDocuments("Item", [data1, data2], {fromEffect: this.effect.id}) diff --git a/reference_scripts/0iTLDgFHO9Rgc010.js b/reference_scripts/0iTLDgFHO9Rgc010.js new file mode 100644 index 0000000..5d34264 --- /dev/null +++ b/reference_scripts/0iTLDgFHO9Rgc010.js @@ -0,0 +1 @@ +args.fields.modifier -= 20; \ No newline at end of file diff --git a/reference_scripts/0mrUnxzufYgsR0Ph.js b/reference_scripts/0mrUnxzufYgsR0Ph.js new file mode 100644 index 0000000..2c22c29 --- /dev/null +++ b/reference_scripts/0mrUnxzufYgsR0Ph.js @@ -0,0 +1,7 @@ +this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => { + await test.roll() + if (test.failed) + { + this.actor.addCondition("stunned") + } +}) diff --git a/reference_scripts/0vaYwAlMWTmOBl8k.js b/reference_scripts/0vaYwAlMWTmOBl8k.js new file mode 100644 index 0000000..002e76f --- /dev/null +++ b/reference_scripts/0vaYwAlMWTmOBl8k.js @@ -0,0 +1,7 @@ +if (!args.flags.strikeToStun) +{ + args.flags.strikeToStun = true + args.fields.modifier += 20; + args.fields.hitLocation = "head"; +} +args.fields.successBonus++; \ No newline at end of file diff --git a/reference_scripts/0yyofYHeDRQlFliO.js b/reference_scripts/0yyofYHeDRQlFliO.js new file mode 100644 index 0000000..dda0e0e --- /dev/null +++ b/reference_scripts/0yyofYHeDRQlFliO.js @@ -0,0 +1 @@ +return args.options.terror || args.extendedTest?.flags.wfrp4e?.fear \ No newline at end of file diff --git a/reference_scripts/11uCC0mK2uL783al.js b/reference_scripts/11uCC0mK2uL783al.js new file mode 100644 index 0000000..100b843 --- /dev/null +++ b/reference_scripts/11uCC0mK2uL783al.js @@ -0,0 +1,6 @@ +let type = this.item.getFlag("wfrp4e", "breath"); + +if (["fire", "electricity", "poison"].includes(type)) +{ + args.applyAP = false; +} \ No newline at end of file diff --git a/reference_scripts/16nCOByUaSFDym1V.js b/reference_scripts/16nCOByUaSFDym1V.js new file mode 100644 index 0000000..7d16a24 --- /dev/null +++ b/reference_scripts/16nCOByUaSFDym1V.js @@ -0,0 +1 @@ +args.fields.modifier -= 20 diff --git a/reference_scripts/190PHSHKGaJ74wsR.js b/reference_scripts/190PHSHKGaJ74wsR.js new file mode 100644 index 0000000..dd52e55 --- /dev/null +++ b/reference_scripts/190PHSHKGaJ74wsR.js @@ -0,0 +1,31 @@ +if (!this.item.name.includes("(") || this.item.system.tests.value.includes("Terrain")) +{ + 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("(")) + { + 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 : "Coastal", + deserts : "Deserts", + marshes : "Marshes", + rocky : "Rocky", + tundra : "Tundra", + woodlands : "Woodlands" + }, this.item.img), 1, "Choose 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}) +} \ No newline at end of file diff --git a/reference_scripts/1A87vGLh2PXH0rG0.js b/reference_scripts/1A87vGLh2PXH0rG0.js new file mode 100644 index 0000000..8a4090c --- /dev/null +++ b/reference_scripts/1A87vGLh2PXH0rG0.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Language")); \ No newline at end of file diff --git a/reference_scripts/1BT0MWM2cbhlEnrn.js b/reference_scripts/1BT0MWM2cbhlEnrn.js new file mode 100644 index 0000000..46f9433 --- /dev/null +++ b/reference_scripts/1BT0MWM2cbhlEnrn.js @@ -0,0 +1,40 @@ + let characteristics = { + "ws" : 5, + "bs" : 5, + "s" : 5, + "t" : 0, + "i" : 5, + "ag" : 5, + "dex" : 5, + "int" : 0, + "wp" : 5, + "fel" : 5 + } + let items = [] + + let updateObj = this.actor.toObject(); + + let talents = (await Promise.all([game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents"), game.wfrp4e.tables.rollTable("talents")])).map(i => i.text) + + for (let ch in characteristics) + { + updateObj.system.characteristics[ch].modifier += characteristics[ch]; + } + + for (let talent of talents) + { + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } + } + + + await this.actor.update(updateObj) + this.actor.createEmbeddedDocuments("Item", items); + diff --git a/reference_scripts/1E47r2ba6IGe8uFK.js b/reference_scripts/1E47r2ba6IGe8uFK.js new file mode 100644 index 0000000..f6a8c61 --- /dev/null +++ b/reference_scripts/1E47r2ba6IGe8uFK.js @@ -0,0 +1 @@ +return args.characteristic != "t" \ No newline at end of file diff --git a/reference_scripts/1IodsW9ImamYoEYz.js b/reference_scripts/1IodsW9ImamYoEYz.js new file mode 100644 index 0000000..b72334a --- /dev/null +++ b/reference_scripts/1IodsW9ImamYoEYz.js @@ -0,0 +1 @@ +args.actor.details.move.run += 4 \ No newline at end of file diff --git a/reference_scripts/1JwxZujbDcueLWBL.js b/reference_scripts/1JwxZujbDcueLWBL.js new file mode 100644 index 0000000..133c071 --- /dev/null +++ b/reference_scripts/1JwxZujbDcueLWBL.js @@ -0,0 +1,2 @@ +await this.actor.addCondition("ablaze", 2) +await this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true})) \ No newline at end of file diff --git a/reference_scripts/1LDm3OB32skZe6Xv.js b/reference_scripts/1LDm3OB32skZe6Xv.js new file mode 100644 index 0000000..f504f6b --- /dev/null +++ b/reference_scripts/1LDm3OB32skZe6Xv.js @@ -0,0 +1 @@ +return args.characteristic != "wp" \ No newline at end of file diff --git a/reference_scripts/1MDOKny7IirJPoI6.js b/reference_scripts/1MDOKny7IirJPoI6.js new file mode 100644 index 0000000..0826c2c --- /dev/null +++ b/reference_scripts/1MDOKny7IirJPoI6.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` ${this.effect.name}`}) +await test.roll() +if (test.succeeded) +{ + this.effect.delete(); +} diff --git a/reference_scripts/1OpT3CXs07XFWWCT.js b/reference_scripts/1OpT3CXs07XFWWCT.js new file mode 100644 index 0000000..4e10bbf --- /dev/null +++ b/reference_scripts/1OpT3CXs07XFWWCT.js @@ -0,0 +1 @@ +args.options.cardsharp = true; \ No newline at end of file diff --git a/reference_scripts/1PQPxFjmRlulHHzo.js b/reference_scripts/1PQPxFjmRlulHHzo.js new file mode 100644 index 0000000..b3f0001 --- /dev/null +++ b/reference_scripts/1PQPxFjmRlulHHzo.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) +{ + args.actor.addCondition("bleeding", 2); +} + \ No newline at end of file diff --git a/reference_scripts/1UalUmNzjB4rp3SZ.js b/reference_scripts/1UalUmNzjB4rp3SZ.js new file mode 100644 index 0000000..c76dee9 --- /dev/null +++ b/reference_scripts/1UalUmNzjB4rp3SZ.js @@ -0,0 +1 @@ +return ["ws", "bs", "s", "ag", "t", "dex"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/1ZArMNUI8qqH6zkX.js b/reference_scripts/1ZArMNUI8qqH6zkX.js new file mode 100644 index 0000000..4aaa318 --- /dev/null +++ b/reference_scripts/1ZArMNUI8qqH6zkX.js @@ -0,0 +1,7 @@ +let test = await args.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gained a Stunned Condition"}}) +await test.roll(); +if (test.failed) +{ + args.actor.addCondition("stunned") +} + diff --git a/reference_scripts/1ZrzpfVwPJHdwp23.js b/reference_scripts/1ZrzpfVwPJHdwp23.js new file mode 100644 index 0000000..31f227d --- /dev/null +++ b/reference_scripts/1ZrzpfVwPJHdwp23.js @@ -0,0 +1 @@ +this.actor.status.addArmour(1, {source: this.effect, magical : true}) \ No newline at end of file diff --git a/reference_scripts/1exiWlVUHsXDLLAH.js b/reference_scripts/1exiWlVUHsXDLLAH.js new file mode 100644 index 0000000..8cd3baa --- /dev/null +++ b/reference_scripts/1exiWlVUHsXDLLAH.js @@ -0,0 +1 @@ +this.script.scriptNotification(`Cannot enter ${this.effect.name}!`); \ No newline at end of file diff --git a/reference_scripts/1fQr1Dg7DX0vfz3r.js b/reference_scripts/1fQr1Dg7DX0vfz3r.js new file mode 100644 index 0000000..13794a7 --- /dev/null +++ b/reference_scripts/1fQr1Dg7DX0vfz3r.js @@ -0,0 +1,3 @@ +let healed = parseInt(this.effect.sourceTest.result.SL) +this.actor.modifyWounds(healed) +this.script.scriptMessage(`Healed ${healed} Wounds`) \ No newline at end of file diff --git a/reference_scripts/1kB2su7hLRYDhZ2H.js b/reference_scripts/1kB2su7hLRYDhZ2H.js new file mode 100644 index 0000000..5b9bccf --- /dev/null +++ b/reference_scripts/1kB2su7hLRYDhZ2H.js @@ -0,0 +1,19 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name}) +await test.roll(); +if (!test.succeeded) +{ + let item = await fromUuid("Compendium.wfrp4e-core.items.ZhMADOqoo0y8Q9bx") + let data = item.toObject(); + if (this.item.system.location.key == "rLeg") + { + data.system.location.value = "Right Toe" + data.system.location.key = "rToe"; + } + else if (this.item.system.location.key == "lLeg") + { + data.system.location.value = "Left Toe" + data.system.location.key = "lToe"; + } + this.actor.createEmbeddedDocuments("Item", [data]) +} +this.effect.delete(); \ No newline at end of file diff --git a/reference_scripts/1l7Jz2ZHbAWko7Vm.js b/reference_scripts/1l7Jz2ZHbAWko7Vm.js new file mode 100644 index 0000000..ac7048c --- /dev/null +++ b/reference_scripts/1l7Jz2ZHbAWko7Vm.js @@ -0,0 +1 @@ +args.options.ballockKnife = true; \ No newline at end of file diff --git a/reference_scripts/1mNkLj9JYNr3ofC6.js b/reference_scripts/1mNkLj9JYNr3ofC6.js new file mode 100644 index 0000000..d64facd --- /dev/null +++ b/reference_scripts/1mNkLj9JYNr3ofC6.js @@ -0,0 +1,7 @@ +this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => { + await test.roll(); + if (test.failed) + { + this.actor.addCondition("stunned", 3) + } +}) \ No newline at end of file diff --git a/reference_scripts/1wEjrgff7ASxKVmy.js b/reference_scripts/1wEjrgff7ASxKVmy.js new file mode 100644 index 0000000..ab9e51b --- /dev/null +++ b/reference_scripts/1wEjrgff7ASxKVmy.js @@ -0,0 +1,2 @@ +if (args.effect.conditionId == "bleeding") + args.data.damage -= 1 \ No newline at end of file diff --git a/reference_scripts/1wKVvxRTHOyV4Qdv.js b/reference_scripts/1wKVvxRTHOyV4Qdv.js new file mode 100644 index 0000000..2ea9f2a --- /dev/null +++ b/reference_scripts/1wKVvxRTHOyV4Qdv.js @@ -0,0 +1 @@ +return !args.skill?.name?.includes(game.i18n.localize("NAME.Sail")) \ No newline at end of file diff --git a/reference_scripts/1wrPvP6lJwIAfmsl.js b/reference_scripts/1wrPvP6lJwIAfmsl.js new file mode 100644 index 0000000..1e94116 --- /dev/null +++ b/reference_scripts/1wrPvP6lJwIAfmsl.js @@ -0,0 +1,10 @@ +let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations), 1, "Choose Location"); + +let location = choice[0].id; + +let itemTargeted = this.actor.items.get(this.effect.getFlag("wfrp4e", "itemTargets")[0]) + +if (itemTargeted) +{ + itemTargeted.update({[`system.APdamage.${location}`] : itemTargeted.system.APdamage[location] + 1}) +} \ No newline at end of file diff --git a/reference_scripts/1yOvw74jzFfaI87b.js b/reference_scripts/1yOvw74jzFfaI87b.js new file mode 100644 index 0000000..73649e3 --- /dev/null +++ b/reference_scripts/1yOvw74jzFfaI87b.js @@ -0,0 +1 @@ +return args.options.reload diff --git a/reference_scripts/22bW97lkvCqisfHX.js b/reference_scripts/22bW97lkvCqisfHX.js new file mode 100644 index 0000000..5ab83db --- /dev/null +++ b/reference_scripts/22bW97lkvCqisfHX.js @@ -0,0 +1 @@ +return args.type != "channelling" && !args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) \ No newline at end of file diff --git a/reference_scripts/23HgjCB1oecxANvA.js b/reference_scripts/23HgjCB1oecxANvA.js new file mode 100644 index 0000000..275f379 --- /dev/null +++ b/reference_scripts/23HgjCB1oecxANvA.js @@ -0,0 +1,5 @@ +if (args.item.range && args.item.range.bands) +{ +args.item.range.bands[game.i18n.localize("Long Range")].modifier = 0 +args.item.range.bands[game.i18n.localize("Extreme")].modifier /= 2 +} \ No newline at end of file diff --git a/reference_scripts/23vWiHUjxtRQ3Efz.js b/reference_scripts/23vWiHUjxtRQ3Efz.js new file mode 100644 index 0000000..5fdc693 --- /dev/null +++ b/reference_scripts/23vWiHUjxtRQ3Efz.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.eWPN3CV2Eddwz8aM") +let data = item.toObject(); +data.system.location.value = "Back" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/2AOo7KUyzMrgIlgM.js b/reference_scripts/2AOo7KUyzMrgIlgM.js new file mode 100644 index 0000000..2982f22 --- /dev/null +++ b/reference_scripts/2AOo7KUyzMrgIlgM.js @@ -0,0 +1 @@ +game.wfrp4e.utility.postCorruptionTest(this.item.system.specification.value, {speaker : {alias: this.actor.prototypeToken.name}}) \ No newline at end of file diff --git a/reference_scripts/2AdSBXw7IwCiqawQ.js b/reference_scripts/2AdSBXw7IwCiqawQ.js new file mode 100644 index 0000000..00a7def --- /dev/null +++ b/reference_scripts/2AdSBXw7IwCiqawQ.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Bribery") || args.skill?.name.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/2Cw5j0iGAnFNegWr.js b/reference_scripts/2Cw5j0iGAnFNegWr.js new file mode 100644 index 0000000..4712207 --- /dev/null +++ b/reference_scripts/2Cw5j0iGAnFNegWr.js @@ -0,0 +1 @@ +return args.item?.system.attackType diff --git a/reference_scripts/2GYAd4OC888oQFBp.js b/reference_scripts/2GYAd4OC888oQFBp.js new file mode 100644 index 0000000..5150b7b --- /dev/null +++ b/reference_scripts/2GYAd4OC888oQFBp.js @@ -0,0 +1 @@ +return !["fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/2NLINicPQWbuvp2n.js b/reference_scripts/2NLINicPQWbuvp2n.js new file mode 100644 index 0000000..f98dd93 --- /dev/null +++ b/reference_scripts/2NLINicPQWbuvp2n.js @@ -0,0 +1 @@ +return args.item?.name != game.i18n.localize("NAME.Navigation") \ No newline at end of file diff --git a/reference_scripts/2OqLHRqEBEjBm2LW.js b/reference_scripts/2OqLHRqEBEjBm2LW.js new file mode 100644 index 0000000..1a3189b --- /dev/null +++ b/reference_scripts/2OqLHRqEBEjBm2LW.js @@ -0,0 +1 @@ +args.fields.slBonus += this.actor.system.characteristics.wp.bonus \ No newline at end of file diff --git a/reference_scripts/2Qi1hwLYhdE6v6Hs.js b/reference_scripts/2Qi1hwLYhdE6v6Hs.js new file mode 100644 index 0000000..4983177 --- /dev/null +++ b/reference_scripts/2Qi1hwLYhdE6v6Hs.js @@ -0,0 +1,9 @@ +if (!["rLeg", "lLeg"].includes(this.effect.getFlag("wfrp4e", "location"))) + return true; + +if (args.options.dodge) +{ + args.abort = true; + this.script.scriptNotification("Cannot Dodge!") +} +return ["t", "int", "wp", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/2VNnVrtktdGUqXEV.js b/reference_scripts/2VNnVrtktdGUqXEV.js new file mode 100644 index 0000000..38a1edd --- /dev/null +++ b/reference_scripts/2VNnVrtktdGUqXEV.js @@ -0,0 +1,9 @@ +if (args.totalWoundLoss > 0) +{ + let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) + await test.roll(); + if (test.failed && parseInt(args.opposedTest.attackerTest.result.SL) > 0) + { + args.actor.addCondition("stunned", parseInt(args.opposedTest.attackerTest.result.SL)) + } +} \ No newline at end of file diff --git a/reference_scripts/2W9uMTT6iJhfQ044.js b/reference_scripts/2W9uMTT6iJhfQ044.js new file mode 100644 index 0000000..fb037b9 --- /dev/null +++ b/reference_scripts/2W9uMTT6iJhfQ044.js @@ -0,0 +1,18 @@ +let skill = `Trade (${this.item.parenthesesText})` +let currentCareer = this.actor.system.currentCareer; +let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill); + +if (!currentCareer) return + + +let inCurrentCareer = currentCareer.system.skills.includes(skill); +if (existingSkill && inCurrentCareer) +{ + existingSkill.system.advances.costModifier = -5; +} +else +{ + currentCareer.system.skills.push(skill); +} + + diff --git a/reference_scripts/2WBq5gW780C6zfCp.js b/reference_scripts/2WBq5gW780C6zfCp.js new file mode 100644 index 0000000..90b4c35 --- /dev/null +++ b/reference_scripts/2WBq5gW780C6zfCp.js @@ -0,0 +1,9 @@ +if (args.weapon && this.item.system.usesLocation(args.weapon)) +{ + args.bleedingHand = true; + let success = await this.effect.manualScripts[0].execute({actor: this.actor}) + if (!success) + { + args.abort = true; + } +} \ No newline at end of file diff --git a/reference_scripts/2WSN306tL4apjRtD.js b/reference_scripts/2WSN306tL4apjRtD.js new file mode 100644 index 0000000..6931737 --- /dev/null +++ b/reference_scripts/2WSN306tL4apjRtD.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") +let data = item.toObject(); +data.name = data.name += " (Hearing)" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/2cKarG9ToyW2ptCd.js b/reference_scripts/2cKarG9ToyW2ptCd.js new file mode 100644 index 0000000..deb9777 --- /dev/null +++ b/reference_scripts/2cKarG9ToyW2ptCd.js @@ -0,0 +1,10 @@ +if (this.item.system.quantity.value) +{ + this.item.update({"system.quantity.value" : this.item.system.quantity.value - 0.25}) + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + actor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/2hzDv8ROulOe1elK.js b/reference_scripts/2hzDv8ROulOe1elK.js new file mode 100644 index 0000000..1a9e5bd --- /dev/null +++ b/reference_scripts/2hzDv8ROulOe1elK.js @@ -0,0 +1 @@ +return args.skill?.name.includes(game.i18n.localize("NAME.Lore")); \ No newline at end of file diff --git a/reference_scripts/2mFNelLOAQ6iJsZl.js b/reference_scripts/2mFNelLOAQ6iJsZl.js new file mode 100644 index 0000000..76ff0b6 --- /dev/null +++ b/reference_scripts/2mFNelLOAQ6iJsZl.js @@ -0,0 +1,4 @@ +if (args.test.isFumble) +{ + args.test.result.other.push("@Table[doomrocket-fumble]") +} \ No newline at end of file diff --git a/reference_scripts/2miWWeRrEpq1beG4.js b/reference_scripts/2miWWeRrEpq1beG4.js new file mode 100644 index 0000000..579cd50 --- /dev/null +++ b/reference_scripts/2miWWeRrEpq1beG4.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.qn4ZpvTQIX4rcJDl"); +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) diff --git a/reference_scripts/2p9IK6Y5Z4NQD6FY.js b/reference_scripts/2p9IK6Y5Z4NQD6FY.js new file mode 100644 index 0000000..2facb9d --- /dev/null +++ b/reference_scripts/2p9IK6Y5Z4NQD6FY.js @@ -0,0 +1 @@ +args.prefillModifiers.difficulty = "hard" \ No newline at end of file diff --git a/reference_scripts/2rzxQlL7A9ujZ9uK.js b/reference_scripts/2rzxQlL7A9ujZ9uK.js new file mode 100644 index 0000000..b1278eb --- /dev/null +++ b/reference_scripts/2rzxQlL7A9ujZ9uK.js @@ -0,0 +1,6 @@ +if (args.opposedTest.result.winner == "attacker") { + if (args.opposedTest.defenderTest.weapon && args.opposedTest.defenderTest.item.properties.qualities.shield) { + ui.notifications.notify(`${this.effect.name}: Gained ${this.item.Advances} Advantage`) + this.actor.setAdvantage(this.item.Advances) + } +} \ No newline at end of file diff --git a/reference_scripts/2sDH6RvoOAR40oqH.js b/reference_scripts/2sDH6RvoOAR40oqH.js new file mode 100644 index 0000000..6efdf20 --- /dev/null +++ b/reference_scripts/2sDH6RvoOAR40oqH.js @@ -0,0 +1,20 @@ + + +if (!["Goblin", "Orc"].includes(this.actor.system.details.species.value)) { + let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { appendTitle: ` - ${this.effect.name}` }) + await test.roll(); + if (test.failed) { + let infection = await fromUuid("Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg") + this.actor.createEmbeddedDocuments("Item", [infection]) + } +} + +// Since wounds change when the effect is deleted, need to wait until after +// the max wounds have been recalculated to apply damage +game.wfrp4e.utility.sleep(1000).then(async () => { + let roll = await new Roll("1d10").roll(); + + roll.toMessage(this.script.getChatData()); + this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true })) + +}) \ No newline at end of file diff --git a/reference_scripts/2vTVR0quRZQtjNfQ.js b/reference_scripts/2vTVR0quRZQtjNfQ.js new file mode 100644 index 0000000..512f2c3 --- /dev/null +++ b/reference_scripts/2vTVR0quRZQtjNfQ.js @@ -0,0 +1,18 @@ +let currentCareer = this.actor.system.currentCareer; +if (!currentCareer) +{ + return; +} + +let talents = ["Aethyric Attunement", +"Arcane Magic (Any)", +"Chaos Magic (Tzeentch)", +"Fast Hands", +"Instinctive Diction", +"Magical Sense", +"Petty Magic", +"Second Sight", +"War Wizard", +"Witch!"].filter(t => !currentCareer.system.talents.includes(t)) + +currentCareer.system.talents = currentCareer.system.talents.concat(talents) \ No newline at end of file diff --git a/reference_scripts/2wk0yrRPlPsdqr3L.js b/reference_scripts/2wk0yrRPlPsdqr3L.js new file mode 100644 index 0000000..20b7014 --- /dev/null +++ b/reference_scripts/2wk0yrRPlPsdqr3L.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.9GNpAqgsKzxZKJpp") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/2yctEihGmdCfTTVx.js b/reference_scripts/2yctEihGmdCfTTVx.js new file mode 100644 index 0000000..a6d16a1 --- /dev/null +++ b/reference_scripts/2yctEihGmdCfTTVx.js @@ -0,0 +1,2 @@ +args.data.canReverse = true; +args.options.fieldDressing = true; \ No newline at end of file diff --git a/reference_scripts/2zeP2nMSURjxrqYz.js b/reference_scripts/2zeP2nMSURjxrqYz.js new file mode 100644 index 0000000..a0ac1e4 --- /dev/null +++ b/reference_scripts/2zeP2nMSURjxrqYz.js @@ -0,0 +1,6 @@ +let wounds = this.actor.system.status.wounds +if (wounds.value == 0) + return this.script.scriptNotification("No effect at 0 Wounds", "error") + +this.script.scriptNotification(`Healed ${this.actor.characteristics.t.bonus} Wounds`) +await this.actor.modifyWounds(this.actor.characteristics.t.bonus) \ No newline at end of file diff --git a/reference_scripts/33PWizq5F7pkKnQT.js b/reference_scripts/33PWizq5F7pkKnQT.js new file mode 100644 index 0000000..127ff99 --- /dev/null +++ b/reference_scripts/33PWizq5F7pkKnQT.js @@ -0,0 +1,4 @@ +if (args.item.type == "spell") +{ + args.item.cn.value = Math.floor(args.item.cn.value / 2) +} \ No newline at end of file diff --git a/reference_scripts/33US8YRgaMqYu2We.js b/reference_scripts/33US8YRgaMqYu2We.js new file mode 100644 index 0000000..6569e71 --- /dev/null +++ b/reference_scripts/33US8YRgaMqYu2We.js @@ -0,0 +1 @@ +return !args.options.handling \ No newline at end of file diff --git a/reference_scripts/37UN17gb8suFeZIW.js b/reference_scripts/37UN17gb8suFeZIW.js new file mode 100644 index 0000000..145ebc8 --- /dev/null +++ b/reference_scripts/37UN17gb8suFeZIW.js @@ -0,0 +1 @@ +this.script.scriptMessage(await this.actor.applyBasicDamage(8, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})) \ No newline at end of file diff --git a/reference_scripts/3Cn2TlRahlm5LkSj.js b/reference_scripts/3Cn2TlRahlm5LkSj.js new file mode 100644 index 0000000..c1ee085 --- /dev/null +++ b/reference_scripts/3Cn2TlRahlm5LkSj.js @@ -0,0 +1 @@ +args.fields.successBonus += 1; \ No newline at end of file diff --git a/reference_scripts/3D5ImpMgpOTPucvv.js b/reference_scripts/3D5ImpMgpOTPucvv.js new file mode 100644 index 0000000..d69e334 --- /dev/null +++ b/reference_scripts/3D5ImpMgpOTPucvv.js @@ -0,0 +1,9 @@ +if (args.test.options.cardsharp && args.test.succeeded) +{ + +let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) +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} SL`) +} \ No newline at end of file diff --git a/reference_scripts/3IGO7xEjRjat937X.js b/reference_scripts/3IGO7xEjRjat937X.js new file mode 100644 index 0000000..f45a41d --- /dev/null +++ b/reference_scripts/3IGO7xEjRjat937X.js @@ -0,0 +1,7 @@ +let fatigue = this.actor.hasCondition("fatigued") +if (fatigue) +{ + this.script.scriptNotification("Removing Fatigued Condition, disabled effect") + this.effect.update({disabled : true}) + await this.actor.removeCondition("fatigued") +} \ No newline at end of file diff --git a/reference_scripts/3JEzEzF1SeYA9lsV.js b/reference_scripts/3JEzEzF1SeYA9lsV.js new file mode 100644 index 0000000..1b8b828 --- /dev/null +++ b/reference_scripts/3JEzEzF1SeYA9lsV.js @@ -0,0 +1,44 @@ +let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations, this.effect.img), 1, "Choose Location"); +if (choice[0]) +{ + this.effect.updateSource({name : `${this.effect.name} (${choice[0].name})`}) +this.effect.updateSource({"flags.wfrp4e.location" : choice[0].id}) +} + +let location = choice[0].id; + +if (["lArm", "rArm"].includes(location)) +{ + let dropped = this.actor.itemTypes.weapon.filter(i => i.isEquipped & i.system.usesHands.includes(location)); + + if (dropped.length) + { + this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + for(let weapon of dropped) + { + await weapon.system.toggleEquip(); + } + } +} + +if (location == "body") +{ + await this.actor.addCondition("fatigued"); + 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) + { + this.actor.addCondition("prone"); + } +} + +if (location == "head") +{ + await this.actor.addCondition("stunned"); + 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("unconscious"); + } +} \ No newline at end of file diff --git a/reference_scripts/3LLiSgj6KGtgqcmo.js b/reference_scripts/3LLiSgj6KGtgqcmo.js new file mode 100644 index 0000000..8a4090c --- /dev/null +++ b/reference_scripts/3LLiSgj6KGtgqcmo.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Language")); \ No newline at end of file diff --git a/reference_scripts/3R6Y4NpNTqPc83wh.js b/reference_scripts/3R6Y4NpNTqPc83wh.js new file mode 100644 index 0000000..c0857ab --- /dev/null +++ b/reference_scripts/3R6Y4NpNTqPc83wh.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.IPKRMGry6WotuS1G") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/3TesBGh8HnlGuafu.js b/reference_scripts/3TesBGh8HnlGuafu.js new file mode 100644 index 0000000..05ab756 --- /dev/null +++ b/reference_scripts/3TesBGh8HnlGuafu.js @@ -0,0 +1,5 @@ +let modifier = this.effect.sourceTest?.result.overcast.usage.other.current || 0 + +let test = await this.actor.setupCharacteristic("dex", {fields: {modifier}, skipTargets: true, appendTitle : " - " + this.script.label}); + +test.roll(); \ No newline at end of file diff --git a/reference_scripts/3Vbe6gdW8N0bIvXJ.js b/reference_scripts/3Vbe6gdW8N0bIvXJ.js new file mode 100644 index 0000000..5bf968e --- /dev/null +++ b/reference_scripts/3Vbe6gdW8N0bIvXJ.js @@ -0,0 +1,5 @@ +if (args.item.type == "weapon" || args.item.type == "trait") +{ + args.item.qualities.value.push({name : "penetrating"}) + args.item.qualities.value.push({name : "impale"}) +} \ No newline at end of file diff --git a/reference_scripts/3aEzK0DehSHtVykd.js b/reference_scripts/3aEzK0DehSHtVykd.js new file mode 100644 index 0000000..9b294f4 --- /dev/null +++ b/reference_scripts/3aEzK0DehSHtVykd.js @@ -0,0 +1 @@ +this.effect.manualScripts[0].execute({actor : this.actor}); \ No newline at end of file diff --git a/reference_scripts/3eSaX0BeaUalNkEP.js b/reference_scripts/3eSaX0BeaUalNkEP.js new file mode 100644 index 0000000..077517d --- /dev/null +++ b/reference_scripts/3eSaX0BeaUalNkEP.js @@ -0,0 +1 @@ +return args.options.mutate \ No newline at end of file diff --git a/reference_scripts/3fdCQ3h3iVuhdDs9.js b/reference_scripts/3fdCQ3h3iVuhdDs9.js new file mode 100644 index 0000000..f3281db --- /dev/null +++ b/reference_scripts/3fdCQ3h3iVuhdDs9.js @@ -0,0 +1 @@ +args.fields.slBonus += this.actor.characteristics.ag.bonus; \ No newline at end of file diff --git a/reference_scripts/3hfMQkUKYI4rCuBy.js b/reference_scripts/3hfMQkUKYI4rCuBy.js new file mode 100644 index 0000000..7cf8f33 --- /dev/null +++ b/reference_scripts/3hfMQkUKYI4rCuBy.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.CharmAnimal") && !args.skill?.name.includes(game.i18n.localize("NAME.AnimalTraining")); \ No newline at end of file diff --git a/reference_scripts/3jm0NoYpgB6ZuUSl.js b/reference_scripts/3jm0NoYpgB6ZuUSl.js new file mode 100644 index 0000000..a7b132e --- /dev/null +++ b/reference_scripts/3jm0NoYpgB6ZuUSl.js @@ -0,0 +1 @@ +args.options.useOnesAttractive = true; \ No newline at end of file diff --git a/reference_scripts/3l7MQSa10Kve2K3P.js b/reference_scripts/3l7MQSa10Kve2K3P.js new file mode 100644 index 0000000..0d12a2b --- /dev/null +++ b/reference_scripts/3l7MQSa10Kve2K3P.js @@ -0,0 +1,2 @@ +this.script.scriptMessage(await this.actor.applyBasicDamage(Math.ceil(CONFIG.Dice.randomUniform() * 10) + 6, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})) +this.actor.addCondition("ablaze"); \ No newline at end of file diff --git a/reference_scripts/3plV9WFqs2prfAdp.js b/reference_scripts/3plV9WFqs2prfAdp.js new file mode 100644 index 0000000..9ec91ac --- /dev/null +++ b/reference_scripts/3plV9WFqs2prfAdp.js @@ -0,0 +1 @@ +return !["NAME.Evaluate", "NAME.Gamble"].map(i => game.i18n.localize(i)).includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/3sfD1nedXLzuYoXJ.js b/reference_scripts/3sfD1nedXLzuYoXJ.js new file mode 100644 index 0000000..674133f --- /dev/null +++ b/reference_scripts/3sfD1nedXLzuYoXJ.js @@ -0,0 +1,4 @@ +if (this.actor.hasCondition("surprised")) +{ + this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : " - " + this.effect.name}).then(test => test.roll()) +} diff --git a/reference_scripts/3tE8gFSl28EhCmo5.js b/reference_scripts/3tE8gFSl28EhCmo5.js new file mode 100644 index 0000000..9e28dce --- /dev/null +++ b/reference_scripts/3tE8gFSl28EhCmo5.js @@ -0,0 +1,2 @@ +await args.actor.addCondition("ablaze") +await args.actor.addCondition("prone") \ No newline at end of file diff --git a/reference_scripts/454x3Q95pLvZm0Kx.js b/reference_scripts/454x3Q95pLvZm0Kx.js new file mode 100644 index 0000000..0072c5f --- /dev/null +++ b/reference_scripts/454x3Q95pLvZm0Kx.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.ConsumeAlcohol"); \ No newline at end of file diff --git a/reference_scripts/4FGKZk2f0xrmIDnp.js b/reference_scripts/4FGKZk2f0xrmIDnp.js new file mode 100644 index 0000000..59535fd --- /dev/null +++ b/reference_scripts/4FGKZk2f0xrmIDnp.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Research") && !args.skill?.name?.includes(game.i18n.localize("NAME.Language")); \ No newline at end of file diff --git a/reference_scripts/4HN98hMdQJxM35pA.js b/reference_scripts/4HN98hMdQJxM35pA.js new file mode 100644 index 0000000..23c0294 --- /dev/null +++ b/reference_scripts/4HN98hMdQJxM35pA.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.gz2xy41OSVZ8YBgI"); +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data]) diff --git a/reference_scripts/4JVIy5xtVwvadoqv.js b/reference_scripts/4JVIy5xtVwvadoqv.js new file mode 100644 index 0000000..bb85425 --- /dev/null +++ b/reference_scripts/4JVIy5xtVwvadoqv.js @@ -0,0 +1 @@ +this.actor.details.move.run *= 2 \ No newline at end of file diff --git a/reference_scripts/4MQ7u4INxp51oyyR.js b/reference_scripts/4MQ7u4INxp51oyyR.js new file mode 100644 index 0000000..95200bd --- /dev/null +++ b/reference_scripts/4MQ7u4INxp51oyyR.js @@ -0,0 +1,85 @@ +let characteristics = { + "ws" : 25, + "bs" : 10, + "s" : 15, + "t" : 15, + "i" : 25, + "ag" : 20, + "dex" : 0, + "int" : 10, + "wp" : 25, + "fel" : 10 +} +let skills = ["Cool", "Dodge", "Intimidate", "Intuition", "Leadership", "Lore (Warfare)", "Perception"] +let skillAdvancements = [15, 15, 15, 15, 15, 10, 10] +let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Resolute", "War Leader"] +let trappings = ["Hand Weapon", "Shield"] +let items = []; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } +} + +updateObj.name = updateObj.name += " " + this.effect.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/4QoxhoekgVeZcQA7.js b/reference_scripts/4QoxhoekgVeZcQA7.js new file mode 100644 index 0000000..4ebe285 --- /dev/null +++ b/reference_scripts/4QoxhoekgVeZcQA7.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.M5QSWOYt2Rbv2yxW") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/4XrAeL2DitxE8OaK.js b/reference_scripts/4XrAeL2DitxE8OaK.js new file mode 100644 index 0000000..93877a2 --- /dev/null +++ b/reference_scripts/4XrAeL2DitxE8OaK.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.0hn6UaKq8CoZP2zD") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/4cOZzUvu1nytcqNn.js b/reference_scripts/4cOZzUvu1nytcqNn.js new file mode 100644 index 0000000..b5902b0 --- /dev/null +++ b/reference_scripts/4cOZzUvu1nytcqNn.js @@ -0,0 +1 @@ +args.initiative = "-10" \ No newline at end of file diff --git a/reference_scripts/4fnTKgl0HW9ZrWyJ.js b/reference_scripts/4fnTKgl0HW9ZrWyJ.js new file mode 100644 index 0000000..e818ce4 --- /dev/null +++ b/reference_scripts/4fnTKgl0HW9ZrWyJ.js @@ -0,0 +1,10 @@ +this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : "average"}}).then(async test => +{ + await test.roll() + if (test.failed) + { + let char = Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? "s" : "t"; + this.script.scriptMessage(`${this.actor.name} lost 1 point of ${game.wfrp4e.config.characteristics[char]}`) + this.actor.update({[`system.characteristics.${char}.initial`] : this.actor.system.characteristics[char].initial - 1}) + } +}) \ No newline at end of file diff --git a/reference_scripts/4gkz3LR7CK1b8ulK.js b/reference_scripts/4gkz3LR7CK1b8ulK.js new file mode 100644 index 0000000..b6432a4 --- /dev/null +++ b/reference_scripts/4gkz3LR7CK1b8ulK.js @@ -0,0 +1 @@ +return args.item?.system.attackType != "ranged" || this.actor.uuid != this.effect.sourceActor.uuid \ No newline at end of file diff --git a/reference_scripts/4iuTz0uInAfMaoGl.js b/reference_scripts/4iuTz0uInAfMaoGl.js new file mode 100644 index 0000000..d3f97d5 --- /dev/null +++ b/reference_scripts/4iuTz0uInAfMaoGl.js @@ -0,0 +1 @@ +return args.skill?.name?.includes(game.i18n.localize("NAME.Language")) || args.type == "cast" \ No newline at end of file diff --git a/reference_scripts/4pQW4WLyhjbZR85k.js b/reference_scripts/4pQW4WLyhjbZR85k.js new file mode 100644 index 0000000..8a2680f --- /dev/null +++ b/reference_scripts/4pQW4WLyhjbZR85k.js @@ -0,0 +1,7 @@ +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"}}) +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.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/reference_scripts/4rTmV3TNxctUe0ly.js b/reference_scripts/4rTmV3TNxctUe0ly.js new file mode 100644 index 0000000..30a0737 --- /dev/null +++ b/reference_scripts/4rTmV3TNxctUe0ly.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("bleeding"); +} diff --git a/reference_scripts/4rb7LfMq9CTnlrpn.js b/reference_scripts/4rb7LfMq9CTnlrpn.js new file mode 100644 index 0000000..214bdc9 --- /dev/null +++ b/reference_scripts/4rb7LfMq9CTnlrpn.js @@ -0,0 +1,10 @@ +if (args.totalWoundLoss > 0) +{ + let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name}) + await test.roll(); + if (test.failed) + { + args.totalWoundLoss += 5; + args.modifiers.other.push({label : this.effect.name, value : 5}) + } +} \ No newline at end of file diff --git a/reference_scripts/4rhxLzau7jZ4SDxg.js b/reference_scripts/4rhxLzau7jZ4SDxg.js new file mode 100644 index 0000000..19f3d85 --- /dev/null +++ b/reference_scripts/4rhxLzau7jZ4SDxg.js @@ -0,0 +1,2 @@ +await args.actor.addCondition("grappling") +await args.actor.addCondition("entangled") \ No newline at end of file diff --git a/reference_scripts/52kbfuWrOh6dsTtd.js b/reference_scripts/52kbfuWrOh6dsTtd.js new file mode 100644 index 0000000..d5df29a --- /dev/null +++ b/reference_scripts/52kbfuWrOh6dsTtd.js @@ -0,0 +1,2 @@ +if (!this.actor.hasCondition("blinded")) + this.actor.addCondition("blinded", 1, {"flags.wfrp4e.flockOfDoom" : true}) \ No newline at end of file diff --git a/reference_scripts/52mwb33mGrQjq89B.js b/reference_scripts/52mwb33mGrQjq89B.js new file mode 100644 index 0000000..33c3e75 --- /dev/null +++ b/reference_scripts/52mwb33mGrQjq89B.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Research"); \ No newline at end of file diff --git a/reference_scripts/53HFDNuMnX1Aw1a4.js b/reference_scripts/53HFDNuMnX1Aw1a4.js new file mode 100644 index 0000000..d6198c0 --- /dev/null +++ b/reference_scripts/53HFDNuMnX1Aw1a4.js @@ -0,0 +1 @@ +return ["ws", "bs", "s", "ag", "dex", "int", "wp", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/58rFc9HiBoX66J6p.js b/reference_scripts/58rFc9HiBoX66J6p.js new file mode 100644 index 0000000..1e3c7a2 --- /dev/null +++ b/reference_scripts/58rFc9HiBoX66J6p.js @@ -0,0 +1,9 @@ +let sourceActor = this.effect.sourceActor; +let damage = args.totalWoundLoss; +let tb = sourceActor.system.characteristics.t.bonus +args.abort = `${this.effect.name}: Damage applied to ${sourceActor.name}`; + +let message = await sourceActor.applyBasicDamage(damage - tb, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}) + +this.script.scriptMessage(message.replace(`${tb} TB`, `${tb} × 2 TB`)) +args.abort = true; \ No newline at end of file diff --git a/reference_scripts/5DI6cHAg1LHo54Yv.js b/reference_scripts/5DI6cHAg1LHo54Yv.js new file mode 100644 index 0000000..6929228 --- /dev/null +++ b/reference_scripts/5DI6cHAg1LHo54Yv.js @@ -0,0 +1,6 @@ +if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") +{ + this.actor.update({"system.status.fortune.value" : Math.max(0, (this.actor.system.status.fortune?.value - 1) || 0)}) + this.script.scriptMessage(`Fortune point stolen from ${this.actor.name}`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")}) + +} \ No newline at end of file diff --git a/reference_scripts/5Fe1ELaS6Gnvy0Cj.js b/reference_scripts/5Fe1ELaS6Gnvy0Cj.js new file mode 100644 index 0000000..ad46ad3 --- /dev/null +++ b/reference_scripts/5Fe1ELaS6Gnvy0Cj.js @@ -0,0 +1 @@ +return args.skill?.name.includes("Channelling") || args.type == "channelling" || args.skill?.name == game.i18n.localize("NAME.Charm") || args.skill?.name.includes("Language (Magick)") || args.type == "cast" \ No newline at end of file diff --git a/reference_scripts/5IoYTyedCMYwt3ys.js b/reference_scripts/5IoYTyedCMYwt3ys.js new file mode 100644 index 0000000..cedf74b --- /dev/null +++ b/reference_scripts/5IoYTyedCMYwt3ys.js @@ -0,0 +1 @@ +args.fields.slBonus += 2; \ No newline at end of file diff --git a/reference_scripts/5JWC0l3JEpOsqbR9.js b/reference_scripts/5JWC0l3JEpOsqbR9.js new file mode 100644 index 0000000..d2eb0b6 --- /dev/null +++ b/reference_scripts/5JWC0l3JEpOsqbR9.js @@ -0,0 +1,85 @@ +let characteristics = { + "ws" : 0, + "bs" : 5, + "s" : 0, + "t" : 0, + "i" : 10, + "ag" : 10, + "dex" : 0, + "int" : 0, + "wp" : 5, + "fel" : 0 +} +let skills = ["Dodge", "Perception"] +let skillAdvancements = [10, 10] +let talents = ["Flee!", "Marksman"] +let trappings = ["Hand Weapon"] +let items = []; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } +} + +updateObj.name = updateObj.name += " " + this.effect.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/5JvKJZPcd6Hz5zvn.js b/reference_scripts/5JvKJZPcd6Hz5zvn.js new file mode 100644 index 0000000..be61706 --- /dev/null +++ b/reference_scripts/5JvKJZPcd6Hz5zvn.js @@ -0,0 +1,85 @@ +let characteristics = { + "ws" : 10, + "bs" : 0, + "s" : 10, + "t" : 10, + "i" : 20, + "ag" : 10, + "dex" : 0, + "int" : 0, + "wp" : 15, + "fel" : 0 +} +let skills = ["Cool", "Dodge", "Intimidate", "Leadership"] +let skillAdvancements = [15, 15, 10, 5] +let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Resolute"] +let trappings = ["Mail Coat", "Mail Chausses", "Mail Coif", "Hand Weapon", "Shield"] +let items = []; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } +} + +updateObj.name = this.effect.name + " " + updateObj.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/5LdJCKfQem1AQK24.js b/reference_scripts/5LdJCKfQem1AQK24.js new file mode 100644 index 0000000..7ec5f13 --- /dev/null +++ b/reference_scripts/5LdJCKfQem1AQK24.js @@ -0,0 +1,6 @@ + +if (!args.flags.howlingWarpGale) +{ + args.fields.modifier -= 10; + args.flags.howlingWarpGale = true; // prevent double application +} \ No newline at end of file diff --git a/reference_scripts/5M6IgCUncCwyxHok.js b/reference_scripts/5M6IgCUncCwyxHok.js new file mode 100644 index 0000000..ceef2c0 --- /dev/null +++ b/reference_scripts/5M6IgCUncCwyxHok.js @@ -0,0 +1,35 @@ +let etiquette = (await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP")).toObject(); +etiquette.name += ` (Followers of Tzeentch)`; + +let animosity = (await fromUuid("Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f")).toObject(); +animosity.system.specification.value = "Followers of Nurgle"; + +let roll = await new Roll("ceil(1d10 / 3)").roll(); + +roll.toMessage(this.script.getChatData()); + +let mutations = []; +let msg = `

Mutations Gained

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

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

` + mutations.push(item.toObject()); + } +} +this.actor.createEmbeddedDocuments("Item", mutations.concat([etiquette, animosity]), {fromEffect : this.effect.id}) +this.script.scriptMessage(msg); \ No newline at end of file diff --git a/reference_scripts/5MxRDXzUBPfp2KKD.js b/reference_scripts/5MxRDXzUBPfp2KKD.js new file mode 100644 index 0000000..578674f --- /dev/null +++ b/reference_scripts/5MxRDXzUBPfp2KKD.js @@ -0,0 +1 @@ +args.options.useOnesSupportive = true; \ No newline at end of file diff --git a/reference_scripts/5dR7Erj3nwsxLAV7.js b/reference_scripts/5dR7Erj3nwsxLAV7.js new file mode 100644 index 0000000..443c65a --- /dev/null +++ b/reference_scripts/5dR7Erj3nwsxLAV7.js @@ -0,0 +1,85 @@ +let characteristics = { + "ws" : 35, + "bs" : 10, + "s" : 25, + "t" : 30, + "i" : 30, + "ag" : 25, + "dex" : 0, + "int" : 15, + "wp" : 35, + "fel" : 15 +} +let skills = ["Cool", "Dodge", "Intimidate", "Intuition", "Leadership", "Lore (Warfare)", "Perception"] +let skillAdvancements = [25, 15, 25, 25, 30, 20, 20] +let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Luck", "Resolute", "Unshakable", "War Leader"] +let trappings = ["Hand Weapon", "Shield"] +let items = []; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } +} + +updateObj.name = updateObj.name += " " + this.effect.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/5lc1eHIYQNpSRWip.js b/reference_scripts/5lc1eHIYQNpSRWip.js new file mode 100644 index 0000000..39f6f8b --- /dev/null +++ b/reference_scripts/5lc1eHIYQNpSRWip.js @@ -0,0 +1,8 @@ +if (["death", "necromancy"].includes(args.spell?.system.lore.value)) +{ + args.fields.successBonus += 1 +} +else if(["life", "light", "heavens"].includes(args.spell?.system.lore.value)) +{ + args.fields.modifier -= 10; +} \ No newline at end of file diff --git a/reference_scripts/5o1XiceC4rutjMms.js b/reference_scripts/5o1XiceC4rutjMms.js new file mode 100644 index 0000000..2646b2f --- /dev/null +++ b/reference_scripts/5o1XiceC4rutjMms.js @@ -0,0 +1 @@ +return !args.item?.name.includes(game.i18n.localize("NAME.Stealth")) \ No newline at end of file diff --git a/reference_scripts/5sI9iYh5j2nx2XyT.js b/reference_scripts/5sI9iYh5j2nx2XyT.js new file mode 100644 index 0000000..4a9e7b3 --- /dev/null +++ b/reference_scripts/5sI9iYh5j2nx2XyT.js @@ -0,0 +1 @@ +return !(["Animal Care", "Charm Animal"].includes(args.item?.name) || args.item?.name.includes("Ride") || args.item?.name.includes("Animal Training")) \ No newline at end of file diff --git a/reference_scripts/62Ky6bC1EnTllSJA.js b/reference_scripts/62Ky6bC1EnTllSJA.js new file mode 100644 index 0000000..8d0a535 --- /dev/null +++ b/reference_scripts/62Ky6bC1EnTllSJA.js @@ -0,0 +1,4 @@ +if (this.effect.sourceActor.uuid != args.actor.uuid) +{ + this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.overcast.usage.other.current, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true})); +} \ No newline at end of file diff --git a/reference_scripts/65o8pQj6oGNnXce6.js b/reference_scripts/65o8pQj6oGNnXce6.js new file mode 100644 index 0000000..6737896 --- /dev/null +++ b/reference_scripts/65o8pQj6oGNnXce6.js @@ -0,0 +1,2 @@ +let ch = this.effect.getFlag("wfrp4e", "characteristic") +this.actor.system.characteristics[ch].modifier += 10; \ No newline at end of file diff --git a/reference_scripts/65xE9OV5sA1ZWT7j.js b/reference_scripts/65xE9OV5sA1ZWT7j.js new file mode 100644 index 0000000..2e9318c --- /dev/null +++ b/reference_scripts/65xE9OV5sA1ZWT7j.js @@ -0,0 +1,9 @@ +if (args.test.options.diceman && args.test.succeeded) +{ + +let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) +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} SL`) +} \ No newline at end of file diff --git a/reference_scripts/6Aqq4F4Xui923sc6.js b/reference_scripts/6Aqq4F4Xui923sc6.js new file mode 100644 index 0000000..0a9ebf3 --- /dev/null +++ b/reference_scripts/6Aqq4F4Xui923sc6.js @@ -0,0 +1,12 @@ +// Imbibing this substance grants the user the Painless Creature Trait. +const hasColdBlooded = this.actor.has("Cold Blooded") +if (hasColdBlooded === undefined) +{ + let item = await fromUuid("Compendium.wfrp4e-core.items.mCh1KK9jomwFZcLB") + let data = item.toObject() + this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) + + this.script.scriptMessage(`

${this.actor.prototypeToken.name} has gained the Cold Blooded Creature Trait and may reverse any failed Willpower based Tests.

+

If they gain a Surprised Condition, this Condition is not lost the first time it should be (which is typically at the end of the Round or if they victim is attacked).

`, + {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) +} \ No newline at end of file diff --git a/reference_scripts/6BmvV9c03FkfisnE.js b/reference_scripts/6BmvV9c03FkfisnE.js new file mode 100644 index 0000000..3d03be7 --- /dev/null +++ b/reference_scripts/6BmvV9c03FkfisnE.js @@ -0,0 +1,20 @@ +// Apply changes when the mask is worn + +if (args.equipped) { + this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) + this.script.scriptMessage(`${this.actor.name} dons the ${this.item.name}.
+ They gain +1 Corruption point if an exposure Test is failed, which will need to be manually applied.
If they wear the mask for more than an hour or benefit from any of its effects, they are exposed to @Corruption[moderate]{Moderate Corruption} + `, + {whisper: ChatMessage.getWhisperRecipients("GM")}) +} + +// Notify of lingering effects when mask is removed +else if (!args.equipped) +{ + await this.item.effects.contents[0].delete(); + await this.item.update({name : this.item.name += " (Used)"}) + this.script.scriptMessage(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`, + {whisper: ChatMessage.getWhisperRecipients("GM")} + ) + +} \ No newline at end of file diff --git a/reference_scripts/6EXkbVTRBhKTEu81.js b/reference_scripts/6EXkbVTRBhKTEu81.js new file mode 100644 index 0000000..84284f0 --- /dev/null +++ b/reference_scripts/6EXkbVTRBhKTEu81.js @@ -0,0 +1,5 @@ +if (!args.flags.bothEyes) +{ + args.flags.bothEyes = true; + args.fields.modifier -= 30 +} \ No newline at end of file diff --git a/reference_scripts/6Fe8M5MdklKS2olx.js b/reference_scripts/6Fe8M5MdklKS2olx.js new file mode 100644 index 0000000..3c1c175 --- /dev/null +++ b/reference_scripts/6Fe8M5MdklKS2olx.js @@ -0,0 +1 @@ +return args.characteristic != "fel" \ No newline at end of file diff --git a/reference_scripts/6H6vNjzvMGl2ZqCR.js b/reference_scripts/6H6vNjzvMGl2ZqCR.js new file mode 100644 index 0000000..751934a --- /dev/null +++ b/reference_scripts/6H6vNjzvMGl2ZqCR.js @@ -0,0 +1,2 @@ +if (args.totalWoundLoss > 0) + this.script.scriptMessage(`Blade of Nurglitch: ${args.actor.name} must pass an Difficult (-10) Endurance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM") }) \ No newline at end of file diff --git a/reference_scripts/6JrUjs3g5x6bFnj3.js b/reference_scripts/6JrUjs3g5x6bFnj3.js new file mode 100644 index 0000000..71e0979 --- /dev/null +++ b/reference_scripts/6JrUjs3g5x6bFnj3.js @@ -0,0 +1,8 @@ +let bite = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") +let sense = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") +let biteData = bite.toObject(); +let senseData = sense.toObject(); + +biteData.system.specification.value = 6 - this.actor.characteristics.s.bonus; +senseData.name = senseData.name += " (Smell)" +this.actor.createEmbeddedDocuments("Item", [biteData, senseData], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/6MSodMuZ5xk2JJJ9.js b/reference_scripts/6MSodMuZ5xk2JJJ9.js new file mode 100644 index 0000000..d75e4d6 --- /dev/null +++ b/reference_scripts/6MSodMuZ5xk2JJJ9.js @@ -0,0 +1,4 @@ +if (!this.actor.hasCondition("ablaze")) +{ + this.effect.delete(); +} \ No newline at end of file diff --git a/reference_scripts/6Mjy0jDqczA8BxhS.js b/reference_scripts/6Mjy0jDqczA8BxhS.js new file mode 100644 index 0000000..1a7b6be --- /dev/null +++ b/reference_scripts/6Mjy0jDqczA8BxhS.js @@ -0,0 +1 @@ +return !["roll", "none"].includes(args.fields.hitLocation) \ No newline at end of file diff --git a/reference_scripts/6QZUX7ZrFxOzqI0b.js b/reference_scripts/6QZUX7ZrFxOzqI0b.js new file mode 100644 index 0000000..de2a760 --- /dev/null +++ b/reference_scripts/6QZUX7ZrFxOzqI0b.js @@ -0,0 +1,9 @@ +let regenerate = this.actor.items.getName('Regenerate') + +if (regenerate) +{ + let effect = regenerate.effects.contents[0] + let scriptData = effect.getFlag("wfrp4e", "scriptData"); + + scriptData[0].script = scriptData[0].script.replace("1d10", "1d10 * 2") +} \ No newline at end of file diff --git a/reference_scripts/6U8xox4mBrn5eYIp.js b/reference_scripts/6U8xox4mBrn5eYIp.js new file mode 100644 index 0000000..ee018a9 --- /dev/null +++ b/reference_scripts/6U8xox4mBrn5eYIp.js @@ -0,0 +1,2 @@ +if (args.totalWoundLoss > 0) + args.actor.addCondition("ablaze") \ No newline at end of file diff --git a/reference_scripts/6V3qHON3mcerlBlB.js b/reference_scripts/6V3qHON3mcerlBlB.js new file mode 100644 index 0000000..67380e8 --- /dev/null +++ b/reference_scripts/6V3qHON3mcerlBlB.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {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/reference_scripts/6XWJWOUQPgKMsFul.js b/reference_scripts/6XWJWOUQPgKMsFul.js new file mode 100644 index 0000000..27d782b --- /dev/null +++ b/reference_scripts/6XWJWOUQPgKMsFul.js @@ -0,0 +1 @@ +return args.item?.system.attackType != "ranged" || args.flags.howlingWarpGale \ No newline at end of file diff --git a/reference_scripts/6ZS1rQLkNvMDO0Fp.js b/reference_scripts/6ZS1rQLkNvMDO0Fp.js new file mode 100644 index 0000000..609a9eb --- /dev/null +++ b/reference_scripts/6ZS1rQLkNvMDO0Fp.js @@ -0,0 +1,11 @@ +let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10) +if (args.test.isFumble && roll == 1 && !args.test.result.misfire) +{ + args.test.result.misfire = game.i18n.localize("Misfire") + " (Rolled 1)" + args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage) +} +else if (args.test.isFumble && roll != 1) +{ + args.test.result.other.push("Misfire Roll: " + roll) +} + diff --git a/reference_scripts/6elUNF58TaiYjxcx.js b/reference_scripts/6elUNF58TaiYjxcx.js new file mode 100644 index 0000000..d0b4d13 --- /dev/null +++ b/reference_scripts/6elUNF58TaiYjxcx.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gained a Stunned Condition"}}) +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("stunned"); +} \ No newline at end of file diff --git a/reference_scripts/6fElmBxTjdAaubbK.js b/reference_scripts/6fElmBxTjdAaubbK.js new file mode 100644 index 0000000..f1d5302 --- /dev/null +++ b/reference_scripts/6fElmBxTjdAaubbK.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "average"}}); +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("prone") +} diff --git a/reference_scripts/6hAgggYpNR3r4QWC.js b/reference_scripts/6hAgggYpNR3r4QWC.js new file mode 100644 index 0000000..5604471 --- /dev/null +++ b/reference_scripts/6hAgggYpNR3r4QWC.js @@ -0,0 +1,5 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Q2MCUrG2HppMcvN0") +item = item.toObject() +let species = args.actor.Species || " of your species" +item.name = `Animosity (all not ${species})` +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/6jcTzK1XEuWqAacN.js b/reference_scripts/6jcTzK1XEuWqAacN.js new file mode 100644 index 0000000..f41b3fe --- /dev/null +++ b/reference_scripts/6jcTzK1XEuWqAacN.js @@ -0,0 +1,2 @@ +args.abort = true; +this.script.scriptNotification(`Cannot use ${game.wfrp4e.config.locations[this.effect.getFlag("wfrp4e", "location")]}!`, "error") \ No newline at end of file diff --git a/reference_scripts/6kifXp2jXEaQVJsg.js b/reference_scripts/6kifXp2jXEaQVJsg.js new file mode 100644 index 0000000..debb784 --- /dev/null +++ b/reference_scripts/6kifXp2jXEaQVJsg.js @@ -0,0 +1,21 @@ +let useWard = await Dialog.wait({ + title : this.effect.name, + content : `

Use Ward provided by ${this.effect.name}?`, + buttons : { + yes : { + label : "Yes", + callback: () => { + return true; + } + }, + no : { + label: "No", + callback: () => { + return false; + } + } + } +}) + +if (useWard) + args.ward = 9; \ No newline at end of file diff --git a/reference_scripts/6mpw9cGseG4W4eyd.js b/reference_scripts/6mpw9cGseG4W4eyd.js new file mode 100644 index 0000000..1a3b985 --- /dev/null +++ b/reference_scripts/6mpw9cGseG4W4eyd.js @@ -0,0 +1,12 @@ +if (this.actor.system.status.advantage.value >= 2) +{ + await this.actor.modifyAdvantage(-2); + this.script.scriptNotification("Advantage Subtracted") +} +else +{ + return this.script.scriptNotification("Not enough Advantage!", "error") +} + +let test = await this.actor.setupTrait(this.item) +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/6qUKKep5vhFYmo1J.js b/reference_scripts/6qUKKep5vhFYmo1J.js new file mode 100644 index 0000000..0fc2aa5 --- /dev/null +++ b/reference_scripts/6qUKKep5vhFYmo1J.js @@ -0,0 +1 @@ +return args.type == "channelling" || args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) \ No newline at end of file diff --git a/reference_scripts/6tjn0RH4VyOPFneS.js b/reference_scripts/6tjn0RH4VyOPFneS.js new file mode 100644 index 0000000..0001110 --- /dev/null +++ b/reference_scripts/6tjn0RH4VyOPFneS.js @@ -0,0 +1 @@ +return ["NAME.Row", "NAME.Swim"].map(i => game.i18n.localize(i)).includes(args.skill?.name); \ No newline at end of file diff --git a/reference_scripts/6uldpFvKOCoW92cC.js b/reference_scripts/6uldpFvKOCoW92cC.js new file mode 100644 index 0000000..9f67eea --- /dev/null +++ b/reference_scripts/6uldpFvKOCoW92cC.js @@ -0,0 +1,8 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3") +item = item.toObject() + +item.system.specification.value = 10; +item.name += " (Fire)" +setProperty(item, "flags.wfrp4e.breath", "fire") + +Item.create(item, {parent : this.actor, fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/6xTtJEhRc4OjcDTf.js b/reference_scripts/6xTtJEhRc4OjcDTf.js new file mode 100644 index 0000000..5a8b642 --- /dev/null +++ b/reference_scripts/6xTtJEhRc4OjcDTf.js @@ -0,0 +1,5 @@ +if (getProperty(args.data, "system.status.fortune.value")) +{ + this.script.scriptNotification("Cannot update Fortune"); + delete args.data.system.status.wounds.value; +} \ No newline at end of file diff --git a/reference_scripts/715G1Bf0haOHvmYQ.js b/reference_scripts/715G1Bf0haOHvmYQ.js new file mode 100644 index 0000000..56674c9 --- /dev/null +++ b/reference_scripts/715G1Bf0haOHvmYQ.js @@ -0,0 +1 @@ +return !(args.skill?.name == game.i18n.localize("NAME.Bribery") || args.skill?.name.includes(game.i18n.localize("NAME.Stealth"))) \ No newline at end of file diff --git a/reference_scripts/71DmrxCTKGYL4Z7X.js b/reference_scripts/71DmrxCTKGYL4Z7X.js new file mode 100644 index 0000000..159a835 --- /dev/null +++ b/reference_scripts/71DmrxCTKGYL4Z7X.js @@ -0,0 +1 @@ +return ["fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/7Ck0fkzE4WQ62qVe.js b/reference_scripts/7Ck0fkzE4WQ62qVe.js new file mode 100644 index 0000000..6850a0b --- /dev/null +++ b/reference_scripts/7Ck0fkzE4WQ62qVe.js @@ -0,0 +1,4 @@ +if (args.item.type == "skill" && args.item.name == "Melee (Basic)") +{ + args.item.system.modifier.value += 20; +} \ No newline at end of file diff --git a/reference_scripts/7F3miqRA0ceMUBIu.js b/reference_scripts/7F3miqRA0ceMUBIu.js new file mode 100644 index 0000000..1088080 --- /dev/null +++ b/reference_scripts/7F3miqRA0ceMUBIu.js @@ -0,0 +1 @@ +return args.characteristic != "int" || args.skill \ No newline at end of file diff --git a/reference_scripts/7F6aGxZJjwxm5e5P.js b/reference_scripts/7F6aGxZJjwxm5e5P.js new file mode 100644 index 0000000..18e9f56 --- /dev/null +++ b/reference_scripts/7F6aGxZJjwxm5e5P.js @@ -0,0 +1,18 @@ +if (args.test.result.castOutcome == "failure") +{ + ValueDialog.create("Enter Wounds Lost to gain SL", this.effect.name, "0").then(async value => { + value = Math.clamped(value, 0, 3) + if (value == 0) + { + return; + } + else if (Number.isNumeric(value)) + { + this.script.scriptNotification(`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`) + } + }) +} \ No newline at end of file diff --git a/reference_scripts/7H6wYyJ6cpaoc2QQ.js b/reference_scripts/7H6wYyJ6cpaoc2QQ.js new file mode 100644 index 0000000..05cbeea --- /dev/null +++ b/reference_scripts/7H6wYyJ6cpaoc2QQ.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Cool"); \ No newline at end of file diff --git a/reference_scripts/7JW9t8AYSDkkzG2V.js b/reference_scripts/7JW9t8AYSDkkzG2V.js new file mode 100644 index 0000000..5e3d751 --- /dev/null +++ b/reference_scripts/7JW9t8AYSDkkzG2V.js @@ -0,0 +1,21 @@ +// Apply changes when the mask is worn + +if (args.equipped) +{ + this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) + this.script.scriptMessage(`${this.actor.name} dons the ${this.item.name}.
+ If they wear the mask for more than an hour or benefit from any of its effects, they are exposed to @Corruption[moderate]{Moderate Corruption}. + `, + {whisper: ChatMessage.getWhisperRecipients("GM")}) +} + +// Notify of lingering effects when mask is removed +else if (!args.equipped) +{ + await this.item.effects.contents[0].delete(); + await this.item.update({name : this.item.name += " (Used)"}) + this.script.scriptMessage(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`, + {whisper: ChatMessage.getWhisperRecipients("GM")} + ) + +} \ No newline at end of file diff --git a/reference_scripts/7OmrMjaU48o2FEZi.js b/reference_scripts/7OmrMjaU48o2FEZi.js new file mode 100644 index 0000000..4ca0181 --- /dev/null +++ b/reference_scripts/7OmrMjaU48o2FEZi.js @@ -0,0 +1,6 @@ + +this.actor.characteristics.t.bonus = 10 + +this.actor.details.move.value = 0; +this.actor.details.move.walk= 0; +this.actor.details.move.run = 0; \ No newline at end of file diff --git a/reference_scripts/7ScfB4o1QhXnNUfq.js b/reference_scripts/7ScfB4o1QhXnNUfq.js new file mode 100644 index 0000000..a8f5e60 --- /dev/null +++ b/reference_scripts/7ScfB4o1QhXnNUfq.js @@ -0,0 +1 @@ +return !["int", "wp"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/7VAhXHov6pR1SkgD.js b/reference_scripts/7VAhXHov6pR1SkgD.js new file mode 100644 index 0000000..67dfce8 --- /dev/null +++ b/reference_scripts/7VAhXHov6pR1SkgD.js @@ -0,0 +1 @@ +return args.item?.name == game.i18n.localize("NAME.Endurance"); \ No newline at end of file diff --git a/reference_scripts/7WR2hJjHPhHhHxAq.js b/reference_scripts/7WR2hJjHPhHhHxAq.js new file mode 100644 index 0000000..45d5ca2 --- /dev/null +++ b/reference_scripts/7WR2hJjHPhHhHxAq.js @@ -0,0 +1,8 @@ +let poisoned = args.actor.hasCondition("poisoned") +if (poisoned) +{ + this.script.scriptNotification(`Removed ${poisoned.conditionValue} Poisoned Conditions`) + poisoned.delete(); +} +else + this.script.scriptNotification(`No Poisoned Conditions`) \ No newline at end of file diff --git a/reference_scripts/7ZoFUMDG2WJd8RMg.js b/reference_scripts/7ZoFUMDG2WJd8RMg.js new file mode 100644 index 0000000..0ff8299 --- /dev/null +++ b/reference_scripts/7ZoFUMDG2WJd8RMg.js @@ -0,0 +1 @@ +this.script.scriptMessage(`Claimed ${this.effect.name} Bonus`); \ No newline at end of file diff --git a/reference_scripts/7e8FgQUF2oANANmx.js b/reference_scripts/7e8FgQUF2oANANmx.js new file mode 100644 index 0000000..b195380 --- /dev/null +++ b/reference_scripts/7e8FgQUF2oANANmx.js @@ -0,0 +1 @@ +return args.skill?.name == "Melee (Brawling)" || args.item?.weaponGroup?.value == "brawling" \ No newline at end of file diff --git a/reference_scripts/7f6OsttTzE7Hvzfk.js b/reference_scripts/7f6OsttTzE7Hvzfk.js new file mode 100644 index 0000000..aff4c37 --- /dev/null +++ b/reference_scripts/7f6OsttTzE7Hvzfk.js @@ -0,0 +1,5 @@ +if (this.actor.statuses.has("infighting")) // Only add +10 if already infighting + args.prefillModifiers.modifier += 10; + + +args.prefillModifiers.successBonus += 1; diff --git a/reference_scripts/7n3SEAGRA5ESK8gV.js b/reference_scripts/7n3SEAGRA5ESK8gV.js new file mode 100644 index 0000000..f577178 --- /dev/null +++ b/reference_scripts/7n3SEAGRA5ESK8gV.js @@ -0,0 +1 @@ +args.options.disarm = true; \ No newline at end of file diff --git a/reference_scripts/7szLG4VALuuy1cPm.js b/reference_scripts/7szLG4VALuuy1cPm.js new file mode 100644 index 0000000..1fbcead --- /dev/null +++ b/reference_scripts/7szLG4VALuuy1cPm.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "easy"}}) +await test.roll(); +if (test.failed) +{ + await this.actor.addCondition("fatigued") +} \ No newline at end of file diff --git a/reference_scripts/7wBWUw05q0igh508.js b/reference_scripts/7wBWUw05q0igh508.js new file mode 100644 index 0000000..95e3da1 --- /dev/null +++ b/reference_scripts/7wBWUw05q0igh508.js @@ -0,0 +1,17 @@ +// Imbibing this substance grants the user the Painless Creature Trait. +const hasPainless = this.actor.has("Painless"); +if (hasPainless === undefined) +{ + let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr"); + let data = item.toObject() + this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) + + this.script.scriptMessage( + `

${this.actor.prototypeToken.name} has gained the Painless Creature Trait. This + effect lasts for one hour, after which it dissipates and the full effect + of all the imbiber's wounds come crashing down at once.

+

Note that this does not prevent the user from acquiring a Critical + Wound or dying from one. It merely allows them to ignore most + of their effects.

`, + { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true}) +} \ No newline at end of file diff --git a/reference_scripts/84IB8CWa55XzoAkv.js b/reference_scripts/84IB8CWa55XzoAkv.js new file mode 100644 index 0000000..3cdc615 --- /dev/null +++ b/reference_scripts/84IB8CWa55XzoAkv.js @@ -0,0 +1 @@ +return (["Animal Care", "Charm Animal"].includes(args.item?.name) || args.item?.name.includes("Ride") || args.item?.name.includes("Animal Training")) \ No newline at end of file diff --git a/reference_scripts/87rrZ3ojHrXa3lCn.js b/reference_scripts/87rrZ3ojHrXa3lCn.js new file mode 100644 index 0000000..75193a6 --- /dev/null +++ b/reference_scripts/87rrZ3ojHrXa3lCn.js @@ -0,0 +1 @@ +this.actor.modifyWounds(1) \ No newline at end of file diff --git a/reference_scripts/8AoA4bnstBtglRGZ.js b/reference_scripts/8AoA4bnstBtglRGZ.js new file mode 100644 index 0000000..ff38d2d --- /dev/null +++ b/reference_scripts/8AoA4bnstBtglRGZ.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/8ByuHnUZ4RNTdGVv.js b/reference_scripts/8ByuHnUZ4RNTdGVv.js new file mode 100644 index 0000000..37290b2 --- /dev/null +++ b/reference_scripts/8ByuHnUZ4RNTdGVv.js @@ -0,0 +1,16 @@ +let strLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10) +let tghLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10) + +if (!this.actor.has("Undead") && !this.actor.has("Daemonic")) +{ + 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 => { + await test.roll(); + if (test.failed) { + 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 }) + } + }) + +} +else { + this.script.scriptNotification(`${this.actor.name} is immune to ${this.effect.name}`) +} diff --git a/reference_scripts/8GyJgdHVBaLrHCY8.js b/reference_scripts/8GyJgdHVBaLrHCY8.js new file mode 100644 index 0000000..2ee98a7 --- /dev/null +++ b/reference_scripts/8GyJgdHVBaLrHCY8.js @@ -0,0 +1,21 @@ +let type = this.item.getFlag("wfrp4e", "breath") +let types = { + none : "None", + cold : "Cold", + corrosion : "Corrosion", + fire : "Fire", + electricity : "Electricity", + poison : "Poison", + smoke : "Smoke", + various : "Various" +} +if (!type) +{ + type = (await ItemDialog.create(ItemDialog.objectToArray(types, this.item.img), 1, "Choose Breath"))[0]?.id; + this.item.updateSource({"flags.wfrp4e.breath" : type}) +} + +if (!this.item.name.includes("(") && types[type] && type != "none") +{ + this.item.updateSource({name : this.item.name += ` (${types[type]})`, "system.specification.value" : this.item.system.specification.value.replace("(Type)", "").trim()}) +} \ No newline at end of file diff --git a/reference_scripts/8K9tpCwvFC9INk5V.js b/reference_scripts/8K9tpCwvFC9INk5V.js new file mode 100644 index 0000000..757ac38 --- /dev/null +++ b/reference_scripts/8K9tpCwvFC9INk5V.js @@ -0,0 +1,8 @@ +if (["t", "wp"].includes(args.characteristic)) +{ + args.fields.modifier += 10; +} +else if (["ag", "i", "int"].includes(args.characteristic)) +{ + args.fields.modifier -= 10; +} \ No newline at end of file diff --git a/reference_scripts/8LmUVQxOwTLSeabg.js b/reference_scripts/8LmUVQxOwTLSeabg.js new file mode 100644 index 0000000..32cd5df --- /dev/null +++ b/reference_scripts/8LmUVQxOwTLSeabg.js @@ -0,0 +1 @@ +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 \ No newline at end of file diff --git a/reference_scripts/8N3Uqjq1ZxPxo4pk.js b/reference_scripts/8N3Uqjq1ZxPxo4pk.js new file mode 100644 index 0000000..43dddd4 --- /dev/null +++ b/reference_scripts/8N3Uqjq1ZxPxo4pk.js @@ -0,0 +1 @@ +return !args.skill?.name?.includes(game.i18n.localize("NAME.Lore")) \ No newline at end of file diff --git a/reference_scripts/8RNziYGGb4sp3BGQ.js b/reference_scripts/8RNziYGGb4sp3BGQ.js new file mode 100644 index 0000000..b853c6b --- /dev/null +++ b/reference_scripts/8RNziYGGb4sp3BGQ.js @@ -0,0 +1,5 @@ +if (!args.test.weapon?.name.includes("Drakefire")) +{ + args.test.result.misfire = game.i18n.localize("Misfire"); + args.test.result.misfireDamage = (0, eval)(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.weapon.system.Damage); +} \ No newline at end of file diff --git a/reference_scripts/8ShLVT0bK1eQpinj.js b/reference_scripts/8ShLVT0bK1eQpinj.js new file mode 100644 index 0000000..9783813 --- /dev/null +++ b/reference_scripts/8ShLVT0bK1eQpinj.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.k00PimCWkff11IA0") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data]) \ No newline at end of file diff --git a/reference_scripts/8TRiAJ8thIKE4IoL.js b/reference_scripts/8TRiAJ8thIKE4IoL.js new file mode 100644 index 0000000..3814c2c --- /dev/null +++ b/reference_scripts/8TRiAJ8thIKE4IoL.js @@ -0,0 +1,5 @@ + +let SL = Number(getProperty(this.item, "flags.wfrp4e.sourceTest.result.SL") || 1) + +args.actor.characteristics.i.modifier += 10 * SL +args.actor.characteristics.ag.modifier += 10 * SL \ No newline at end of file diff --git a/reference_scripts/8ThudCYRqkjQIwJH.js b/reference_scripts/8ThudCYRqkjQIwJH.js new file mode 100644 index 0000000..0395373 --- /dev/null +++ b/reference_scripts/8ThudCYRqkjQIwJH.js @@ -0,0 +1,4 @@ +if (args.opposedTest.attackerTest.result.critical) +{ + args.actor.addCondition("ablaze") +} \ No newline at end of file diff --git a/reference_scripts/8WJsecxdndaHRxxS.js b/reference_scripts/8WJsecxdndaHRxxS.js new file mode 100644 index 0000000..5bd3474 --- /dev/null +++ b/reference_scripts/8WJsecxdndaHRxxS.js @@ -0,0 +1 @@ +this.actor.status.addArmour(this.actor.characteristics.wp.bonus, {source: this.effect, magical : true}) \ No newline at end of file diff --git a/reference_scripts/8WeYU5e5LN9UeWFs.js b/reference_scripts/8WeYU5e5LN9UeWFs.js new file mode 100644 index 0000000..7ede669 --- /dev/null +++ b/reference_scripts/8WeYU5e5LN9UeWFs.js @@ -0,0 +1,8 @@ +if (args.item.type == "spell") +{ + let range = parseInt(args.item.Range) + if (Number.isNumeric(range)) + { + args.item.system.range.value = "2 * " + args.item.system.range.value + } +} \ No newline at end of file diff --git a/reference_scripts/8ZAUBSH9CM9OTpTL.js b/reference_scripts/8ZAUBSH9CM9OTpTL.js new file mode 100644 index 0000000..eb0439d --- /dev/null +++ b/reference_scripts/8ZAUBSH9CM9OTpTL.js @@ -0,0 +1,11 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Perception"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "easy"}}); +await test.roll(); + +if (test.succeeded) +{ + this.actor.addCondition("stunned") +} +else if (test.failed) +{ + this.actor.addCondition("poisoned", 2); +} \ No newline at end of file diff --git a/reference_scripts/8araLuwmBq8GKEw3.js b/reference_scripts/8araLuwmBq8GKEw3.js new file mode 100644 index 0000000..66a5c92 --- /dev/null +++ b/reference_scripts/8araLuwmBq8GKEw3.js @@ -0,0 +1,7 @@ +let APIgnored = args.AP.layers.reduce((prev, current) => prev + ((current.weakpoints && !current.ignored) ? current.value : 0), 0) + +if (APIgnored) +{ + args.modifiers.ap.ignored += APIgnored + args.modifiers.ap.details.push(`${this.effect.name}: Ignore AP with Weakpoints (${APIgnored})`) +} \ No newline at end of file diff --git a/reference_scripts/8fefDfiYKFOWdPER.js b/reference_scripts/8fefDfiYKFOWdPER.js new file mode 100644 index 0000000..dc649cd --- /dev/null +++ b/reference_scripts/8fefDfiYKFOWdPER.js @@ -0,0 +1 @@ +args.update({texture : {scaleX : 2, scaleY: 2, src: "modules/wfrp4e-core/tokens/popout/gor.webp"}}); \ No newline at end of file diff --git a/reference_scripts/8g2iitsgaJarKQpr.js b/reference_scripts/8g2iitsgaJarKQpr.js new file mode 100644 index 0000000..4ce1574 --- /dev/null +++ b/reference_scripts/8g2iitsgaJarKQpr.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW") +let data = item.toObject() +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) diff --git a/reference_scripts/8gCja0mfKt4nYVZc.js b/reference_scripts/8gCja0mfKt4nYVZc.js new file mode 100644 index 0000000..d05c4f3 --- /dev/null +++ b/reference_scripts/8gCja0mfKt4nYVZc.js @@ -0,0 +1 @@ +args.fields.slBonus += 2 \ No newline at end of file diff --git a/reference_scripts/8hIyWDyfbgGAig65.js b/reference_scripts/8hIyWDyfbgGAig65.js new file mode 100644 index 0000000..bdf054c --- /dev/null +++ b/reference_scripts/8hIyWDyfbgGAig65.js @@ -0,0 +1 @@ +return ["ws", "bs", "s", "t", "ag", "dex"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/8jvEVPUCg3rKG48Y.js b/reference_scripts/8jvEVPUCg3rKG48Y.js new file mode 100644 index 0000000..38cef06 --- /dev/null +++ b/reference_scripts/8jvEVPUCg3rKG48Y.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.9fq6p9Q6H02LjaSi") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/8noxHUQKR55Kx1YN.js b/reference_scripts/8noxHUQKR55Kx1YN.js new file mode 100644 index 0000000..d164bff --- /dev/null +++ b/reference_scripts/8noxHUQKR55Kx1YN.js @@ -0,0 +1 @@ +this.actor.system.status.corruption.max += 1 \ No newline at end of file diff --git a/reference_scripts/8oE0DTzz0krOfFlV.js b/reference_scripts/8oE0DTzz0krOfFlV.js new file mode 100644 index 0000000..e4d4736 --- /dev/null +++ b/reference_scripts/8oE0DTzz0krOfFlV.js @@ -0,0 +1,2 @@ +args.item.system.qualities.value.push({name : "magical"}) +args.item.system.qualities.value.push({name : "impact"}) diff --git a/reference_scripts/8rq4GL5d5nCn4kO7.js b/reference_scripts/8rq4GL5d5nCn4kO7.js new file mode 100644 index 0000000..79c9046 --- /dev/null +++ b/reference_scripts/8rq4GL5d5nCn4kO7.js @@ -0,0 +1,7 @@ +let caster = this.effect.sourceActor +if (caster) +{ + let healed= caster.characteristics.wp.bonus + this.actor.modifyWounds(healed); + this.script.scriptMessage(`${this.actor.prototypeToken.name} regains ${healed} Wounds`) +} \ No newline at end of file diff --git a/reference_scripts/8tyMXDfHR8AJBdDu.js b/reference_scripts/8tyMXDfHR8AJBdDu.js new file mode 100644 index 0000000..9e0a473 --- /dev/null +++ b/reference_scripts/8tyMXDfHR8AJBdDu.js @@ -0,0 +1,7 @@ +let weakpointsAP = args.AP.layers.filter(i => !i.ignored && i.weakpoints).reduce((ap, layer) => ap + layer.value, 0); + +if (weakpointsAP > 0) +{ + args.modifiers.ap.ignored += weakpointsAP; + args.modifiers.ap.details.push(`${this.effect.name} - Ignore Weakpoints (${weakpointsAP})`); +} \ No newline at end of file diff --git a/reference_scripts/8vpAtJ93GIeye1qj.js b/reference_scripts/8vpAtJ93GIeye1qj.js new file mode 100644 index 0000000..aefec45 --- /dev/null +++ b/reference_scripts/8vpAtJ93GIeye1qj.js @@ -0,0 +1 @@ +return args.type == "cast" \ No newline at end of file diff --git a/reference_scripts/8wG9l4T9fc1bM0TN.js b/reference_scripts/8wG9l4T9fc1bM0TN.js new file mode 100644 index 0000000..a043287 --- /dev/null +++ b/reference_scripts/8wG9l4T9fc1bM0TN.js @@ -0,0 +1,3 @@ +let item = (await fromUuid("Compendium.wfrp4e-core.items.Item.kJNAY1YRaCy9IgmT")).toObject(); +item.system.specification.value = 1; +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/8yBr6VbdKcrWUuqw.js b/reference_scripts/8yBr6VbdKcrWUuqw.js new file mode 100644 index 0000000..ce24a5f --- /dev/null +++ b/reference_scripts/8yBr6VbdKcrWUuqw.js @@ -0,0 +1,4 @@ +this.actor.characteristics.i.value= "-" +this.actor.characteristics.int.value= "-" +this.actor.characteristics.wp.value= "-" +this.actor.characteristics.fel.value = "-" \ No newline at end of file diff --git a/reference_scripts/8zTkDVziBPaNbMQX.js b/reference_scripts/8zTkDVziBPaNbMQX.js new file mode 100644 index 0000000..c032cba --- /dev/null +++ b/reference_scripts/8zTkDVziBPaNbMQX.js @@ -0,0 +1,30 @@ +let filters = [ + { + property : "type", + value : "spell" + }, + { + property : "system.lore.value", + value : "petty" + } +] + +let petty = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 6, "Choose 6 Petty Spells") + + +filters = [ + { + property : "type", + value : "spell" + }, + { + property : "system.lore.value", + value : "" + } +] + +let arcane = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 9, "Choose 9 Arcane Spells") + +let items = petty.concat(arcane).map(i => i.toObject()) + +this.actor.createEmbeddedDocuments("Item", items); \ No newline at end of file diff --git a/reference_scripts/91S2GnBFYFbxmOCK.js b/reference_scripts/91S2GnBFYFbxmOCK.js new file mode 100644 index 0000000..3e28299 --- /dev/null +++ b/reference_scripts/91S2GnBFYFbxmOCK.js @@ -0,0 +1,2 @@ +this.actor.characteristics.s.bonus += 1 +this.actor.characteristics.s.calculationBonusModifier -= 1 \ No newline at end of file diff --git a/reference_scripts/93K85NnVwjVNXlZq.js b/reference_scripts/93K85NnVwjVNXlZq.js new file mode 100644 index 0000000..3b0ffe3 --- /dev/null +++ b/reference_scripts/93K85NnVwjVNXlZq.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Trade")); \ No newline at end of file diff --git a/reference_scripts/956dUb5sd6OtbWZR.js b/reference_scripts/956dUb5sd6OtbWZR.js new file mode 100644 index 0000000..3f6bdb7 --- /dev/null +++ b/reference_scripts/956dUb5sd6OtbWZR.js @@ -0,0 +1 @@ +args.fields.successBonus++; \ No newline at end of file diff --git a/reference_scripts/96Y1yIH1lRjTs5hL.js b/reference_scripts/96Y1yIH1lRjTs5hL.js new file mode 100644 index 0000000..1fab3ce --- /dev/null +++ b/reference_scripts/96Y1yIH1lRjTs5hL.js @@ -0,0 +1,5 @@ +if (args.test.succeeded) + return + +if (args.test.characteristicKey == "wp") + this.actor.addCondition("broken") \ No newline at end of file diff --git a/reference_scripts/98nKfcimlaPeM9h5.js b/reference_scripts/98nKfcimlaPeM9h5.js new file mode 100644 index 0000000..dde67fd --- /dev/null +++ b/reference_scripts/98nKfcimlaPeM9h5.js @@ -0,0 +1,2 @@ +await this.actor.addCondition("bleeding") +await this.script.scriptMessage(await this.actor.applyBasicDamage(10, {suppressMsg : true})); \ No newline at end of file diff --git a/reference_scripts/9A7rYY3FKi5XLihG.js b/reference_scripts/9A7rYY3FKi5XLihG.js new file mode 100644 index 0000000..e8ade7a --- /dev/null +++ b/reference_scripts/9A7rYY3FKi5XLihG.js @@ -0,0 +1,6 @@ +fromUuid("Compendium.wfrp4e-core.items.5QcrpLQWWrsbKR79").then(item => { + let data = item.toObject(); + data.system.tests.value = data.system.tests.value.replace("coins", "metal objects"); + data.system.description.value += "

This Talent also extends to any metal object because of Metallic Affinity

" + this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) +}) \ No newline at end of file diff --git a/reference_scripts/9EVj4bmZJex45Mt7.js b/reference_scripts/9EVj4bmZJex45Mt7.js new file mode 100644 index 0000000..a17d972 --- /dev/null +++ b/reference_scripts/9EVj4bmZJex45Mt7.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Athletics"); \ No newline at end of file diff --git a/reference_scripts/9JnPK1jNUEso7Pv8.js b/reference_scripts/9JnPK1jNUEso7Pv8.js new file mode 100644 index 0000000..8c33cb3 --- /dev/null +++ b/reference_scripts/9JnPK1jNUEso7Pv8.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") +let data = item.toObject(); +data.name += ` (Smell)` +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/9MDi3ok9gPwtbALf.js b/reference_scripts/9MDi3ok9gPwtbALf.js new file mode 100644 index 0000000..d6892bc --- /dev/null +++ b/reference_scripts/9MDi3ok9gPwtbALf.js @@ -0,0 +1 @@ +args.actor.details.move.value /= 2 \ No newline at end of file diff --git a/reference_scripts/9MwRUzRinhq1IjhG.js b/reference_scripts/9MwRUzRinhq1IjhG.js new file mode 100644 index 0000000..280ccc9 --- /dev/null +++ b/reference_scripts/9MwRUzRinhq1IjhG.js @@ -0,0 +1 @@ +args.actor.addCondition("grappling"); \ No newline at end of file diff --git a/reference_scripts/9RFoasDcFnYZ1txR.js b/reference_scripts/9RFoasDcFnYZ1txR.js new file mode 100644 index 0000000..8a60a20 --- /dev/null +++ b/reference_scripts/9RFoasDcFnYZ1txR.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Perception"); \ No newline at end of file diff --git a/reference_scripts/9VfeubiCV83LN9iY.js b/reference_scripts/9VfeubiCV83LN9iY.js new file mode 100644 index 0000000..83f9f95 --- /dev/null +++ b/reference_scripts/9VfeubiCV83LN9iY.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM") +let data = item.toObject(); +data.name += ` (When Charging)` +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/9WZa63lr0K3SsP4G.js b/reference_scripts/9WZa63lr0K3SsP4G.js new file mode 100644 index 0000000..bac4c09 --- /dev/null +++ b/reference_scripts/9WZa63lr0K3SsP4G.js @@ -0,0 +1,7 @@ +let sourceItem = this.effect.sourceItem; + +if (sourceItem) +{ + this.actor.applyEffect({effectUuids : [sourceItem.effects.contents[2].uuid]}) + this.script.scriptNotification("Applied after effects"); +} \ No newline at end of file diff --git a/reference_scripts/9Yn9uViEjcuaESJ2.js b/reference_scripts/9Yn9uViEjcuaESJ2.js new file mode 100644 index 0000000..f964391 --- /dev/null +++ b/reference_scripts/9Yn9uViEjcuaESJ2.js @@ -0,0 +1,12 @@ +if (this.item.getFlag("wfrp4e", "failedCool")) +{ + this.item.name += " (No AP)" + this.item.system.AP = { + "head": 0, + "lArm": 0, + "rArm": 0, + "lLeg": 0, + "rLeg": 0, + "body": 0 + } +} \ No newline at end of file diff --git a/reference_scripts/9ZFPDCk8M2TQxh7x.js b/reference_scripts/9ZFPDCk8M2TQxh7x.js new file mode 100644 index 0000000..3529480 --- /dev/null +++ b/reference_scripts/9ZFPDCk8M2TQxh7x.js @@ -0,0 +1 @@ +args.fields.modifier += 20 diff --git a/reference_scripts/9bJGJrLqslV5lBya.js b/reference_scripts/9bJGJrLqslV5lBya.js new file mode 100644 index 0000000..9023650 --- /dev/null +++ b/reference_scripts/9bJGJrLqslV5lBya.js @@ -0,0 +1 @@ + return args.characteristic == "bs" \ No newline at end of file diff --git a/reference_scripts/9eWR4mdaoCSQawDT.js b/reference_scripts/9eWR4mdaoCSQawDT.js new file mode 100644 index 0000000..82e0ef9 --- /dev/null +++ b/reference_scripts/9eWR4mdaoCSQawDT.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX"); +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) diff --git a/reference_scripts/9fK07tqqZyPg7dpx.js b/reference_scripts/9fK07tqqZyPg7dpx.js new file mode 100644 index 0000000..baccb76 --- /dev/null +++ b/reference_scripts/9fK07tqqZyPg7dpx.js @@ -0,0 +1,12 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty: "veasy"}}) +await test.roll(); +if (test.failed) +{ + this.script.scriptNotification("Gained a Festering Wound") + let item = await fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb") + this.actor.createEmbeddedDocuments("Item", [item.toObject()]) +} +else +{ + this.script.scriptNotification("Avoided a Festering Wound") +} diff --git a/reference_scripts/9nroaZDkW3WXNkB7.js b/reference_scripts/9nroaZDkW3WXNkB7.js new file mode 100644 index 0000000..64deeef --- /dev/null +++ b/reference_scripts/9nroaZDkW3WXNkB7.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.4MJJCiOKPkBByYwW"); +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/9ob2lPnk3PDot9Tx.js b/reference_scripts/9ob2lPnk3PDot9Tx.js new file mode 100644 index 0000000..1edbafd --- /dev/null +++ b/reference_scripts/9ob2lPnk3PDot9Tx.js @@ -0,0 +1 @@ +this.actor.addCondition("blinded", this.effect.sourceTest.result.SL) \ No newline at end of file diff --git a/reference_scripts/9qWUuEF8F5nehF1y.js b/reference_scripts/9qWUuEF8F5nehF1y.js new file mode 100644 index 0000000..442e3d1 --- /dev/null +++ b/reference_scripts/9qWUuEF8F5nehF1y.js @@ -0,0 +1,2 @@ +args.item.system.qualities.value = args.item.system.qualities.value.concat([{name : "magical"}, {name : "unbreakable"}]) +args.item.system.damage.value += ` + ${this.effect.sourceActor.system.characteristics.wp.bonus}` \ No newline at end of file diff --git a/reference_scripts/A0OK0qAMmnf8iNJf.js b/reference_scripts/A0OK0qAMmnf8iNJf.js new file mode 100644 index 0000000..b3df7c5 --- /dev/null +++ b/reference_scripts/A0OK0qAMmnf8iNJf.js @@ -0,0 +1,8 @@ +if (args.test.result.SL < 0) +{ + this.script.scriptMessage(`Gained ${Math.abs(args.test.result.SL)} Corruption points`, {whisper : ChatMessage.getWhisperRecipients("GM")}) + if (args.test.failed && this.actor.type == "character") + { + this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + Math.abs(args.test.result.SL)}) + } +} \ No newline at end of file diff --git a/reference_scripts/A1odAcuRbq9797ZB.js b/reference_scripts/A1odAcuRbq9797ZB.js new file mode 100644 index 0000000..04c6e12 --- /dev/null +++ b/reference_scripts/A1odAcuRbq9797ZB.js @@ -0,0 +1,94 @@ +let choice1 = [ + { + type : "skill", + name : "Melee (Basic)", + diff : { + system : { + advances : { + value : 10 + } + } + } + } +] +let choice2 = [ + { + type : "skill", + name : "Melee (Polearm)", + diff : { + system : { + advances : { + value : 10 + } + } + } + } +] + +let choice = await Dialog.wait({ + title : "Choice", + content : + `

+ Select your choice +

+
    +
  1. Melee (Basic)
  2. +
  3. Melee (Polearm)
  4. +
+ `, + buttons : { + 1 : { + label : "Basic", + callback : () => { + return choice1; + } + }, + 2 : { + label : "Polearm", + callback : () => { + return choice2; + } + } + } +}) + +let updateObj = this.actor.toObject(); +let items = [] +for (let c of choice) +{ + let existing + if (c.type == "skill") + { + existing = updateObj.items.find(i => i.name == c.name && i.type == c.type) + if (existing && c.diff?.system?.advances?.value) + { + existing.system.advances.value += c.diff.system.advances.value + } + } + + if (!existing) + { + let item = await game.wfrp4e.utility.find(c.name, c.type) + if (item) + { + item = item.toObject() + equip(item); + items.push(mergeObject(item, (c.diff || {}))) + } + else + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } + +} +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/A3MW0UksYrHGa0Qw.js b/reference_scripts/A3MW0UksYrHGa0Qw.js new file mode 100644 index 0000000..1d38773 --- /dev/null +++ b/reference_scripts/A3MW0UksYrHGa0Qw.js @@ -0,0 +1 @@ +return ["fel", "wp", "int", "t"].includes(args.characteristic); \ No newline at end of file diff --git a/reference_scripts/A3fvV69RS1lYgma0.js b/reference_scripts/A3fvV69RS1lYgma0.js new file mode 100644 index 0000000..73c68ae --- /dev/null +++ b/reference_scripts/A3fvV69RS1lYgma0.js @@ -0,0 +1,15 @@ +if (this.actor.type == "character") + this.actor.corruptionDialog("minor") + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name}) +await test.roll(); +if(test.failed) +{ + await this.actor.addCondition("unconscious"); + let secondTest = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "easy"}, skipTargets: true, appendTitle : " - Despair"}) + await secondTest.roll(); + if(secondTest.failed) + { + await this.actor.addCondition("fatigued"); + } +} \ No newline at end of file diff --git a/reference_scripts/A6DcKPzAGntzSCil.js b/reference_scripts/A6DcKPzAGntzSCil.js new file mode 100644 index 0000000..3ba5f6c --- /dev/null +++ b/reference_scripts/A6DcKPzAGntzSCil.js @@ -0,0 +1,5 @@ +let roll = await new Roll("1d10").roll() + +roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Duration)`})); + +this.effect.updateSource({"duration.rounds" : roll.total}) \ No newline at end of file diff --git a/reference_scripts/ACgKpKrEEHoNGG0h.js b/reference_scripts/ACgKpKrEEHoNGG0h.js new file mode 100644 index 0000000..5d7289c --- /dev/null +++ b/reference_scripts/ACgKpKrEEHoNGG0h.js @@ -0,0 +1 @@ +return !args.skill?.name.includes("Channelling") && args.type != "channelling" \ No newline at end of file diff --git a/reference_scripts/ACtDCTLZXmd5uXjX.js b/reference_scripts/ACtDCTLZXmd5uXjX.js new file mode 100644 index 0000000..205ea6b --- /dev/null +++ b/reference_scripts/ACtDCTLZXmd5uXjX.js @@ -0,0 +1,15 @@ +let halve; +if (args.opposedTest.attackerTest.item?.type != "spell") +{ + halve = await Dialog.confirm({title : this.effect.name, content : "Halve Damage? (Halves all damage other than fire, cold, and magic)"}) +} +else +{ + halve = false; +} + +if (halve) +{ + args.totalWoundLoss /= 2; + args.modifiers.other.push({label : this.effect.name, details : "Halved", value : "× 0.5"}) +} \ No newline at end of file diff --git a/reference_scripts/AGD7zCyV4zruvnWu.js b/reference_scripts/AGD7zCyV4zruvnWu.js new file mode 100644 index 0000000..f7eb0f9 --- /dev/null +++ b/reference_scripts/AGD7zCyV4zruvnWu.js @@ -0,0 +1 @@ +return args.type != "cast" || !["death", "necromancy", "life", "light", "heavens"].includes(args.spell?.system.lore.value) \ No newline at end of file diff --git a/reference_scripts/AHZ8f7dfN8jNsYk6.js b/reference_scripts/AHZ8f7dfN8jNsYk6.js new file mode 100644 index 0000000..80ece08 --- /dev/null +++ b/reference_scripts/AHZ8f7dfN8jNsYk6.js @@ -0,0 +1,22 @@ +let token = this.actor.getActiveTokens()[0]; +let target = args.data.targets[0]; +let weapon = args.weapon; + +if(!target || !token) +{ + return; +} + +let distance = canvas.grid.measureDistances([{ ray: new Ray({ x: token.center.x, y: token.center.y }, { x: target.center.x, y: target.center.y }) }], { gridSpaces: true })[0] +let currentBand + +for (let band in weapon.range.bands) +{ + if (distance >= weapon.range.bands[band].range[0] && distance <= weapon.range.bands[band].range[1]) + { + currentBand = band; + break; + } +} + +return [game.i18n.localize("Long Range"), game.i18n.localize("Extreme")].includes(currentBand) \ No newline at end of file diff --git a/reference_scripts/AI6bFrjWk4NH9FBd.js b/reference_scripts/AI6bFrjWk4NH9FBd.js new file mode 100644 index 0000000..c1eb8c2 --- /dev/null +++ b/reference_scripts/AI6bFrjWk4NH9FBd.js @@ -0,0 +1 @@ +this.actor.addCondition("entangled", this.effect.sourceTest.result.overcast.usage.other.current) \ No newline at end of file diff --git a/reference_scripts/ALuPRzf85dmkEfLo.js b/reference_scripts/ALuPRzf85dmkEfLo.js new file mode 100644 index 0000000..b624bba --- /dev/null +++ b/reference_scripts/ALuPRzf85dmkEfLo.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Intuition"); \ No newline at end of file diff --git a/reference_scripts/AMI2wDJqsIZsoq1e.js b/reference_scripts/AMI2wDJqsIZsoq1e.js new file mode 100644 index 0000000..26b30e4 --- /dev/null +++ b/reference_scripts/AMI2wDJqsIZsoq1e.js @@ -0,0 +1,4 @@ +if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") +{ + this.script.scriptMessage(`Emits a cloud of foul-smelling blackpowder. Enable the Fellowship Penalty Active Effect on @UUID[${this.actor.uuid}].`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/reference_scripts/AMxezwtYnWCF6Oza.js b/reference_scripts/AMxezwtYnWCF6Oza.js new file mode 100644 index 0000000..6eb5509 --- /dev/null +++ b/reference_scripts/AMxezwtYnWCF6Oza.js @@ -0,0 +1 @@ +return args.skill?.name == "Ranged (Blackpowder)" \ No newline at end of file diff --git a/reference_scripts/AS7CstSosuCrwZ19.js b/reference_scripts/AS7CstSosuCrwZ19.js new file mode 100644 index 0000000..36c1d60 --- /dev/null +++ b/reference_scripts/AS7CstSosuCrwZ19.js @@ -0,0 +1,12 @@ +this.actor.getActiveTokens().forEach(t => t.document.update({light : { + "dim": 20, + "bright": 10, + "angle": 360, + "alpha": 0.4, + "animation": { + "speed": 3, + "intensity": 3, + "type": "torch", + }, + "color": "#ffcc66", + }})); \ No newline at end of file diff --git a/reference_scripts/AV2Kj6jgmIc45zKi.js b/reference_scripts/AV2Kj6jgmIc45zKi.js new file mode 100644 index 0000000..77024fc --- /dev/null +++ b/reference_scripts/AV2Kj6jgmIc45zKi.js @@ -0,0 +1 @@ +return args.skill?.name.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/AVROqafFhKjN6TPR.js b/reference_scripts/AVROqafFhKjN6TPR.js new file mode 100644 index 0000000..ce6d01e --- /dev/null +++ b/reference_scripts/AVROqafFhKjN6TPR.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/AWgZnm9xLyIWCDnp.js b/reference_scripts/AWgZnm9xLyIWCDnp.js new file mode 100644 index 0000000..71430ba --- /dev/null +++ b/reference_scripts/AWgZnm9xLyIWCDnp.js @@ -0,0 +1,9 @@ +let robust = args.modifiers.other.find(i => i.key == "robust") +if (robust) +{ + robust.value--; +} +else +{ + args.modifiers.other.push({key: "robust", label : this.effect.name, value : -1}) +} diff --git a/reference_scripts/AZGXrZOQ4EzjxRL9.js b/reference_scripts/AZGXrZOQ4EzjxRL9.js new file mode 100644 index 0000000..5acac40 --- /dev/null +++ b/reference_scripts/AZGXrZOQ4EzjxRL9.js @@ -0,0 +1 @@ +return true; \ No newline at end of file diff --git a/reference_scripts/Adgs6Zs0FdefO6qx.js b/reference_scripts/Adgs6Zs0FdefO6qx.js new file mode 100644 index 0000000..dd41f6a --- /dev/null +++ b/reference_scripts/Adgs6Zs0FdefO6qx.js @@ -0,0 +1,5 @@ +if (args.test.options.pilot && args.test.result.reversed) +{ + args.test.data.result.SL = "+" + Math.min(1, Number(args.test.data.result.SL)) + args.test.result.other.push(`${this.effect.name}: SL limited to 1`) +} \ No newline at end of file diff --git a/reference_scripts/Ah2wyywkL8hjJNXM.js b/reference_scripts/Ah2wyywkL8hjJNXM.js new file mode 100644 index 0000000..887ba7c --- /dev/null +++ b/reference_scripts/Ah2wyywkL8hjJNXM.js @@ -0,0 +1 @@ +args.options.healWounds = true; \ No newline at end of file diff --git a/reference_scripts/AjC4dsiuhVCOnRGI.js b/reference_scripts/AjC4dsiuhVCOnRGI.js new file mode 100644 index 0000000..13cd64b --- /dev/null +++ b/reference_scripts/AjC4dsiuhVCOnRGI.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/AmOMCUaWLJ2iJAt5.js b/reference_scripts/AmOMCUaWLJ2iJAt5.js new file mode 100644 index 0000000..4a29d59 --- /dev/null +++ b/reference_scripts/AmOMCUaWLJ2iJAt5.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.IFKWu98qmWpaSfUi") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/AmpDbT0BkDHeaRzf.js b/reference_scripts/AmpDbT0BkDHeaRzf.js new file mode 100644 index 0000000..4094235 --- /dev/null +++ b/reference_scripts/AmpDbT0BkDHeaRzf.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn"); +let data = item.toObject(); +data.system.specification.value = 1; +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/ApaLcUhuty3EzJoP.js b/reference_scripts/ApaLcUhuty3EzJoP.js new file mode 100644 index 0000000..da73508 --- /dev/null +++ b/reference_scripts/ApaLcUhuty3EzJoP.js @@ -0,0 +1,6 @@ +let fortunePoints = this.effect.sourceTest.result.overcast.usage.other.current +let current = this.actor.status.fortune.value + +this.actor.update({"system.status.fortune.value" : fortunePoints + current}) + +this.script.scriptMessage(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${fortunePoints + current}`) \ No newline at end of file diff --git a/reference_scripts/AqHLHp4kH6KULk3e.js b/reference_scripts/AqHLHp4kH6KULk3e.js new file mode 100644 index 0000000..d8b4d08 --- /dev/null +++ b/reference_scripts/AqHLHp4kH6KULk3e.js @@ -0,0 +1,12 @@ +if (this.item.system.quantity.value) +{ + this.item.system.reduceQuantity(); + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + let effectData = this.item.effects.contents[0].convertToApplied(); + effectData.flags.wfrp4e.sourceItem = this.item.uuid + actor.applyEffect({effectData : [effectData]}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/AyNb5sj6FD2Z3Q5T.js b/reference_scripts/AyNb5sj6FD2Z3Q5T.js new file mode 100644 index 0000000..2d4490d --- /dev/null +++ b/reference_scripts/AyNb5sj6FD2Z3Q5T.js @@ -0,0 +1,3 @@ +this.actor.addCondition("dead") +this.actor.setWounds(0); +this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("scatter")) \ No newline at end of file diff --git a/reference_scripts/AyS3iLljxHRKsHg4.js b/reference_scripts/AyS3iLljxHRKsHg4.js new file mode 100644 index 0000000..bd8ef94 --- /dev/null +++ b/reference_scripts/AyS3iLljxHRKsHg4.js @@ -0,0 +1,8 @@ +let broken = this.actor.hasCondition("broken"); +let fatigued = this.actor.hasCondition("fatigued"); +await broken?.delete(); +await fatigued?.delete() +let drilled = await fromUuid("Compendium.wfrp4e-core.items.Item.J9MK0AIaTbvd5oF6") +let fearless = await fromUuid("Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG") +let stout = await fromUuid("Compendium.wfrp4e-core.items.Item.IogM5gnsoOX63w7j") +this.actor.createEmbeddedDocuments("Item", [drilled, fearless, stout], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/B063u4vrbvzMaCQt.js b/reference_scripts/B063u4vrbvzMaCQt.js new file mode 100644 index 0000000..394602e --- /dev/null +++ b/reference_scripts/B063u4vrbvzMaCQt.js @@ -0,0 +1 @@ +args.item.system.flaws.value = args.item.system.flaws.value.concat([{name : "bulky"}, {name : "unreliable"}]) \ No newline at end of file diff --git a/reference_scripts/B1xgRS00RcTIZLnO.js b/reference_scripts/B1xgRS00RcTIZLnO.js new file mode 100644 index 0000000..827c508 --- /dev/null +++ b/reference_scripts/B1xgRS00RcTIZLnO.js @@ -0,0 +1 @@ +return ["cast", "channelling"].includes(args.type) && this.actor.hasCondition("fatigued") \ No newline at end of file diff --git a/reference_scripts/B6ZbY3bxTPg6nCng.js b/reference_scripts/B6ZbY3bxTPg6nCng.js new file mode 100644 index 0000000..82df2d2 --- /dev/null +++ b/reference_scripts/B6ZbY3bxTPg6nCng.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Bribery"); \ No newline at end of file diff --git a/reference_scripts/B87v1twc65qyvUWi.js b/reference_scripts/B87v1twc65qyvUWi.js new file mode 100644 index 0000000..97894e2 --- /dev/null +++ b/reference_scripts/B87v1twc65qyvUWi.js @@ -0,0 +1 @@ +args.fields.modifier += 10 * this.effect.conditionValue \ No newline at end of file diff --git a/reference_scripts/B950b0XnIUYCdVwu.js b/reference_scripts/B950b0XnIUYCdVwu.js new file mode 100644 index 0000000..99daff7 --- /dev/null +++ b/reference_scripts/B950b0XnIUYCdVwu.js @@ -0,0 +1,11 @@ +let test = await args.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name}) +await test.roll(); + +if (test.succeeded) +{ + if (args.totalWoundLoss <= parseInt(test.result.SL)) + { + args.abort = `${this.effect.name}: Attack deflected and reflected` + } + args.modifiers.other.push({label : this.effect.name, value : -1 * parseInt(test.result.SL)}) +} \ No newline at end of file diff --git a/reference_scripts/BAOv7moTxsKlT3JS.js b/reference_scripts/BAOv7moTxsKlT3JS.js new file mode 100644 index 0000000..7adeacf --- /dev/null +++ b/reference_scripts/BAOv7moTxsKlT3JS.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "easy"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("broken") +} \ No newline at end of file diff --git a/reference_scripts/BD7bVTU2pVoRSRBe.js b/reference_scripts/BD7bVTU2pVoRSRBe.js new file mode 100644 index 0000000..f82d353 --- /dev/null +++ b/reference_scripts/BD7bVTU2pVoRSRBe.js @@ -0,0 +1,30 @@ +let symptoms = { + convulsions : "Convulsions", + coughsandsneezes : "Coughs and Sneezes", + fever : "Fever", + flux : "Flux", + nausea : "Nausea" +} + +let roll = await (new Roll(`max(0, 1d10 - ${this.actor.characteristics.wp.bonus})`).roll()) +roll.toMessage(this.script.getChatData()); + +let choices = await ItemDialog.create(ItemDialog.objectToArray(symptoms), roll.total, "Choose Symptoms"); + +if (choices.length) +{ + let symptomEffects = duplicate(game.wfrp4e.config.symptomEffects) + let added = [] + for(let choice of choices) + { + let symptom = symptomEffects[choice.id]; + symptom.origin = this.effect.uuid; + added.push(symptom); + } + this.actor.createEmbeddedDocuments("ActiveEffect", added) +} +else +{ + this.effect.delete(); +} + diff --git a/reference_scripts/BHbFqhJPzZI2txLs.js b/reference_scripts/BHbFqhJPzZI2txLs.js new file mode 100644 index 0000000..abf139c --- /dev/null +++ b/reference_scripts/BHbFqhJPzZI2txLs.js @@ -0,0 +1,8 @@ +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 +// 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 diff --git a/reference_scripts/BcXTujburrHpjpwa.js b/reference_scripts/BcXTujburrHpjpwa.js new file mode 100644 index 0000000..a5e4b3a --- /dev/null +++ b/reference_scripts/BcXTujburrHpjpwa.js @@ -0,0 +1 @@ +args.fields.slBonus -= 3; \ No newline at end of file diff --git a/reference_scripts/Be5rdfnZorbILhpC.js b/reference_scripts/Be5rdfnZorbILhpC.js new file mode 100644 index 0000000..7f8b900 --- /dev/null +++ b/reference_scripts/Be5rdfnZorbILhpC.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") +let data = item.toObject(); +data.system.specification.value = 3 - this.actor.characteristics.s.bonus +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Bexspr5viPhHiFmU.js b/reference_scripts/Bexspr5viPhHiFmU.js new file mode 100644 index 0000000..601fb6e --- /dev/null +++ b/reference_scripts/Bexspr5viPhHiFmU.js @@ -0,0 +1,3 @@ +let fatigued = this.actor.hasCondition("fatigued"); +let value = fatigued?.conditionValue || 0; +args.fields.modifier += value * 10; \ No newline at end of file diff --git a/reference_scripts/Bj6bxItlgtI2sXVN.js b/reference_scripts/Bj6bxItlgtI2sXVN.js new file mode 100644 index 0000000..65b1b9e --- /dev/null +++ b/reference_scripts/Bj6bxItlgtI2sXVN.js @@ -0,0 +1,5 @@ +let roll = await new Roll("1d10").roll(); +roll.toMessage(this.script.getChatData()); +args.totalWoundLoss = Math.max(0, args.totalWoundLoss - roll.total) +args.modifiers.other.push({label: this.effect.name, value : -1 * roll.total}) +this.effect.update({disabled : true}) \ No newline at end of file diff --git a/reference_scripts/BtyFhdGMKiMamGhM.js b/reference_scripts/BtyFhdGMKiMamGhM.js new file mode 100644 index 0000000..62a927a --- /dev/null +++ b/reference_scripts/BtyFhdGMKiMamGhM.js @@ -0,0 +1,15 @@ +let test = await args.actor.setupSkill("Dodge", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +let damage = parseInt(this.effect.sourceTest.result.SL) + +if (test.succeded) +{ + damage = damage + 8 - parseInt(test.result.SL) +} + +else +{ + damage = damage + 10 + this.actor.addCondition("entangled", 3) +} +this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {loc : "roll", suppressMsg: true})) diff --git a/reference_scripts/Bv3431tnG3VKaTJr.js b/reference_scripts/Bv3431tnG3VKaTJr.js new file mode 100644 index 0000000..9aa3165 --- /dev/null +++ b/reference_scripts/Bv3431tnG3VKaTJr.js @@ -0,0 +1,4 @@ +if (args.test.result.castOutcome == "success") +{ + args.test.result.other.push(`@Fear[2,${this.actor.name}]`); +} \ No newline at end of file diff --git a/reference_scripts/ByhEa1BxQOyrOmqg.js b/reference_scripts/ByhEa1BxQOyrOmqg.js new file mode 100644 index 0000000..cff575e --- /dev/null +++ b/reference_scripts/ByhEa1BxQOyrOmqg.js @@ -0,0 +1 @@ +return args.item?.attackType == 'melee' \ No newline at end of file diff --git a/reference_scripts/BzDLuxBNw1QNIacg.js b/reference_scripts/BzDLuxBNw1QNIacg.js new file mode 100644 index 0000000..88497b0 --- /dev/null +++ b/reference_scripts/BzDLuxBNw1QNIacg.js @@ -0,0 +1,8 @@ +if (args.item.type == "skill") + args.item.system.advances.value = 0 + +if (args.item.type == "talent") + args.item.system.tests.value = "" + +if (args.item.type == "weapon") + args.item.system.qualities.value = [] \ No newline at end of file diff --git a/reference_scripts/CCK1iIfPmB398ziT.js b/reference_scripts/CCK1iIfPmB398ziT.js new file mode 100644 index 0000000..4d67bea --- /dev/null +++ b/reference_scripts/CCK1iIfPmB398ziT.js @@ -0,0 +1,2 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Athletics"), {fields : {difficulty : "difficult"}, skipTargets: true, appendTitle : " - Walking"}) +test.roll(); \ No newline at end of file diff --git a/reference_scripts/CCwuu3bPLCpVGAmb.js b/reference_scripts/CCwuu3bPLCpVGAmb.js new file mode 100644 index 0000000..85aa1a1 --- /dev/null +++ b/reference_scripts/CCwuu3bPLCpVGAmb.js @@ -0,0 +1,4 @@ +let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); + + diff --git a/reference_scripts/CDASLC4fWKSGQKf9.js b/reference_scripts/CDASLC4fWKSGQKf9.js new file mode 100644 index 0000000..2432564 --- /dev/null +++ b/reference_scripts/CDASLC4fWKSGQKf9.js @@ -0,0 +1,5 @@ +let blinded = this.actor.hasCondition("blinded"); +if (blinded?.getFlag("wfrp4e", "flockOfDoom")) +{ + blinded.delete(); +} \ No newline at end of file diff --git a/reference_scripts/CHnaBPHk6HdFS512.js b/reference_scripts/CHnaBPHk6HdFS512.js new file mode 100644 index 0000000..6e8536e --- /dev/null +++ b/reference_scripts/CHnaBPHk6HdFS512.js @@ -0,0 +1,6 @@ +let arm = await fromUuid("Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS"); +let leg = await fromUuid("Compendium.wfrp4e-core.items.k00PimCWkff11IA0"); + +let choice = await ItemDialog.create([arm, leg], 1, "Choose Limb") + +this.actor.createEmbeddedDocuments("Item", choice, {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/CIxZYkHggBQ6EsHP.js b/reference_scripts/CIxZYkHggBQ6EsHP.js new file mode 100644 index 0000000..8034dd7 --- /dev/null +++ b/reference_scripts/CIxZYkHggBQ6EsHP.js @@ -0,0 +1,2 @@ +this.script.scriptNotification("Effect Used"); +this.effect.delete(); \ No newline at end of file diff --git a/reference_scripts/CM43kvw5mIIE1OsB.js b/reference_scripts/CM43kvw5mIIE1OsB.js new file mode 100644 index 0000000..7f1869d --- /dev/null +++ b/reference_scripts/CM43kvw5mIIE1OsB.js @@ -0,0 +1,12 @@ +let key = this.item.system.location.key + +let lostFingers = this.actor.flags.useless[key] || 0; + +lostFingers += 1 + +this.actor.flags.useless[key] = lostFingers; + +if (lostFingers >= 4) +{ + this.actor.flags.useless[key[0] + "Arm"] = true; +} \ No newline at end of file diff --git a/reference_scripts/CMUFtmNA1kkD1ay7.js b/reference_scripts/CMUFtmNA1kkD1ay7.js new file mode 100644 index 0000000..927f0b6 --- /dev/null +++ b/reference_scripts/CMUFtmNA1kkD1ay7.js @@ -0,0 +1,12 @@ +this.actor.getActiveTokens().forEach(t => t.document.update({light : { + "dim": 30, + "bright": 20, + "angle": 90, + "alpha": 0.6, + "animation": { + "speed": 3, + "intensity": 3, + "type": "torch", + }, + "color": "#ffcc66", + }})); \ No newline at end of file diff --git a/reference_scripts/CPQoK7NjzOwVTFXS.js b/reference_scripts/CPQoK7NjzOwVTFXS.js new file mode 100644 index 0000000..eeee877 --- /dev/null +++ b/reference_scripts/CPQoK7NjzOwVTFXS.js @@ -0,0 +1,7 @@ +for(let effect of this.actor.effects.filter(e => e.isCondition)) +{ + if (effect.isCondition) + { + effect.delete(); + } +} \ No newline at end of file diff --git a/reference_scripts/CW5Vlr57OaMkKJ8Q.js b/reference_scripts/CW5Vlr57OaMkKJ8Q.js new file mode 100644 index 0000000..0d5a0a9 --- /dev/null +++ b/reference_scripts/CW5Vlr57OaMkKJ8Q.js @@ -0,0 +1,12 @@ +if (this.actor.system.status.advantage.value >= 3) +{ + this.actor.modifyAdvantage(-3); + this.script.scriptNotification("Advantage Subtracted") +} +else +{ + return this.script.scriptNotification("Not enough Advantage!", "error") +} + +let test = await this.actor.setupTrait(this.item) +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/CWNGrg7se91RC95g.js b/reference_scripts/CWNGrg7se91RC95g.js new file mode 100644 index 0000000..27d7518 --- /dev/null +++ b/reference_scripts/CWNGrg7se91RC95g.js @@ -0,0 +1,11 @@ +if (args.totalWoundLoss > 0) { + args.opposedTest.result.other.push( + `@Corruption[minor]{Moderate Exposure to Corruption}` + ) + this.script.scriptMessage(`${this.effect.name}: + @Corruption[moderate]{Moderate Exposure to Corruption}
+ ${args.actor.prototypeToken.name} must take an + Corruption (Moderate) Test`, + {whisper: ChatMessage.getWhisperRecipients("GM")} + ) +} \ No newline at end of file diff --git a/reference_scripts/Ca1fXHTA1e2QLx0D.js b/reference_scripts/Ca1fXHTA1e2QLx0D.js new file mode 100644 index 0000000..85980bf --- /dev/null +++ b/reference_scripts/Ca1fXHTA1e2QLx0D.js @@ -0,0 +1 @@ +args.fields.modifier += 50; \ No newline at end of file diff --git a/reference_scripts/CiFeduksZJ6PRulx.js b/reference_scripts/CiFeduksZJ6PRulx.js new file mode 100644 index 0000000..8bb32b5 --- /dev/null +++ b/reference_scripts/CiFeduksZJ6PRulx.js @@ -0,0 +1 @@ +return args.skill?.name == "Ride (Horse)" || (args.options.dodge && this.actor.isMounted); \ No newline at end of file diff --git a/reference_scripts/Cjj4iLkdY1NaZRCi.js b/reference_scripts/Cjj4iLkdY1NaZRCi.js new file mode 100644 index 0000000..165854d --- /dev/null +++ b/reference_scripts/Cjj4iLkdY1NaZRCi.js @@ -0,0 +1,26 @@ +if ((args.opposedTest.attackerTest.item && args.opposedTest.attackerTest.item.isMelee) || (args.opposedTest.attackerTest.item && !args.opposedTest.attackerTest.item.name.includes("Ranged"))) +{ + let choice = await Dialog.wait({ + title: this.effect.name, + content: `

Apply damage with ${this.effect.name} to attacker?`, + buttons: { + yes: { + label: "Yes", + callback: () => { + return true; + } + }, + no: { + label: "No", + callback: () => { + return false; + } + } + } + }) + + if (choice) + { + this.script.scriptMessage(await args.attacker.applyBasicDamage(this.actor.system.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})); + } +} \ No newline at end of file diff --git a/reference_scripts/CkE8NZOhzPkuRrKJ.js b/reference_scripts/CkE8NZOhzPkuRrKJ.js new file mode 100644 index 0000000..d4e519f --- /dev/null +++ b/reference_scripts/CkE8NZOhzPkuRrKJ.js @@ -0,0 +1,14 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data]) + + + + +let 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) +{ + this.actor.addCondition("unconscious") +} \ No newline at end of file diff --git a/reference_scripts/CoImIH9OCMx9DfQZ.js b/reference_scripts/CoImIH9OCMx9DfQZ.js new file mode 100644 index 0000000..d5f9737 --- /dev/null +++ b/reference_scripts/CoImIH9OCMx9DfQZ.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.nbhn2wX35b7Jrcbg") +let data = item.toObject(); +data.system.location.value = "Jaw" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/D5XmzrUGFa1JN0cl.js b/reference_scripts/D5XmzrUGFa1JN0cl.js new file mode 100644 index 0000000..fe0c170 --- /dev/null +++ b/reference_scripts/D5XmzrUGFa1JN0cl.js @@ -0,0 +1,2 @@ +args.prefillModifiers.modifier += 10 + diff --git a/reference_scripts/DANLE5HxrkTNelhl.js b/reference_scripts/DANLE5HxrkTNelhl.js new file mode 100644 index 0000000..e8601ac --- /dev/null +++ b/reference_scripts/DANLE5HxrkTNelhl.js @@ -0,0 +1 @@ +args.wounds += 4; \ No newline at end of file diff --git a/reference_scripts/DBafsY1HrclJRTtA.js b/reference_scripts/DBafsY1HrclJRTtA.js new file mode 100644 index 0000000..b3311bb --- /dev/null +++ b/reference_scripts/DBafsY1HrclJRTtA.js @@ -0,0 +1 @@ +return args.type != "cast" \ No newline at end of file diff --git a/reference_scripts/DHxUKY9LMyifFgCi.js b/reference_scripts/DHxUKY9LMyifFgCi.js new file mode 100644 index 0000000..a9beef0 --- /dev/null +++ b/reference_scripts/DHxUKY9LMyifFgCi.js @@ -0,0 +1 @@ +return args.skill?.name == "Trade (Apothecary)" || args.skill?.name == "Trade (Alchemist)" \ No newline at end of file diff --git a/reference_scripts/DL9vYNft9aXdV2aW.js b/reference_scripts/DL9vYNft9aXdV2aW.js new file mode 100644 index 0000000..ef975b7 --- /dev/null +++ b/reference_scripts/DL9vYNft9aXdV2aW.js @@ -0,0 +1,12 @@ +let tooth = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") +tooth = tooth.toObject() +tooth.system.specification.value = 3 +tooth.system.qualities.value = [{name : "magical"}] + +let claw = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM") +claw = claw.toObject() +claw.system.specification.value = 4 +claw.system.qualities.value = [{name : "magical"}] +claw.name = "Claw" + +this.actor.createEmbeddedDocuments("Item", [tooth, claw], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/DMQ0taEpBUJU5njV.js b/reference_scripts/DMQ0taEpBUJU5njV.js new file mode 100644 index 0000000..8fb1dd8 --- /dev/null +++ b/reference_scripts/DMQ0taEpBUJU5njV.js @@ -0,0 +1 @@ +args.actor.status.fortune.value = 0 \ No newline at end of file diff --git a/reference_scripts/DTiHS6RfwhF4THbf.js b/reference_scripts/DTiHS6RfwhF4THbf.js new file mode 100644 index 0000000..1a7339b --- /dev/null +++ b/reference_scripts/DTiHS6RfwhF4THbf.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Drive") && !args.skill?.name.includes(game.i18n.localize("NAME.Ride")); \ No newline at end of file diff --git a/reference_scripts/DVlZGbiuMIHEQOnM.js b/reference_scripts/DVlZGbiuMIHEQOnM.js new file mode 100644 index 0000000..4395d41 --- /dev/null +++ b/reference_scripts/DVlZGbiuMIHEQOnM.js @@ -0,0 +1,10 @@ +if (this.actor.getFlag("wfrp4e", "isAttached")) +{ + let roll = await new Roll("1d10").roll() + await roll.toMessage(this.script.getChatData()); + if (roll.total == 9 || roll.total == 10) + { + this.script.scriptMessage(`${this.actor.name} attached to ${this.actor.getFlag("wfrp4e", "isAttached")} gorges and falls off.`) + await this.actor.unsetFlag("wfrp4e", "isAttached") + } + } \ No newline at end of file diff --git a/reference_scripts/DWBxvzfWGcG7PVNP.js b/reference_scripts/DWBxvzfWGcG7PVNP.js new file mode 100644 index 0000000..789e83f --- /dev/null +++ b/reference_scripts/DWBxvzfWGcG7PVNP.js @@ -0,0 +1,5 @@ +let letter = this.item.system.location.key[0]; // "l" or "r"; + +this.item.updateSource({"system.location.key" : letter + "Finger"}) + +// We want the location to be Right or Left Hand, but the key to be rFinger or lFinger \ No newline at end of file diff --git a/reference_scripts/DcSJNRBXE9ZBBY7T.js b/reference_scripts/DcSJNRBXE9ZBBY7T.js new file mode 100644 index 0000000..22c294b --- /dev/null +++ b/reference_scripts/DcSJNRBXE9ZBBY7T.js @@ -0,0 +1 @@ +this.actor.addCondition("blinded", Math.max(0, this.effect.sourceTest.result.SL)) \ No newline at end of file diff --git a/reference_scripts/DhZqJso1JWYtGrKk.js b/reference_scripts/DhZqJso1JWYtGrKk.js new file mode 100644 index 0000000..5808036 --- /dev/null +++ b/reference_scripts/DhZqJso1JWYtGrKk.js @@ -0,0 +1,3 @@ +this.actor.addCondition("ablaze") +let damage = this.effect.sourceTest.result.damage + this.effect.sourceTest.result.additionalDamage +this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})) \ No newline at end of file diff --git a/reference_scripts/DmbWR9s5I8LHBwxB.js b/reference_scripts/DmbWR9s5I8LHBwxB.js new file mode 100644 index 0000000..0875467 --- /dev/null +++ b/reference_scripts/DmbWR9s5I8LHBwxB.js @@ -0,0 +1,14 @@ +let column = await ValueDialog.create("Select the column to roll on to determine Beast Head", "Select Column", "", ["Undivided", "Khorne", "Nurgle", "Slaanesh", "Tzeentch"]); + +if (column) +{ + let result = await game.wfrp4e.tables.rollTable("beasthead", {}, column); + this.script.scriptMessage(`${result.title}
${result.result}`); + let uuid = `Compendium.${result.object.documentCollection}.${result.object.documentId}`; + let item = await fromUuid(uuid); + if (item) + { + this.actor.createEmbeddedDocuments("Item", [item]) + this.item.delete(); + } +} \ No newline at end of file diff --git a/reference_scripts/DpdSEHM6NMN1ey6h.js b/reference_scripts/DpdSEHM6NMN1ey6h.js new file mode 100644 index 0000000..aa9268a --- /dev/null +++ b/reference_scripts/DpdSEHM6NMN1ey6h.js @@ -0,0 +1,4 @@ +if (parseInt(this.item.system.specification.value) > 0) +{ + this.actor.system.status.ward.value = parseInt(this.item.system.specification.value); +} \ No newline at end of file diff --git a/reference_scripts/DqJFo74trI916qXN.js b/reference_scripts/DqJFo74trI916qXN.js new file mode 100644 index 0000000..a2791f0 --- /dev/null +++ b/reference_scripts/DqJFo74trI916qXN.js @@ -0,0 +1,3 @@ +let fatigued = args.actor.hasCondition("fatigued") +if (fatigued) + setProperty(fatigued, "flags.wfrp4e.scriptData", getProperty(fatigued, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog")) \ No newline at end of file diff --git a/reference_scripts/DsE6rTSzxEn6uWMz.js b/reference_scripts/DsE6rTSzxEn6uWMz.js new file mode 100644 index 0000000..63b87e9 --- /dev/null +++ b/reference_scripts/DsE6rTSzxEn6uWMz.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}}) +await test.roll(); +if (test.failed) +{ + await this.actor.addCondition("blinded"); + await this.actor.addCondition("fatigued") +} \ No newline at end of file diff --git a/reference_scripts/DuM5l2Yb4bdvDeaG.js b/reference_scripts/DuM5l2Yb4bdvDeaG.js new file mode 100644 index 0000000..ddbd4db --- /dev/null +++ b/reference_scripts/DuM5l2Yb4bdvDeaG.js @@ -0,0 +1 @@ +return args.skill?.name != "Athletics" \ No newline at end of file diff --git a/reference_scripts/DxQnamsb2AuW0p2e.js b/reference_scripts/DxQnamsb2AuW0p2e.js new file mode 100644 index 0000000..fbdcd2f --- /dev/null +++ b/reference_scripts/DxQnamsb2AuW0p2e.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Lore")); \ No newline at end of file diff --git a/reference_scripts/DyZ1jH88EAp1ueOK.js b/reference_scripts/DyZ1jH88EAp1ueOK.js new file mode 100644 index 0000000..3b86fbc --- /dev/null +++ b/reference_scripts/DyZ1jH88EAp1ueOK.js @@ -0,0 +1,5 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +data.system.location.value = data.system.location.value.replace("Arm", "Wrist") +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) diff --git a/reference_scripts/E1Xo4RVuN1YRRxg7.js b/reference_scripts/E1Xo4RVuN1YRRxg7.js new file mode 100644 index 0000000..d6efa41 --- /dev/null +++ b/reference_scripts/E1Xo4RVuN1YRRxg7.js @@ -0,0 +1 @@ +return args.item?.attackType != "ranged" \ No newline at end of file diff --git a/reference_scripts/E1vUepgop09FF5wy.js b/reference_scripts/E1vUepgop09FF5wy.js new file mode 100644 index 0000000..3da19b7 --- /dev/null +++ b/reference_scripts/E1vUepgop09FF5wy.js @@ -0,0 +1,22 @@ +if (this.actor.system.status.advantage.value == 0) +{ + return this.script.scriptNotification("Not enough Advantage!", "error") +} + +let hatred = await fromUuid("Compendium.wfrp4e-core.items.Item.aE3pyW20Orvdjzj0") +let frenzy = await fromUuid("Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q"); + +if (this.actor.system.status.advantage.value >= 3) +{ + this.script.scriptNotification(`Adding ${frenzy.name}`) + this.actor.setAdvantage(0) + this.actor.createEmbeddedDocuments("Item", [frenzy]) +} +else if (this.actor.system.status.advantage.value >= 1) +{ + let data = hatred.toObject(); + data.system.specification.value = "Close Combat opponents" + this.script.scriptNotification(`Adding ${hatred.name}`) + this.actor.setAdvantage(0) + this.actor.createEmbeddedDocuments("Item", [data]) +} \ No newline at end of file diff --git a/reference_scripts/E2VfOVuju67qO3VL.js b/reference_scripts/E2VfOVuju67qO3VL.js new file mode 100644 index 0000000..200ae8f --- /dev/null +++ b/reference_scripts/E2VfOVuju67qO3VL.js @@ -0,0 +1,5 @@ +let blinded = this.actor.hasCondition("blinded"); +if (blinded.getFlag("wfrp4e", "nightshroud")) +{ + blinded.delete() +} \ No newline at end of file diff --git a/reference_scripts/E4CHDe1xfmcV3oGv.js b/reference_scripts/E4CHDe1xfmcV3oGv.js new file mode 100644 index 0000000..c1e0400 --- /dev/null +++ b/reference_scripts/E4CHDe1xfmcV3oGv.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Navigation"); \ No newline at end of file diff --git a/reference_scripts/E6DMqfDeczqmVMFV.js b/reference_scripts/E6DMqfDeczqmVMFV.js new file mode 100644 index 0000000..2a0bc28 --- /dev/null +++ b/reference_scripts/E6DMqfDeczqmVMFV.js @@ -0,0 +1,3 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}}) + +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/E7D4bxz8gy4e1wL7.js b/reference_scripts/E7D4bxz8gy4e1wL7.js new file mode 100644 index 0000000..ec82dce --- /dev/null +++ b/reference_scripts/E7D4bxz8gy4e1wL7.js @@ -0,0 +1 @@ +if (["Stealth (Rural)", "Track", "Outdoor Survival", "Swim", "Perception", "Intuition"].includes(args.item?.name)) \ No newline at end of file diff --git a/reference_scripts/EGWF3LHav3e2zFL4.js b/reference_scripts/EGWF3LHav3e2zFL4.js new file mode 100644 index 0000000..cb217a7 --- /dev/null +++ b/reference_scripts/EGWF3LHav3e2zFL4.js @@ -0,0 +1 @@ +return args.skill?.name.includes(game.i18n.localize("NAME.Ranged")) || args.item?.isRanged || args.item?.name == game.i18n.localize("NAME.Charm"); \ No newline at end of file diff --git a/reference_scripts/EJObiSth3WdcJOXN.js b/reference_scripts/EJObiSth3WdcJOXN.js new file mode 100644 index 0000000..a98ecba --- /dev/null +++ b/reference_scripts/EJObiSth3WdcJOXN.js @@ -0,0 +1,5 @@ +if (args.test.characteristicKey == "wp" && args.test.failed && args.test.result.SL <= -3) +{ + this.script.scriptNotification("Adding Prone"); + this.actor.addCondition("prone") +} \ No newline at end of file diff --git a/reference_scripts/EJaBfqADqlo92Fx6.js b/reference_scripts/EJaBfqADqlo92Fx6.js new file mode 100644 index 0000000..9fd2959 --- /dev/null +++ b/reference_scripts/EJaBfqADqlo92Fx6.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.oGbDwnLOn3isPJpO") +let data = item.toObject(); +data.name += " (To Be Determined)" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/EKkdyp51Wf4csw2B.js b/reference_scripts/EKkdyp51Wf4csw2B.js new file mode 100644 index 0000000..e3d745d --- /dev/null +++ b/reference_scripts/EKkdyp51Wf4csw2B.js @@ -0,0 +1 @@ +return this.actor.statuses.has("frenzy"); \ No newline at end of file diff --git a/reference_scripts/ENGmwaItRXO5s0XY.js b/reference_scripts/ENGmwaItRXO5s0XY.js new file mode 100644 index 0000000..0a79fa7 --- /dev/null +++ b/reference_scripts/ENGmwaItRXO5s0XY.js @@ -0,0 +1,5 @@ +await this.actor.modifyWounds(this.actor.system.characteristics.t.bonus * 3) +this.script.scriptMessage(`Heals ${this.actor.system.characteristics.t.bonus * 3} Wounds`) + +this.actor.hasCondition("bleeding")?.delete() +this.actor.hasCondition("fatigued")?.delete() diff --git a/reference_scripts/EQ5dtGW5kQhtAb87.js b/reference_scripts/EQ5dtGW5kQhtAb87.js new file mode 100644 index 0000000..767e730 --- /dev/null +++ b/reference_scripts/EQ5dtGW5kQhtAb87.js @@ -0,0 +1,7 @@ +await this.actor.addCondition("prone") +let 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) +{ + await this.actor.addCondition("stunned") +} \ No newline at end of file diff --git a/reference_scripts/ERxrWzSpw8qwxFVi.js b/reference_scripts/ERxrWzSpw8qwxFVi.js new file mode 100644 index 0000000..e0eaff5 --- /dev/null +++ b/reference_scripts/ERxrWzSpw8qwxFVi.js @@ -0,0 +1 @@ +this.script.scriptNotification(`Cannot enter ${this.effect.name}!`); this.actor.addCondition("broken"); \ No newline at end of file diff --git a/reference_scripts/EU5j0hnDTG9Z6d1e.js b/reference_scripts/EU5j0hnDTG9Z6d1e.js new file mode 100644 index 0000000..82d6a1d --- /dev/null +++ b/reference_scripts/EU5j0hnDTG9Z6d1e.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}) +await test.roll(); +if(test.failed) +{ + this.actor.addCondition("stunned", 2) +} \ No newline at end of file diff --git a/reference_scripts/EVBSHEC5nmmj2X41.js b/reference_scripts/EVBSHEC5nmmj2X41.js new file mode 100644 index 0000000..c08a5ea --- /dev/null +++ b/reference_scripts/EVBSHEC5nmmj2X41.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Climb") && !args.skill?.name?.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/EYny6z5oTOhxGDfb.js b/reference_scripts/EYny6z5oTOhxGDfb.js new file mode 100644 index 0000000..087904f --- /dev/null +++ b/reference_scripts/EYny6z5oTOhxGDfb.js @@ -0,0 +1 @@ +args.fields.modifier -= 10; diff --git a/reference_scripts/EaSNOmXUxAkUHnm5.js b/reference_scripts/EaSNOmXUxAkUHnm5.js new file mode 100644 index 0000000..89a428d --- /dev/null +++ b/reference_scripts/EaSNOmXUxAkUHnm5.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Eay7GpDyfsEE40jT.js b/reference_scripts/Eay7GpDyfsEE40jT.js new file mode 100644 index 0000000..14f4feb --- /dev/null +++ b/reference_scripts/Eay7GpDyfsEE40jT.js @@ -0,0 +1,4 @@ +if (args.totalWoundLoss > 0) +{ + args.actor.addCondition("ablaze") +} \ No newline at end of file diff --git a/reference_scripts/EdTChmSouS0MSmk5.js b/reference_scripts/EdTChmSouS0MSmk5.js new file mode 100644 index 0000000..b5c9aed --- /dev/null +++ b/reference_scripts/EdTChmSouS0MSmk5.js @@ -0,0 +1,10 @@ +let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.succeeded) +{ + this.script.scriptMessage("Can perform an Action or Move (choose one)") +} +else +{ + this.script.scriptMessage("Cannot perform an Action or Move this round") +} \ No newline at end of file diff --git a/reference_scripts/EiLaZW4b4ypw5sLV.js b/reference_scripts/EiLaZW4b4ypw5sLV.js new file mode 100644 index 0000000..7761e61 --- /dev/null +++ b/reference_scripts/EiLaZW4b4ypw5sLV.js @@ -0,0 +1,2 @@ +// can't use Damage application type because that checks if wounds were dealt +args.actor.applyEffect({effectUuids : this.item.effects.contents[0].uuid}) \ No newline at end of file diff --git a/reference_scripts/EmXwcuycEH8slEn5.js b/reference_scripts/EmXwcuycEH8slEn5.js new file mode 100644 index 0000000..4bd0b62 --- /dev/null +++ b/reference_scripts/EmXwcuycEH8slEn5.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}) +await test.roll(); +if(test.failed) +{ + this.actor.addCondition("unconscious") +} \ No newline at end of file diff --git a/reference_scripts/EmmG49pMOPHRwDzR.js b/reference_scripts/EmmG49pMOPHRwDzR.js new file mode 100644 index 0000000..8c92354 --- /dev/null +++ b/reference_scripts/EmmG49pMOPHRwDzR.js @@ -0,0 +1,8 @@ + let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10) + if (args.test.isFumble && roll == 1 && !args.test.result.misfire) + { + args.test.result.misfire = game.i18n.localize("Misfire") + " (Rolled 1)" + args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage) + } + else if (args.test.isFumble && roll != 1) + args.test.result.other.push("Misfire Roll: " + roll) diff --git a/reference_scripts/EpdMj9d9SYPeP44q.js b/reference_scripts/EpdMj9d9SYPeP44q.js new file mode 100644 index 0000000..ebf9773 --- /dev/null +++ b/reference_scripts/EpdMj9d9SYPeP44q.js @@ -0,0 +1 @@ +return args.characteristic != "ag" && args.item?.id != this.item?.id \ No newline at end of file diff --git a/reference_scripts/ErgOwSiVnm9VLVHN.js b/reference_scripts/ErgOwSiVnm9VLVHN.js new file mode 100644 index 0000000..f81a403 --- /dev/null +++ b/reference_scripts/ErgOwSiVnm9VLVHN.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.DrNUTPeodEgpWTnT") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Et4tPHlrkueLqP3T.js b/reference_scripts/Et4tPHlrkueLqP3T.js new file mode 100644 index 0000000..46d8efd --- /dev/null +++ b/reference_scripts/Et4tPHlrkueLqP3T.js @@ -0,0 +1 @@ +if (args.item.type == "skill") args.item.system.modifier.value -= 10 \ No newline at end of file diff --git a/reference_scripts/Ew3C2WmLCtc1KT46.js b/reference_scripts/Ew3C2WmLCtc1KT46.js new file mode 100644 index 0000000..9e8991b --- /dev/null +++ b/reference_scripts/Ew3C2WmLCtc1KT46.js @@ -0,0 +1 @@ +return args.skill?.name.includes(game.i18n.localize("NAME.Stealth")) || args.item?.id == this.item?.id \ No newline at end of file diff --git a/reference_scripts/EwD053Fyy46b59ZI.js b/reference_scripts/EwD053Fyy46b59ZI.js new file mode 100644 index 0000000..4512a9a --- /dev/null +++ b/reference_scripts/EwD053Fyy46b59ZI.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.6l3jvIAvrKxt0lA9"); +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Eye6dranWpNsILjm.js b/reference_scripts/Eye6dranWpNsILjm.js new file mode 100644 index 0000000..917fad5 --- /dev/null +++ b/reference_scripts/Eye6dranWpNsILjm.js @@ -0,0 +1,4 @@ +if (this.actor.system.status.wounds.value <= 1) +{ + this.effect.delete(); +} \ No newline at end of file diff --git a/reference_scripts/F4aGsdzJ9SYcX57F.js b/reference_scripts/F4aGsdzJ9SYcX57F.js new file mode 100644 index 0000000..57eb47b --- /dev/null +++ b/reference_scripts/F4aGsdzJ9SYcX57F.js @@ -0,0 +1,10 @@ +if (args.equipped) +{ + let item = await fromUuid("Compendium.wfrp4e-core.items.HpFkVJ2lYPAWumUL") + let data = item.toObject(); + this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) +} +else +{ + this.effect.deleteCreatedItems(); +} \ No newline at end of file diff --git a/reference_scripts/FAB12eLcSCAOOQwk.js b/reference_scripts/FAB12eLcSCAOOQwk.js new file mode 100644 index 0000000..4e92511 --- /dev/null +++ b/reference_scripts/FAB12eLcSCAOOQwk.js @@ -0,0 +1 @@ +this.script.scirptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}); \ No newline at end of file diff --git a/reference_scripts/FAf4iXj5LkdvukS2.js b/reference_scripts/FAf4iXj5LkdvukS2.js new file mode 100644 index 0000000..a39a05c --- /dev/null +++ b/reference_scripts/FAf4iXj5LkdvukS2.js @@ -0,0 +1 @@ +fromUuid("Compendium.wfrp4e-wom.items.0Xdm4r7l2EwC4fcg").then(item => Item.create(item.toObject(), {fromEffect : this.effect.id, parent : this.actor})) \ No newline at end of file diff --git a/reference_scripts/FMA16PvoObBV8vDl.js b/reference_scripts/FMA16PvoObBV8vDl.js new file mode 100644 index 0000000..873a4f2 --- /dev/null +++ b/reference_scripts/FMA16PvoObBV8vDl.js @@ -0,0 +1,5 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.EO05HX7jql0g605A") +item = item.toObject() +item.system.specification.value = 20 +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) +this.script.scriptNotification(item.name + " added") \ No newline at end of file diff --git a/reference_scripts/FMSN5uRskkATexzB.js b/reference_scripts/FMSN5uRskkATexzB.js new file mode 100644 index 0000000..913a79d --- /dev/null +++ b/reference_scripts/FMSN5uRskkATexzB.js @@ -0,0 +1 @@ +game.wfrp4e.tables.rollToChat("crithead") \ No newline at end of file diff --git a/reference_scripts/FSqUqSByMiztYOQM.js b/reference_scripts/FSqUqSByMiztYOQM.js new file mode 100644 index 0000000..5bf62e7 --- /dev/null +++ b/reference_scripts/FSqUqSByMiztYOQM.js @@ -0,0 +1,2 @@ +if (args.totalWoundLoss > 0) + this.script.scriptMessage(`Infected: ${args.actor.name} must pass an Easy (+40) Endurance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM") }) \ No newline at end of file diff --git a/reference_scripts/FUgCtIoj1Stgqxt7.js b/reference_scripts/FUgCtIoj1Stgqxt7.js new file mode 100644 index 0000000..acd0a25 --- /dev/null +++ b/reference_scripts/FUgCtIoj1Stgqxt7.js @@ -0,0 +1 @@ +return !["ws", "bs", "s", "ag", "t", "dex"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/FXuyiJoXdAh6WhRK.js b/reference_scripts/FXuyiJoXdAh6WhRK.js new file mode 100644 index 0000000..6e7b684 --- /dev/null +++ b/reference_scripts/FXuyiJoXdAh6WhRK.js @@ -0,0 +1 @@ +return args.skill?.name == "Ride (Horse)" && game.combat?.active \ No newline at end of file diff --git a/reference_scripts/FXwfqF0jpXlBQ9Y3.js b/reference_scripts/FXwfqF0jpXlBQ9Y3.js new file mode 100644 index 0000000..31fa389 --- /dev/null +++ b/reference_scripts/FXwfqF0jpXlBQ9Y3.js @@ -0,0 +1 @@ +return args.item?.system?.isMelee && this.actor.attacker \ No newline at end of file diff --git a/reference_scripts/FYUPfYyTYZkxRLFT.js b/reference_scripts/FYUPfYyTYZkxRLFT.js new file mode 100644 index 0000000..35e86d3 --- /dev/null +++ b/reference_scripts/FYUPfYyTYZkxRLFT.js @@ -0,0 +1 @@ +return !["NAME.Endurance", "NAME.Cool"].map(i => game.i18n.localize(i)).includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/FZFOC7bip0oiWEzk.js b/reference_scripts/FZFOC7bip0oiWEzk.js new file mode 100644 index 0000000..11e7cfd --- /dev/null +++ b/reference_scripts/FZFOC7bip0oiWEzk.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) +{ + args.actor.addCondition("bleeding", 2); + this.script.scriptNotification("Added Bleeding") +} \ No newline at end of file diff --git a/reference_scripts/FciJSTq7dZsZIPgl.js b/reference_scripts/FciJSTq7dZsZIPgl.js new file mode 100644 index 0000000..0da31e8 --- /dev/null +++ b/reference_scripts/FciJSTq7dZsZIPgl.js @@ -0,0 +1,10 @@ +if (args.equipped) +{ + let item = await fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR") + let data = item.toObject(); + this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) +} +else +{ + this.effect.deleteCreatedItems(); +} \ No newline at end of file diff --git a/reference_scripts/FfTqCPxCoxwGDTQs.js b/reference_scripts/FfTqCPxCoxwGDTQs.js new file mode 100644 index 0000000..bc75552 --- /dev/null +++ b/reference_scripts/FfTqCPxCoxwGDTQs.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr") +let data = item.toObject() +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) diff --git a/reference_scripts/FiD3mvWIBHNNIuO9.js b/reference_scripts/FiD3mvWIBHNNIuO9.js new file mode 100644 index 0000000..f9fadbe --- /dev/null +++ b/reference_scripts/FiD3mvWIBHNNIuO9.js @@ -0,0 +1,8 @@ +if (args.opposedTest.result.hitloc.value == "body") +{ + if ((await new Roll("1d2").roll()).total == 1) + { + args.opposedTest.result.hitloc.value = "head" + this.script.scriptMessage(`Hit location changed to Head`) + } +} \ No newline at end of file diff --git a/reference_scripts/FkTwk8hfHpRLbAp2.js b/reference_scripts/FkTwk8hfHpRLbAp2.js new file mode 100644 index 0000000..cd051cb --- /dev/null +++ b/reference_scripts/FkTwk8hfHpRLbAp2.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {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/reference_scripts/FmLx9pwOkzqqU7Ph.js b/reference_scripts/FmLx9pwOkzqqU7Ph.js new file mode 100644 index 0000000..c54d1df --- /dev/null +++ b/reference_scripts/FmLx9pwOkzqqU7Ph.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Track"); \ No newline at end of file diff --git a/reference_scripts/FqevMs0ukQ9WuUHl.js b/reference_scripts/FqevMs0ukQ9WuUHl.js new file mode 100644 index 0000000..d352c76 --- /dev/null +++ b/reference_scripts/FqevMs0ukQ9WuUHl.js @@ -0,0 +1,9 @@ +// Each time the blade is used, the GM should secretly roll a d10. +// On a 1, its poison has run dry, +// and the next time it is employed it will shatter. + +if (this.item.getFlag("wfrp4e", "brittle")) +{ + ChatMessage.create({content: `${this.item.name} shatters!`}) + this.item.update({name : `${this.item.name} (Shattered)`}) +} \ No newline at end of file diff --git a/reference_scripts/Fvlc4RkeF4dHjW3m.js b/reference_scripts/Fvlc4RkeF4dHjW3m.js new file mode 100644 index 0000000..1fc9418 --- /dev/null +++ b/reference_scripts/Fvlc4RkeF4dHjW3m.js @@ -0,0 +1,16 @@ +let caster = this.effect.sourceActor +if (caster && (this.actor.has(game.i18n.localize("NAME.Undead")) || this.actor.has(game.i18n.localize("NAME.Daemonic")))) { + let wp = caster.system.characteristics.wp.value + if (wp > this.actor.system.characteristics.t.value) { + if (this.actor.has(game.i18n.localize("NAME.Unstable"))) { + this.actor.update({ "system.status.wounds.value": 0 }) + this.actor.addCondition("dead") + } + else { + fromUuid("Compendium.wfrp4e-core.items.D0ImWEIMSDgElsnl").then(item => { + this.actor.createEmbeddedDocuments("Item", [item.toObject()], { fromEffect: this.effect.id }) + ChatMessage.create({ content: `Added Unstable to ${this.actor.prototypeToken.name}`, speaker: { alias: caster.name } }) + }) + } + } +} \ No newline at end of file diff --git a/reference_scripts/G1RletYc6BzigJrK.js b/reference_scripts/G1RletYc6BzigJrK.js new file mode 100644 index 0000000..24f4082 --- /dev/null +++ b/reference_scripts/G1RletYc6BzigJrK.js @@ -0,0 +1,2 @@ +let ablaze = parseInt(this.effect.sourceTest.result.SL) + 5 +args.actor.addCondition("ablaze", ablaze) \ No newline at end of file diff --git a/reference_scripts/G7sFEnJlXZvfXL3V.js b/reference_scripts/G7sFEnJlXZvfXL3V.js new file mode 100644 index 0000000..758b802 --- /dev/null +++ b/reference_scripts/G7sFEnJlXZvfXL3V.js @@ -0,0 +1,12 @@ +if (this.item.system.quantity.value) +{ + this.item.system.reduceQuantity(); + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + let effectData = this.item.effects.contents[1].convertToApplied(); + effectData.flags.wfrp4e.sourceItem = this.item.uuid + actor.applyEffect({effectData : [effectData]}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/GAO8AozttWOyRkta.js b/reference_scripts/GAO8AozttWOyRkta.js new file mode 100644 index 0000000..796ff24 --- /dev/null +++ b/reference_scripts/GAO8AozttWOyRkta.js @@ -0,0 +1,5 @@ +if (!args.flags.lostHand) +{ + args.fields.lostHand = true; + args.fields.modifier += -20; +} \ No newline at end of file diff --git a/reference_scripts/GEfWIFBSrXt0ldBM.js b/reference_scripts/GEfWIFBSrXt0ldBM.js new file mode 100644 index 0000000..b4de7ed --- /dev/null +++ b/reference_scripts/GEfWIFBSrXt0ldBM.js @@ -0,0 +1,2 @@ +(await new Roll("1d10").roll()).toMessage(this.script.getChatData()) +await this.actor.addCondition("dead") \ No newline at end of file diff --git a/reference_scripts/GFaTz8f6PBNWrlad.js b/reference_scripts/GFaTz8f6PBNWrlad.js new file mode 100644 index 0000000..509844b --- /dev/null +++ b/reference_scripts/GFaTz8f6PBNWrlad.js @@ -0,0 +1,3 @@ +let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure : `Confused: Determine behaviour by @Table[bewilder] Table.`}}) +await test.roll(); +return test.failed \ No newline at end of file diff --git a/reference_scripts/GFkVnx4m9OwYsKGH.js b/reference_scripts/GFkVnx4m9OwYsKGH.js new file mode 100644 index 0000000..864fe17 --- /dev/null +++ b/reference_scripts/GFkVnx4m9OwYsKGH.js @@ -0,0 +1 @@ +args.actor.flags.ambi+= 1 \ No newline at end of file diff --git a/reference_scripts/GNl5Zk7BZ2jhRV1I.js b/reference_scripts/GNl5Zk7BZ2jhRV1I.js new file mode 100644 index 0000000..fca7f72 --- /dev/null +++ b/reference_scripts/GNl5Zk7BZ2jhRV1I.js @@ -0,0 +1,4 @@ +if (args.item.type == "armour") +{ + args.item.system.AP.head = 0; +} \ No newline at end of file diff --git a/reference_scripts/GOq4TcnWbfyfCo2V.js b/reference_scripts/GOq4TcnWbfyfCo2V.js new file mode 100644 index 0000000..3a51404 --- /dev/null +++ b/reference_scripts/GOq4TcnWbfyfCo2V.js @@ -0,0 +1,26 @@ +this.script.scriptNotification(`Healed ${this.actor.characteristics.t.bonus * 2} Wounds`) +await this.actor.modifyWounds(this.actor.characteristics.t.bonus * 2) + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - Side Effects`,fields : {difficulty : "difficult"}}) +await test.roll(); +if (test.failed) +{ + let roll = await new Roll("1d10").roll(); + await roll.toMessage(this.script.getChatData()) + if (roll.total <= 3) + { + this.actor.addCondition("blinded", 3) + } + else if (roll.total <= 6) + { + this.actor.addCondition("broken"); + } + else if (roll.total <= 9) + { + this.actor.addCondition("stunned"); + } + else if (roll.total == 10) + { + this.actor.addConditon("unconscious") + } +} \ No newline at end of file diff --git a/reference_scripts/GRfCxtYzmEx2LYU7.js b/reference_scripts/GRfCxtYzmEx2LYU7.js new file mode 100644 index 0000000..dcc7340 --- /dev/null +++ b/reference_scripts/GRfCxtYzmEx2LYU7.js @@ -0,0 +1,9 @@ +if (args.totalWoundLoss >= 1) +{ + let roll = await new Roll("1d10").roll(); + await roll.toMessage(this.script.getChatData()); + if (roll.total == 9) + { + this.script.scriptMessage(`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")}) + } +} \ No newline at end of file diff --git a/reference_scripts/GTZUO73pUJKpM1JB.js b/reference_scripts/GTZUO73pUJKpM1JB.js new file mode 100644 index 0000000..3d99c30 --- /dev/null +++ b/reference_scripts/GTZUO73pUJKpM1JB.js @@ -0,0 +1,3 @@ + let roll = await new Roll("1d10").roll(); + game.dice3d?.showForRoll(roll); + this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})) diff --git a/reference_scripts/GUkpYdPwoC5pc9BT.js b/reference_scripts/GUkpYdPwoC5pc9BT.js new file mode 100644 index 0000000..160e012 --- /dev/null +++ b/reference_scripts/GUkpYdPwoC5pc9BT.js @@ -0,0 +1 @@ +return !args.weapon?.system.properties.flaws.crewed \ No newline at end of file diff --git a/reference_scripts/GZFsuynUhgZqwTGo.js b/reference_scripts/GZFsuynUhgZqwTGo.js new file mode 100644 index 0000000..bf5a7a7 --- /dev/null +++ b/reference_scripts/GZFsuynUhgZqwTGo.js @@ -0,0 +1,10 @@ +if (args.totalWoundLoss >= 1) +{ + 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" }}) + await test.roll(); + if (test.failed) + { + args.actor.addCondition("poisoned"); + } +} + \ No newline at end of file diff --git a/reference_scripts/GbPEy22VuCNzlNv2.js b/reference_scripts/GbPEy22VuCNzlNv2.js new file mode 100644 index 0000000..be6b4de --- /dev/null +++ b/reference_scripts/GbPEy22VuCNzlNv2.js @@ -0,0 +1 @@ +return !this.actor.isMounted || (!args.skill?.name?.includes(game.i18n.localize("NAME.Ride")) && !args.options.dodge) \ No newline at end of file diff --git a/reference_scripts/Gc8S5TYlVdV8NnOT.js b/reference_scripts/Gc8S5TYlVdV8NnOT.js new file mode 100644 index 0000000..154ee3e --- /dev/null +++ b/reference_scripts/Gc8S5TYlVdV8NnOT.js @@ -0,0 +1,8 @@ +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" } }) + + await test.roll(); + + if (!test.succeeded) + { + args.actor.addCondition("broken"); + } \ No newline at end of file diff --git a/reference_scripts/GcIQtshex11AMmh2.js b/reference_scripts/GcIQtshex11AMmh2.js new file mode 100644 index 0000000..793a7a8 --- /dev/null +++ b/reference_scripts/GcIQtshex11AMmh2.js @@ -0,0 +1,25 @@ +if (this.item.system.isEquipped) +{ + let removeRepeater = false + if(!this.item.system.offhand.value) // main + { + let offhandUsed = this.actor.itemTypes.weapon.find(i => i.system.isEquipped && i.system.offhand.value) + if (offhandUsed) + { + removeRepeater = true; + } + } + else // offhand + { + let mainhandUsed = this.actor.itemTypes.weapon.find(i => i.system.isEquipped && !i.system.offhand.value) + if (mainhandUsed) + { + removeRepeater = true; + } + } + + if (removeRepeater) + { + this.item.system.qualities.value = this.item.system.qualities.value.filter(i => i.name != "repeater") + } +} \ No newline at end of file diff --git a/reference_scripts/Gh7OidY6UdpWBS1g.js b/reference_scripts/Gh7OidY6UdpWBS1g.js new file mode 100644 index 0000000..85ee2d0 --- /dev/null +++ b/reference_scripts/Gh7OidY6UdpWBS1g.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.KII1gWnxIZ8HzmU5") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/GjkxWj9wCAclM9WA.js b/reference_scripts/GjkxWj9wCAclM9WA.js new file mode 100644 index 0000000..6fefe6d --- /dev/null +++ b/reference_scripts/GjkxWj9wCAclM9WA.js @@ -0,0 +1,17 @@ +let effects = foundry.utils.deepClone(this.item.effects.contents.filter(e => e.active)); + +effects.splice(effects.length - 1); + +if (effects.length == 0) +{ + return this.script.scriptNotification("All Effects have been used. Reset to select them again") +} +let choice = await ItemDialog.create(effects, 1, "Choose Power to Gain"); + +if (choice[0]) +{ + choice[0].update({disabled : true}) + let effect = choice[0].convertToApplied(); + effect.name += ` (${this.effect.name})` + this.actor.createEmbeddedDocuments("ActiveEffect", [effect]); +} \ No newline at end of file diff --git a/reference_scripts/GrF6tQ08jgKmUH4i.js b/reference_scripts/GrF6tQ08jgKmUH4i.js new file mode 100644 index 0000000..356b70b --- /dev/null +++ b/reference_scripts/GrF6tQ08jgKmUH4i.js @@ -0,0 +1 @@ +return !["ws", "bs", "s", "ag", "i"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/GuUCErVbk5hrFzR3.js b/reference_scripts/GuUCErVbk5hrFzR3.js new file mode 100644 index 0000000..85bf7f6 --- /dev/null +++ b/reference_scripts/GuUCErVbk5hrFzR3.js @@ -0,0 +1 @@ +args.multiplier.tb += 1 \ No newline at end of file diff --git a/reference_scripts/GuxbvztcvzJz2oH1.js b/reference_scripts/GuxbvztcvzJz2oH1.js new file mode 100644 index 0000000..fb1c17c --- /dev/null +++ b/reference_scripts/GuxbvztcvzJz2oH1.js @@ -0,0 +1 @@ +args.item.system.qualities.value = []; \ No newline at end of file diff --git a/reference_scripts/GzSFlqL1YrIK1dxh.js b/reference_scripts/GzSFlqL1YrIK1dxh.js new file mode 100644 index 0000000..1f5a252 --- /dev/null +++ b/reference_scripts/GzSFlqL1YrIK1dxh.js @@ -0,0 +1,16 @@ +let items = await Promise.all(["Compendium.wfrp4e-wom.items.Item.EjGYZ4CgX2jZW7Ot", +"Compendium.wfrp4e-wom.items.Item.O2v9RQiFf0obskP5", +"Compendium.wfrp4e-wom.items.Item.2cv6hhZ57iV6z5Il", +"Compendium.wfrp4e-wom.items.Item.YgDEUO0G0XcqQJqg", +"Compendium.wfrp4e-wom.items.Item.J6K5TPxI8qIGQKKH", +"Compendium.wfrp4e-wom.items.Item.K9FPtiDLwTkC7FuO", +"Compendium.wfrp4e-wom.items.Item.CkMYRYCLrkMnyVm5", +"Compendium.wfrp4e-wom.items.Item.0Xdm4r7l2EwC4fcg"].map(fromUuid)); + +let choice = await game.wfrp4e.apps.ItemDialog.create(items, 1, "Select Wind") +//this.actor.createEmbeddedDocuments("Item", items); + +this.item.update(choice[0]?.toObject(), {diff: false, recursive : false}); + +//this.actor.items.getName(this.effect.item.name).delete() // For some reason this.effect.item.delete() throws an error + diff --git a/reference_scripts/GzsuEg7gZy1f0ljy.js b/reference_scripts/GzsuEg7gZy1f0ljy.js new file mode 100644 index 0000000..3220372 --- /dev/null +++ b/reference_scripts/GzsuEg7gZy1f0ljy.js @@ -0,0 +1,10 @@ +let bleeding = this.actor.hasCondition("bleeding") +if (bleeding) +{ + this.script.scriptNotification(`Cleared ${bleeding.conditionValue} Bleeding Conditions`) + bleeding.delete(); +} +else +{ + this.script.scriptNotification(`No Bleeding Conditions`) +} \ No newline at end of file diff --git a/reference_scripts/H06Ysj7oPiemW7S6.js b/reference_scripts/H06Ysj7oPiemW7S6.js new file mode 100644 index 0000000..8c3872b --- /dev/null +++ b/reference_scripts/H06Ysj7oPiemW7S6.js @@ -0,0 +1,18 @@ +if (args.test.options.income && !args.test.options.criminal) +{ + args.test.options.criminal = true; + let currentCareer = args.test.actor.system.currentCareer; + 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) + 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) + 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) + dieAmount = parseInt(dieAmount[0]) * this.item.system.Advances; // Multilpy that first letter by your standing (Brass 4 = 8d10 pennies) + if (coin != "g") // Don't roll for gold, just use standing value + { + dieAmount = dieAmount + "d10"; + } + let moneyEarned = (await new Roll(dieAmount.toString()).roll()).total; + let moneyString = `${moneyEarned}${coin}` + let transactionString = `${moneyEarned}${term}` + + this.script.scriptMessage(`Earned an additional ${game.wfrp4e.market.amountToString(game.wfrp4e.market.parseMoneyTransactionString(transactionString))}`, {whisper : ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/reference_scripts/H1z3nWW7Rj3Oisxy.js b/reference_scripts/H1z3nWW7Rj3Oisxy.js new file mode 100644 index 0000000..a7b8f33 --- /dev/null +++ b/reference_scripts/H1z3nWW7Rj3Oisxy.js @@ -0,0 +1 @@ +return args.type != "channelling" \ No newline at end of file diff --git a/reference_scripts/H2CJvApKMnfGNNoo.js b/reference_scripts/H2CJvApKMnfGNNoo.js new file mode 100644 index 0000000..60892cb --- /dev/null +++ b/reference_scripts/H2CJvApKMnfGNNoo.js @@ -0,0 +1,7 @@ + if (args.test.item?.type == "skill" && args.test.item.name.includes(game.i18n.localize("NAME.Stealth"))) +{ + args.test.result.description = "Astounding Failure"; + args.test.result.outcome = "failure"; + ChatMessage.create({content : "SQUEAK", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) + AudioHelper.play({ src: `${game.settings.get("wfrp4e", "soundPath")}squeek.wav` }, true); +} \ No newline at end of file diff --git a/reference_scripts/H3Wls12aVWAWTp9J.js b/reference_scripts/H3Wls12aVWAWTp9J.js new file mode 100644 index 0000000..32f6ee1 --- /dev/null +++ b/reference_scripts/H3Wls12aVWAWTp9J.js @@ -0,0 +1,3 @@ +this.actor.setupCharacteristic("i", {skipTargets: true, appendTitle : " - " + this.effect.name}).then(test => { + test.roll(); +}) \ No newline at end of file diff --git a/reference_scripts/H3pZ9UeIzIz3luKh.js b/reference_scripts/H3pZ9UeIzIz3luKh.js new file mode 100644 index 0000000..c120317 --- /dev/null +++ b/reference_scripts/H3pZ9UeIzIz3luKh.js @@ -0,0 +1,5 @@ +args.actor.addCondition("bleeding") + +this.actor.setFlag("wfrp4e", "isAttached", args.actor.name) + +this.script.scriptMessage(`Attaches to ${args.actor.name}`) \ No newline at end of file diff --git a/reference_scripts/HASsi6wYHVALExWq.js b/reference_scripts/HASsi6wYHVALExWq.js new file mode 100644 index 0000000..93a5c23 --- /dev/null +++ b/reference_scripts/HASsi6wYHVALExWq.js @@ -0,0 +1,14 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "1 Corruption Point Gained" } }) +await test.roll(); + +if (test.failed && args.actor.type == "character") +{ + let msg = "" + msg += `

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

` + if (test.result.roll % 11 == 0 || test.result.roll == 100) + { + 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)}` + } + this.script.scriptMessage(msg, {whisper : ChatMessage.getWhisperRecipients("GM")}) + await this.actor.update({ "system.status.corruption.value": parseInt(args.actor.status.corruption.value) + 1 }) +} \ No newline at end of file diff --git a/reference_scripts/HJ2X4ZtXei0BXbxf.js b/reference_scripts/HJ2X4ZtXei0BXbxf.js new file mode 100644 index 0000000..9042978 --- /dev/null +++ b/reference_scripts/HJ2X4ZtXei0BXbxf.js @@ -0,0 +1,19 @@ + let choices = await Promise.all([game.wfrp4e.utility.findItemId("PzimjNx9Ojq4g6mV"), game.wfrp4e.utility.findItemId("rOPmyLWa37e7s9v6")]) + let items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, "Choose a Skill") + + items = items.map(i => i.toObject()) + items.forEach(i => i.system.advances.value = 20) + +items.forEach(i => equip(i)) + +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.data.worn.value = true + else if (item.type == "weapon") + item.data.equipped = true + else if (item.type == "trapping" && item.data.trappingType.value == "clothingAccessories") + item.data.worn = true +} \ No newline at end of file diff --git a/reference_scripts/HKhyn0kijKfzW6cw.js b/reference_scripts/HKhyn0kijKfzW6cw.js new file mode 100644 index 0000000..bb191fa --- /dev/null +++ b/reference_scripts/HKhyn0kijKfzW6cw.js @@ -0,0 +1,3 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}) +await test.roll(); +this.item.updateSource({"flags.wfrp4e.passed" : test.succeeded}) \ No newline at end of file diff --git a/reference_scripts/HMC6hPND9DWLFfZE.js b/reference_scripts/HMC6hPND9DWLFfZE.js new file mode 100644 index 0000000..b975613 --- /dev/null +++ b/reference_scripts/HMC6hPND9DWLFfZE.js @@ -0,0 +1,43 @@ +if (this.item.name.includes("(")) +{ + return; +} + +let index = game.packs +.filter(i => i.metadata.type == "Item") +.reduce((acc, pack) => acc.concat(pack.index.contents), []) +.filter(i => i.type == "skill" && i.name.includes(game.i18n.localize("NAME.Lore"))) +.map(i => { + i.id = i._id + return i +}) + +let choice = await ItemDialog.create(index, 1, "Choose a Lore") +let text; +if (!choice[0]) +{ + let custom = await Dialog.wait({ + title : "Enter Lore", + content : "", + buttons : { + confirm : { + label : game.i18n.localize("Confirm"), + callback : (dlg) => { + return dlg.find("input")[0].value + } + } + }, + default : "confirm", + close : () => { + return "" + } + }) + text = custom || "" +} +else +{ + text = game.wfrp4e.utility.extractParenthesesText(choice[0].name) +} + +await this.item.updateSource({name : this.item.name + ` (${text})`, "system.tests.value" : this.item.system.tests.value.replace("chosen Lore", text)}) +await this.effect.updateSource({name : this.effect.name + ` (${text})`}) \ No newline at end of file diff --git a/reference_scripts/HOt2hHOiHDZ7oBgW.js b/reference_scripts/HOt2hHOiHDZ7oBgW.js new file mode 100644 index 0000000..af34a62 --- /dev/null +++ b/reference_scripts/HOt2hHOiHDZ7oBgW.js @@ -0,0 +1,4 @@ +if (["rLeg", "lLeg"].includes(this.effect.getFlag("wfrp4e", "location"))) +{ + args.actor.details.move.value /= 2 +} diff --git a/reference_scripts/HX6CjNapYdC0VmQ8.js b/reference_scripts/HX6CjNapYdC0VmQ8.js new file mode 100644 index 0000000..36a39a6 --- /dev/null +++ b/reference_scripts/HX6CjNapYdC0VmQ8.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.epPBu7x6BRWp2PHG") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/HXJKkmpfxQUOnWOS.js b/reference_scripts/HXJKkmpfxQUOnWOS.js new file mode 100644 index 0000000..34affd7 --- /dev/null +++ b/reference_scripts/HXJKkmpfxQUOnWOS.js @@ -0,0 +1,4 @@ +if (!this.item.system.twohanded.value) +{ + this.item.system.flaws.value = this.item.system.flaws.value.concat([{name : "tiring"}, {name : "slow"}]) +} \ No newline at end of file diff --git a/reference_scripts/Hcpn1gU58DIKIhty.js b/reference_scripts/Hcpn1gU58DIKIhty.js new file mode 100644 index 0000000..6d5917a --- /dev/null +++ b/reference_scripts/Hcpn1gU58DIKIhty.js @@ -0,0 +1,4 @@ +if (args.item.type == "skill" && args.item.name == "Melee (Flail)") +{ + args.item.system.modifier.value += 10; +} \ No newline at end of file diff --git a/reference_scripts/HfCxNd7mFGZH4s9Y.js b/reference_scripts/HfCxNd7mFGZH4s9Y.js new file mode 100644 index 0000000..07fcf28 --- /dev/null +++ b/reference_scripts/HfCxNd7mFGZH4s9Y.js @@ -0,0 +1,13 @@ +// An opponent that takes more than a single Wound from a Warp Blade strike +// in melee combat must make an Average (+20) Endurance Test +// or take a Stunned Condition + + +if (args.totalWoundLoss > 1) { + let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) + await test.roll(); + if(test.failed) + { + await args.actor.addCondition("stunned"); + } +} \ No newline at end of file diff --git a/reference_scripts/HiMBS6GeOwEydWYN.js b/reference_scripts/HiMBS6GeOwEydWYN.js new file mode 100644 index 0000000..9ad95cd --- /dev/null +++ b/reference_scripts/HiMBS6GeOwEydWYN.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Climb"); \ No newline at end of file diff --git a/reference_scripts/HmImVzvw6ecBy99l.js b/reference_scripts/HmImVzvw6ecBy99l.js new file mode 100644 index 0000000..1731116 --- /dev/null +++ b/reference_scripts/HmImVzvw6ecBy99l.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) +{ + args.actor.addCondition("bleeding", 2) + this.script.scriptNotification("Added Bleeding") +} \ No newline at end of file diff --git a/reference_scripts/HoNTnPphrJISSQr1.js b/reference_scripts/HoNTnPphrJISSQr1.js new file mode 100644 index 0000000..ae73e8e --- /dev/null +++ b/reference_scripts/HoNTnPphrJISSQr1.js @@ -0,0 +1 @@ +ChatMessage.create({content : "Speak and be known to me", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) \ No newline at end of file diff --git a/reference_scripts/Hq1G30lhJYvtOSNb.js b/reference_scripts/Hq1G30lhJYvtOSNb.js new file mode 100644 index 0000000..5dce3bd --- /dev/null +++ b/reference_scripts/Hq1G30lhJYvtOSNb.js @@ -0,0 +1,9 @@ + + if (args.test.failed) + { + let applicableCharacteristics = ["ws", "bs", "s", "fel", "ag", "t", "dex"]; + if (applicableCharacteristics.includes(args.preData.characteristic)) + { + this.actor.addCondition("stunned"); + } + } \ No newline at end of file diff --git a/reference_scripts/HrOBAXsEX073ReKl.js b/reference_scripts/HrOBAXsEX073ReKl.js new file mode 100644 index 0000000..de65a28 --- /dev/null +++ b/reference_scripts/HrOBAXsEX073ReKl.js @@ -0,0 +1,18 @@ +let skill = `Entertain (Singing)` +let currentCareer = this.actor.system.currentCareer; +let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill); + +if (!currentCareer) return + + +let inCurrentCareer = currentCareer.system.skills.includes(skill); +if (existingSkill && inCurrentCareer) +{ + existingSkill.system.advances.costModifier = -5; +} +else +{ + currentCareer.system.skills.push(skill); +} + + diff --git a/reference_scripts/HrYchgkdZBiu1yPF.js b/reference_scripts/HrYchgkdZBiu1yPF.js new file mode 100644 index 0000000..959e502 --- /dev/null +++ b/reference_scripts/HrYchgkdZBiu1yPF.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Climb"); \ No newline at end of file diff --git a/reference_scripts/HwbgUIbpX0D8JLOR.js b/reference_scripts/HwbgUIbpX0D8JLOR.js new file mode 100644 index 0000000..a9ddddc --- /dev/null +++ b/reference_scripts/HwbgUIbpX0D8JLOR.js @@ -0,0 +1,2 @@ +if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") + this.actor.addCondition("bleeding") \ No newline at end of file diff --git a/reference_scripts/I0Jo6cbNAJtXUloc.js b/reference_scripts/I0Jo6cbNAJtXUloc.js new file mode 100644 index 0000000..6066d3a --- /dev/null +++ b/reference_scripts/I0Jo6cbNAJtXUloc.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.J9MK0AIaTbvd5oF6"); +this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/I0oRZ7AWde5KI5jw.js b/reference_scripts/I0oRZ7AWde5KI5jw.js new file mode 100644 index 0000000..57bbdb3 --- /dev/null +++ b/reference_scripts/I0oRZ7AWde5KI5jw.js @@ -0,0 +1 @@ +return !["t", "int"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/I1J2m5uud84N50Lk.js b/reference_scripts/I1J2m5uud84N50Lk.js new file mode 100644 index 0000000..5f22ef9 --- /dev/null +++ b/reference_scripts/I1J2m5uud84N50Lk.js @@ -0,0 +1,6 @@ +if (["cast", "channelling", "pray"].includes(args.type)) +{ + args.abort = true; + this.script.scriptNotification("Cannot cast Spells or use Prayers"); +} +else return true; \ No newline at end of file diff --git a/reference_scripts/I7ieW0hNYvvX0KFg.js b/reference_scripts/I7ieW0hNYvvX0KFg.js new file mode 100644 index 0000000..5327a98 --- /dev/null +++ b/reference_scripts/I7ieW0hNYvvX0KFg.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Heal"); \ No newline at end of file diff --git a/reference_scripts/I93i49wI9ZrDHT4n.js b/reference_scripts/I93i49wI9ZrDHT4n.js new file mode 100644 index 0000000..54906f2 --- /dev/null +++ b/reference_scripts/I93i49wI9ZrDHT4n.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.jt0DmVK9IiF6Sd2h"); +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/I9QAPKbaXwMMMBT4.js b/reference_scripts/I9QAPKbaXwMMMBT4.js new file mode 100644 index 0000000..99b5ec4 --- /dev/null +++ b/reference_scripts/I9QAPKbaXwMMMBT4.js @@ -0,0 +1,17 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty: "average"}, skipTargets: true, appendTitle : " - " + this.effect.name}) +await test.roll(); +if(test.failed) +{ + await this.actor.addCondition("stunned"); + let secondTest = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty: "easy"}, skipTargets: true, appendTitle : " - Despair"}) + await secondTest.roll(); + if(secondTest.failed) + { + this.effect.updateSource({name : "Taste of Death"}) + await this.actor.addCondition("fatigued"); + } + else + { + return false; + } +} \ No newline at end of file diff --git a/reference_scripts/IAGla7HJlYN0wa4H.js b/reference_scripts/IAGla7HJlYN0wa4H.js new file mode 100644 index 0000000..5840592 --- /dev/null +++ b/reference_scripts/IAGla7HJlYN0wa4H.js @@ -0,0 +1,8 @@ +if (args.test.characteristicKey == "wp") +{ + if (args.test.failed) + { + this.actor.addSystemEffect("convulsions") + this.script.scriptMessage(`Willpower Test failed, ${this.actor.prototypeToken.name} gains @Symptom[Convulsions] for [[1d10]] hours`) + } +} \ No newline at end of file diff --git a/reference_scripts/ID8mCcjkl7PCQhDq.js b/reference_scripts/ID8mCcjkl7PCQhDq.js new file mode 100644 index 0000000..4691ac9 --- /dev/null +++ b/reference_scripts/ID8mCcjkl7PCQhDq.js @@ -0,0 +1,8 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); + +if(test.failed) +{ + let damage = this.effect.sourceItem.system.computeSpellDamage("3", true); + this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {suppressMsg: true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP})) +} \ No newline at end of file diff --git a/reference_scripts/IG4zYqtN9fRSYE7q.js b/reference_scripts/IG4zYqtN9fRSYE7q.js new file mode 100644 index 0000000..6fb0958 --- /dev/null +++ b/reference_scripts/IG4zYqtN9fRSYE7q.js @@ -0,0 +1 @@ +args.actor.addCondition("ablaze"); \ No newline at end of file diff --git a/reference_scripts/IKiZv9YSFmKmHo6a.js b/reference_scripts/IKiZv9YSFmKmHo6a.js new file mode 100644 index 0000000..b0e3f02 --- /dev/null +++ b/reference_scripts/IKiZv9YSFmKmHo6a.js @@ -0,0 +1 @@ +return args.spell?.system.lore.value == "fire" \ No newline at end of file diff --git a/reference_scripts/ILqHxk7deotgI3KD.js b/reference_scripts/ILqHxk7deotgI3KD.js new file mode 100644 index 0000000..fdb8958 --- /dev/null +++ b/reference_scripts/ILqHxk7deotgI3KD.js @@ -0,0 +1,10 @@ +if (args.item.type != "weapon") + return + +let reach = args.item.reach.value +let reachNum = game.wfrp4e.config.reachNum[reach] +reachNum = Math.min(reachNum + 2, 7) + +let key = game.wfrp4e.utility.findKey(reachNum, game.wfrp4e.config.reachNum) + +args.item.reach.value = key \ No newline at end of file diff --git a/reference_scripts/IPPDvZdE8kn3H9z7.js b/reference_scripts/IPPDvZdE8kn3H9z7.js new file mode 100644 index 0000000..a78deea --- /dev/null +++ b/reference_scripts/IPPDvZdE8kn3H9z7.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupSkill("Dodge", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); +await test.roll(); + +if (test.failed) +{ + await this.actor.addCondition("grappling") +} \ No newline at end of file diff --git a/reference_scripts/IR5URcjnCuWBFMoN.js b/reference_scripts/IR5URcjnCuWBFMoN.js new file mode 100644 index 0000000..69ed22a --- /dev/null +++ b/reference_scripts/IR5URcjnCuWBFMoN.js @@ -0,0 +1,15 @@ +// If a full dose is imbibed, +// the victim must pass a Hard (-20) Endurance Test. + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}}) +await test.roll() +if (test.failed) +{ + this.script.scriptMessage(`

${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.

+

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.

`, + { + whisper: ChatMessage.getWhisperRecipients("GM"), + blind: true + }) +} +return test.failed; \ No newline at end of file diff --git a/reference_scripts/IR86DuMbVdbGOJYt.js b/reference_scripts/IR86DuMbVdbGOJYt.js new file mode 100644 index 0000000..4316d1c --- /dev/null +++ b/reference_scripts/IR86DuMbVdbGOJYt.js @@ -0,0 +1 @@ +this.actor.addCondition("blinded") \ No newline at end of file diff --git a/reference_scripts/IfEu1hO8sKEZBpvg.js b/reference_scripts/IfEu1hO8sKEZBpvg.js new file mode 100644 index 0000000..0b53314 --- /dev/null +++ b/reference_scripts/IfEu1hO8sKEZBpvg.js @@ -0,0 +1,14 @@ +let value = parseInt(this.item.specification.value) +let name = this.actor.prototypeToken.name + +if (game.user.isGM && game.user.targets.size) +{ + game.user.targets.forEach(t => { + t.actor.applyFear(value, name) + }) + game.user.updateTokenTargets([]); +} +else +{ + game.wfrp4e.utility.postFear(value, name) +} \ No newline at end of file diff --git a/reference_scripts/IkGegSuQwwVPhrjF.js b/reference_scripts/IkGegSuQwwVPhrjF.js new file mode 100644 index 0000000..97f7893 --- /dev/null +++ b/reference_scripts/IkGegSuQwwVPhrjF.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn") +let data = item.toObject(); +data.system.specification.value = 1 +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Ip8sctF9SIE1Z2vF.js b/reference_scripts/Ip8sctF9SIE1Z2vF.js new file mode 100644 index 0000000..7cc82a8 --- /dev/null +++ b/reference_scripts/Ip8sctF9SIE1Z2vF.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.UnJ25lL8aUzem5JO") +let data = item.toObject(); +data.system.specification.value = 3 +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/IpoOOjYJs6RmVrpb.js b/reference_scripts/IpoOOjYJs6RmVrpb.js new file mode 100644 index 0000000..c6867fc --- /dev/null +++ b/reference_scripts/IpoOOjYJs6RmVrpb.js @@ -0,0 +1,4 @@ +if (args.totalWoundLoss > 0) +{ + args.attacker.applyEffect({effectUuids : this.effect.sourceItem.effects.contents[1].uuid}) +} \ No newline at end of file diff --git a/reference_scripts/IsLAvY9ikR1cOJWw.js b/reference_scripts/IsLAvY9ikR1cOJWw.js new file mode 100644 index 0000000..c5a06ce --- /dev/null +++ b/reference_scripts/IsLAvY9ikR1cOJWw.js @@ -0,0 +1 @@ +return !["NAME.Row", "NAME.Swim"].map(i => game.i18n.localize(i)).includes(args.skill?.name); \ No newline at end of file diff --git a/reference_scripts/IslMfFgpgQq2brpu.js b/reference_scripts/IslMfFgpgQq2brpu.js new file mode 100644 index 0000000..02c913e --- /dev/null +++ b/reference_scripts/IslMfFgpgQq2brpu.js @@ -0,0 +1,5 @@ +if (this.actor.hasCondition("broken")) +{ + this.actor.removeCondition("broken") + this.script.scriptNotification(`Cannot have Broken`); +} \ No newline at end of file diff --git a/reference_scripts/IukS0clr1yAleacc.js b/reference_scripts/IukS0clr1yAleacc.js new file mode 100644 index 0000000..d71d043 --- /dev/null +++ b/reference_scripts/IukS0clr1yAleacc.js @@ -0,0 +1,3 @@ +this.actor.system.characteristics.ag.modifier -= parseInt(this.item.system.location.value || 1) + +this.actor.system.characteristics.ws.modifier -= parseInt(this.item.system.location.value || 1) \ No newline at end of file diff --git a/reference_scripts/IupskvzvoGyD2H5o.js b/reference_scripts/IupskvzvoGyD2H5o.js new file mode 100644 index 0000000..87c4934 --- /dev/null +++ b/reference_scripts/IupskvzvoGyD2H5o.js @@ -0,0 +1,23 @@ +if (this.actor.type != "character") +{ + return; +} + +let god = await ValueDialog.create("Enter a Deity", "Blessed") + +if (god) +{ + let prayers = await game.wfrp4e.utility.findAll("prayer", "Loading Prayers") + let blessings = prayers.filter(p => p.system.god.value.split(",").map(i => i.trim().toLowerCase()).includes(god.toLowerCase()) && p.system.type.value == "blessing") + if (blessings.length) + { + this.script.scriptNotification("Adding " + blessings.map(i => i.name).join(", ")) + await this.actor.createEmbeddedDocuments("Item", blessings, {fromEffect : this.effect.id}) + } + else + { + this.script.scriptNotification(`Could not find any Blessings associated with ${god}.`) + } + this.item.updateSource({name : this.item.name.replace("Any", god)}) + await this.actor.update({"system.details.god.value": god}) +} \ No newline at end of file diff --git a/reference_scripts/IzZcsSngI8TZH4d8.js b/reference_scripts/IzZcsSngI8TZH4d8.js new file mode 100644 index 0000000..a63265f --- /dev/null +++ b/reference_scripts/IzZcsSngI8TZH4d8.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp"); +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/J0IWUhxada2ONowP.js b/reference_scripts/J0IWUhxada2ONowP.js new file mode 100644 index 0000000..aec5a9d --- /dev/null +++ b/reference_scripts/J0IWUhxada2ONowP.js @@ -0,0 +1 @@ + return args.skill?.name == "Entertain (Sing)" || args.skill?.name == "Entertain (Singing)" || (args.skill?.name.includes("Language") && (args.skill?.name.includes("Magick") || args.skill?.name.includes("Elthárin") || args.skill?.name.includes("Cathayan"))) \ No newline at end of file diff --git a/reference_scripts/J1FPDdrXGctKDTZz.js b/reference_scripts/J1FPDdrXGctKDTZz.js new file mode 100644 index 0000000..d72299d --- /dev/null +++ b/reference_scripts/J1FPDdrXGctKDTZz.js @@ -0,0 +1,16 @@ +if (args.equipped) +{ + let ward = await fromUuid("Compendium.wfrp4e-core.items.Bvd2aZ0gQUXHfCTh") + wardData = ward.toObject() + wardData.system.specification.value = "8" + + let mr = await fromUuid("Compendium.wfrp4e-core.items.yrkI7ATjqLPDTFmZ") + mrData = mr.toObject() + mrData.system.specification.value = 2 + + this.actor.createEmbeddedDocuments("Item", [wardData, mrData], {fromEffect : this.effect.id}) +} +else +{ + this.effect.deleteCreatedItems() +} \ No newline at end of file diff --git a/reference_scripts/J8aPichsl25t1QZ9.js b/reference_scripts/J8aPichsl25t1QZ9.js new file mode 100644 index 0000000..e0eef4f --- /dev/null +++ b/reference_scripts/J8aPichsl25t1QZ9.js @@ -0,0 +1 @@ +this.actor.addCondition("entangled", this.effect.sourceTest.result.SL) \ No newline at end of file diff --git a/reference_scripts/JEbs0WlqhKNDOo5A.js b/reference_scripts/JEbs0WlqhKNDOo5A.js new file mode 100644 index 0000000..83eb600 --- /dev/null +++ b/reference_scripts/JEbs0WlqhKNDOo5A.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}) +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("unconscious") +} diff --git a/reference_scripts/JFgXyb6bKjZJLmF8.js b/reference_scripts/JFgXyb6bKjZJLmF8.js new file mode 100644 index 0000000..996b184 --- /dev/null +++ b/reference_scripts/JFgXyb6bKjZJLmF8.js @@ -0,0 +1 @@ +return args.characteristic == "ag" \ No newline at end of file diff --git a/reference_scripts/JQruHprM5R5vZ9DA.js b/reference_scripts/JQruHprM5R5vZ9DA.js new file mode 100644 index 0000000..ae80286 --- /dev/null +++ b/reference_scripts/JQruHprM5R5vZ9DA.js @@ -0,0 +1,10 @@ +let caster = this.effect.sourceActor; +if (caster) +{ + let healed= caster.system.characteristics.wp.bonus + caster.system.characteristics.int.bonus + await this.actor.modifyWounds(healed); + this.script.scriptMessage(`${this.actor.prototypeToken.name} regains ${healed} Wounds`) +} + + 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"}}) + await test.roll(); \ No newline at end of file diff --git a/reference_scripts/JZIn1dsKHFE3smJU.js b/reference_scripts/JZIn1dsKHFE3smJU.js new file mode 100644 index 0000000..a07962a --- /dev/null +++ b/reference_scripts/JZIn1dsKHFE3smJU.js @@ -0,0 +1,2 @@ +let ablaze = parseInt(this.effect.sourceTest.result.SL) + 1 +args.actor.addCondition("ablaze", ablaze) \ No newline at end of file diff --git a/reference_scripts/JaiC5P6nIgctOacH.js b/reference_scripts/JaiC5P6nIgctOacH.js new file mode 100644 index 0000000..d3560ca --- /dev/null +++ b/reference_scripts/JaiC5P6nIgctOacH.js @@ -0,0 +1,4 @@ +if (args.actor.system.details.species?.value?.toLowerCase() == "dwarf") +{ + args.weaponProperties.flaws.undamaging = true; +} \ No newline at end of file diff --git a/reference_scripts/JavuFNZ9Pj5elVLc.js b/reference_scripts/JavuFNZ9Pj5elVLc.js new file mode 100644 index 0000000..9c9591a --- /dev/null +++ b/reference_scripts/JavuFNZ9Pj5elVLc.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") +let data = item.toObject(); +data.system.specification.value = 4 - this.actor.characteristics.s.bonus +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/JeThJbOf6Xmbtgo1.js b/reference_scripts/JeThJbOf6Xmbtgo1.js new file mode 100644 index 0000000..8125581 --- /dev/null +++ b/reference_scripts/JeThJbOf6Xmbtgo1.js @@ -0,0 +1,8 @@ +this.script.scriptMessage(await this.actor.applyBasicDamage(8 + parseInt(this.effect.sourceTest.result.SL), {suppressMsg : true})) + +let test = await this.actor.setupSkill("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/reference_scripts/JgCcgDVZX54slrWx.js b/reference_scripts/JgCcgDVZX54slrWx.js new file mode 100644 index 0000000..b758160 --- /dev/null +++ b/reference_scripts/JgCcgDVZX54slrWx.js @@ -0,0 +1 @@ +return args.skill?.name.includes(game.i18n.localize("NAME.Melee")) || args.item?.isMelee || args.options.corruption \ No newline at end of file diff --git a/reference_scripts/JibNjuQrJRnY0yf9.js b/reference_scripts/JibNjuQrJRnY0yf9.js new file mode 100644 index 0000000..03aff09 --- /dev/null +++ b/reference_scripts/JibNjuQrJRnY0yf9.js @@ -0,0 +1 @@ +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.options.dodge) \ No newline at end of file diff --git a/reference_scripts/JjDzMnUxaWQePIYh.js b/reference_scripts/JjDzMnUxaWQePIYh.js new file mode 100644 index 0000000..70529bf --- /dev/null +++ b/reference_scripts/JjDzMnUxaWQePIYh.js @@ -0,0 +1 @@ +return args.characteristic != "int" \ No newline at end of file diff --git a/reference_scripts/JjiPprLSlSmmB5Ga.js b/reference_scripts/JjiPprLSlSmmB5Ga.js new file mode 100644 index 0000000..bfe3c8a --- /dev/null +++ b/reference_scripts/JjiPprLSlSmmB5Ga.js @@ -0,0 +1 @@ +args.item.system.damage.value += " + 1" \ No newline at end of file diff --git a/reference_scripts/Jjq3oPYbI26zjxME.js b/reference_scripts/Jjq3oPYbI26zjxME.js new file mode 100644 index 0000000..dcf1d23 --- /dev/null +++ b/reference_scripts/Jjq3oPYbI26zjxME.js @@ -0,0 +1,21 @@ +let location = this.item.system.location.key; + +if (location) +{ + let dropped = this.item.system.weaponsAtLocation; + + if (dropped.length) + { + this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + for(let weapon of dropped) + { + await weapon.system.toggleEquip(); + } + } +} + +let roll = await new Roll("1d10").roll() + +roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Duration)`})); + +this.effect.updateSource({"duration.rounds" : roll.total}) \ No newline at end of file diff --git a/reference_scripts/Jk7OHqx06oCUVAzb.js b/reference_scripts/Jk7OHqx06oCUVAzb.js new file mode 100644 index 0000000..44fed7e --- /dev/null +++ b/reference_scripts/Jk7OHqx06oCUVAzb.js @@ -0,0 +1 @@ +return !["Language (Magick)", "Channelling (Hysh)"].includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/JmZQRvdWjm9ykYfn.js b/reference_scripts/JmZQRvdWjm9ykYfn.js new file mode 100644 index 0000000..90d6edc --- /dev/null +++ b/reference_scripts/JmZQRvdWjm9ykYfn.js @@ -0,0 +1,5 @@ +if (this.actor.hasCondition("surprised")) +{ + this.actor.removeCondition("surprised") + this.script.scriptMessage(`Cannot be Surprised`); +} \ No newline at end of file diff --git a/reference_scripts/Jnp5c09sPzDD61EK.js b/reference_scripts/Jnp5c09sPzDD61EK.js new file mode 100644 index 0000000..e9e5662 --- /dev/null +++ b/reference_scripts/Jnp5c09sPzDD61EK.js @@ -0,0 +1,3 @@ +this.script.scriptNotification(`${args.actor.prototypeToken.name} must pass an Average (+20) Willpower Test to attack this target!`) + +return true; // No need to show this in the dialog \ No newline at end of file diff --git a/reference_scripts/JstrA46EYSEuRSy5.js b/reference_scripts/JstrA46EYSEuRSy5.js new file mode 100644 index 0000000..f5e7f96 --- /dev/null +++ b/reference_scripts/JstrA46EYSEuRSy5.js @@ -0,0 +1,2 @@ +if (this.actor.has(game.i18n.localize("NAME.Undead")) && this.actor.has(game.i18n.localize("NAME.Construct"))) + this.actor.addCondition("dead") \ No newline at end of file diff --git a/reference_scripts/JwYZJGkZMSM2M3Si.js b/reference_scripts/JwYZJGkZMSM2M3Si.js new file mode 100644 index 0000000..23dc567 --- /dev/null +++ b/reference_scripts/JwYZJGkZMSM2M3Si.js @@ -0,0 +1,10 @@ +if (args.totalWoundLoss > 0) +{ + let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) + await test.roll() + if (test.failed) + { + args.totalWoundLoss += this.effect.sourceActor.system.characteristics.wp.bonus + args.modifiers.other.push({label : this.effect.name, value : this.effect.sourceActor.system.characteristics.wp.bonus}) + } +} \ No newline at end of file diff --git a/reference_scripts/JwgFQmPQtXWAP94i.js b/reference_scripts/JwgFQmPQtXWAP94i.js new file mode 100644 index 0000000..7c989d6 --- /dev/null +++ b/reference_scripts/JwgFQmPQtXWAP94i.js @@ -0,0 +1 @@ +this.actor.addCondition("fatigued"); \ No newline at end of file diff --git a/reference_scripts/JyTxUG5dNW670Sf7.js b/reference_scripts/JyTxUG5dNW670Sf7.js new file mode 100644 index 0000000..9421a21 --- /dev/null +++ b/reference_scripts/JyTxUG5dNW670Sf7.js @@ -0,0 +1,11 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.7mCcI3q7hgWcmbBU") +let data = item.toObject(); +data.system.location.key= this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}); +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("stunned") +} \ No newline at end of file diff --git a/reference_scripts/K06v93N4FXb70mB7.js b/reference_scripts/K06v93N4FXb70mB7.js new file mode 100644 index 0000000..051a245 --- /dev/null +++ b/reference_scripts/K06v93N4FXb70mB7.js @@ -0,0 +1 @@ +args.item.system.encumbrance.value = Math.max(0, args.item.system.encumbrance.value - 1); \ No newline at end of file diff --git a/reference_scripts/KD4nCSdSXJVJmk0R.js b/reference_scripts/KD4nCSdSXJVJmk0R.js new file mode 100644 index 0000000..7499473 --- /dev/null +++ b/reference_scripts/KD4nCSdSXJVJmk0R.js @@ -0,0 +1,2 @@ +this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg : true})) +await this.actor.addCondition("ablaze") \ No newline at end of file diff --git a/reference_scripts/KF69WqF4PSEtpdb2.js b/reference_scripts/KF69WqF4PSEtpdb2.js new file mode 100644 index 0000000..4f434e6 --- /dev/null +++ b/reference_scripts/KF69WqF4PSEtpdb2.js @@ -0,0 +1,2 @@ +args.fields.slBonus += 2; + \ No newline at end of file diff --git a/reference_scripts/KG4TxnXiLLpfWOQO.js b/reference_scripts/KG4TxnXiLLpfWOQO.js new file mode 100644 index 0000000..14697ad --- /dev/null +++ b/reference_scripts/KG4TxnXiLLpfWOQO.js @@ -0,0 +1 @@ +args.fields.difficulty = "average" \ No newline at end of file diff --git a/reference_scripts/KGK9vL1Yl0qmCeCN.js b/reference_scripts/KGK9vL1Yl0qmCeCN.js new file mode 100644 index 0000000..78b37da --- /dev/null +++ b/reference_scripts/KGK9vL1Yl0qmCeCN.js @@ -0,0 +1,88 @@ +let specification = this.item.system.specification.value; +let choice = []; + +if (!specification || specification == "Trained Skills") +{ + choice = await ItemDialog.create(ItemDialog.objectToArray({ + broken: "Broken", + drive: "Drive", + entertain: "Entertain", + fetch: "Fetch", + guard: "Guard", + home: "Home", + magic: "Magic", + mount: "Mount", + war: "War" + }, this.effect.img), "unlimited", "Choose Training"); +} +else +{ + choice = specification.split(", ").map(i => { + return { + id : i.toLowerCase(), + name : i + } + }); +} + +if (choice.length) +{ + let changes = foundry.utils.deepClone(this.effect.changes); + + for(let training of choice) + { + switch(training.id) + { + case "broken" : + let roll = await new Roll("2d10").roll(); + roll.toMessage(this.script.getChatData()); + changes.push({value : roll.total, mode : 2, key : "system.characteristics.fel.modifier"}) + + if (this.actor.type == "creature") + { + let bestial = this.actor.itemTypes.trait.find(i => i.name == "Bestial"); + if (bestial) + { + bestial.update({"system.disabled" : true}) + } + } + break; + + case "drive" : + + break; + + case "entertain" : + + break; + + case "fetch" : + + break; + + case "guard" : + let territorial = await fromUuid("Compendium.wfrp4e-core.items.Item.JIAe7i7dqTQBu4do"); + await this.actor.createEmbeddedDocuments("Item", [territorial], {fromEffect: this.effect.id}) + setProperty(args, "options.keepId", true); + break; + + case "home" : + + break; + + case "magic" : + + break; + + case "mount" : + + break; + + case "war" : + changes.push({value : 10, mode : 2, key : "system.characteristics.ws.modifier"}) + break; + } + } + this.effect.updateSource({name : `${this.effect.name} (${choice.map(i => i.name).join(", ")})`, changes, "flags.wfrp4e.trained" : choice.map(i => i.id)}) + this.item.updateSource({"system.specification.value" : `${choice.map(i => i.name).join(", ")}`}) +} \ No newline at end of file diff --git a/reference_scripts/KICZPwLvbUSxbDrE.js b/reference_scripts/KICZPwLvbUSxbDrE.js new file mode 100644 index 0000000..30a0d6f --- /dev/null +++ b/reference_scripts/KICZPwLvbUSxbDrE.js @@ -0,0 +1,18 @@ +let table = game.wfrp4e.tables.findTable("mutatemental"); +if (!table) +{ + ui.notifications.error("Cannot find table with key: mutatemental") +} +let result = (await table.roll()).results[0]; +let uuid = `Compendium.${result.documentCollection}.${result.documentId}` +let item = await fromUuid(uuid); + +if (item) +{ + this.script.scriptNotification(`${item.name} added`) + this.actor.createEmbeddedDocuments("Item", [item]) +} +else +{ + ui.notifications.error("Item could not be found: " + uuid) +} \ No newline at end of file diff --git a/reference_scripts/KIoVBinAZK8sMOqD.js b/reference_scripts/KIoVBinAZK8sMOqD.js new file mode 100644 index 0000000..072c254 --- /dev/null +++ b/reference_scripts/KIoVBinAZK8sMOqD.js @@ -0,0 +1,11 @@ + + let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "average"}, skipTargets: true, 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/reference_scripts/KJLAan0glJlyOyqF.js b/reference_scripts/KJLAan0glJlyOyqF.js new file mode 100644 index 0000000..e9a31c5 --- /dev/null +++ b/reference_scripts/KJLAan0glJlyOyqF.js @@ -0,0 +1,11 @@ + this.actor.getActiveTokens().forEach(t => t.document.update({light : { + "dim": 10, + "bright": 5, + "alpha": 0.5, + "animation": { + "speed": 4, + "intensity": 4, + "type": "flame", + }, + "color": "#ac9e6c", + }})); \ No newline at end of file diff --git a/reference_scripts/KPQfupKuaf4LCv4R.js b/reference_scripts/KPQfupKuaf4LCv4R.js new file mode 100644 index 0000000..9dcc016 --- /dev/null +++ b/reference_scripts/KPQfupKuaf4LCv4R.js @@ -0,0 +1,2 @@ +const talents = await Promise.all(["Schemer", "Second Sight"].map(game.wfrp4e.utility.findTalent)) +this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/KQmb5B27eJ1lkbVL.js b/reference_scripts/KQmb5B27eJ1lkbVL.js new file mode 100644 index 0000000..7adee1c --- /dev/null +++ b/reference_scripts/KQmb5B27eJ1lkbVL.js @@ -0,0 +1 @@ +return this.item.system.quantity.value > 0 && args.type != "channelling" \ No newline at end of file diff --git a/reference_scripts/KQzbrpb0T5a7it4k.js b/reference_scripts/KQzbrpb0T5a7it4k.js new file mode 100644 index 0000000..1620dd8 --- /dev/null +++ b/reference_scripts/KQzbrpb0T5a7it4k.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.vMYEkrWj0ip6ZOdv"); +let data = item.toObject(); +data.name += ` (Disease)`; +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/KSjsDlsx3DD6cT16.js b/reference_scripts/KSjsDlsx3DD6cT16.js new file mode 100644 index 0000000..f00b8b8 --- /dev/null +++ b/reference_scripts/KSjsDlsx3DD6cT16.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Bribery"); \ No newline at end of file diff --git a/reference_scripts/KT670CjGBEprx2fO.js b/reference_scripts/KT670CjGBEprx2fO.js new file mode 100644 index 0000000..bbf4c65 --- /dev/null +++ b/reference_scripts/KT670CjGBEprx2fO.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.RWJrupj9seau0w31"); +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/KTBVDHUndI3qDOXM.js b/reference_scripts/KTBVDHUndI3qDOXM.js new file mode 100644 index 0000000..b9aa611 --- /dev/null +++ b/reference_scripts/KTBVDHUndI3qDOXM.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance")) +await test.roll(); +if (!test.succeeded) +{ + args.actor.addCondition("stunned") +} \ No newline at end of file diff --git a/reference_scripts/KUx0deSF3xNzMucL.js b/reference_scripts/KUx0deSF3xNzMucL.js new file mode 100644 index 0000000..208679d --- /dev/null +++ b/reference_scripts/KUx0deSF3xNzMucL.js @@ -0,0 +1 @@ +return args.skill?.name.includes(game.i18n.localize("NAME.Art")); \ No newline at end of file diff --git a/reference_scripts/KVpDUEjHhd3nLa0f.js b/reference_scripts/KVpDUEjHhd3nLa0f.js new file mode 100644 index 0000000..a301dfb --- /dev/null +++ b/reference_scripts/KVpDUEjHhd3nLa0f.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) +{ + this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("enrage-beast")) +} \ No newline at end of file diff --git a/reference_scripts/KVuPduDztyMZQNt9.js b/reference_scripts/KVuPduDztyMZQNt9.js new file mode 100644 index 0000000..c359f67 --- /dev/null +++ b/reference_scripts/KVuPduDztyMZQNt9.js @@ -0,0 +1 @@ +args.fields.slBonus += this.actor.system.characteristics.ag.bonus \ No newline at end of file diff --git a/reference_scripts/KXzDe7cN2vynHjJO.js b/reference_scripts/KXzDe7cN2vynHjJO.js new file mode 100644 index 0000000..41a9fa8 --- /dev/null +++ b/reference_scripts/KXzDe7cN2vynHjJO.js @@ -0,0 +1,3 @@ +this.actor.hasCondition("blinded")?.delete(); +this.actor.hasCondition("deafened")?.delete() +this.actor.hasCondition("unconscious")?.delete() \ No newline at end of file diff --git a/reference_scripts/KkjkYAGI9Em1NgiQ.js b/reference_scripts/KkjkYAGI9Em1NgiQ.js new file mode 100644 index 0000000..1790282 --- /dev/null +++ b/reference_scripts/KkjkYAGI9Em1NgiQ.js @@ -0,0 +1,19 @@ +if (this.item.system.quantity.value) +{ + this.item.system.reduceQuantity(); + let test = await this.actor.setupSkill(game.i18n.localize("NAME.Heal"), { appendTitle: ` - ${this.effect.name}`, skipTargets: true }) + await test.roll(); + if (test.succeeded) + { + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + actor.applyEffect({ effectData: [this.item.effects.contents[0].convertToApplied()] }) + } + else + { + this.script.scriptNotification("Heal Test failed!", "error") + } +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/KmngDrPD72xn22kZ.js b/reference_scripts/KmngDrPD72xn22kZ.js new file mode 100644 index 0000000..331fdca --- /dev/null +++ b/reference_scripts/KmngDrPD72xn22kZ.js @@ -0,0 +1,11 @@ +if (this.actor.Species.toLowerCase() != "skaven") { + this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - Used ${this.effect.name}`, fields: { difficulty: "difficult" } }).then(async test => { + await test.roll() + if (test.failed) + { + let toughnessLost = Math.ceil(CONFIG.Dice.randomUniform() * 10) + this.actor.update({ "system.characteristics.t.initial": this.actor.characteristics.t.initial - toughnessLost }) + this.script.scriptMessage(`${this.actor.prototypeToken.name} lost ${toughnessLost} Toughness`) + } + }) + } \ No newline at end of file diff --git a/reference_scripts/KnwYZbeRSBA94hfl.js b/reference_scripts/KnwYZbeRSBA94hfl.js new file mode 100644 index 0000000..11bc24c --- /dev/null +++ b/reference_scripts/KnwYZbeRSBA94hfl.js @@ -0,0 +1,5 @@ +if (!args.flags.lostFingers) +{ + args.flags.lostFingers = true; + args.fields.modifier -= 5 * this.actor.flags.useless[this.item.system.location.key] +} \ No newline at end of file diff --git a/reference_scripts/KuUkUmOOLf05I4Bp.js b/reference_scripts/KuUkUmOOLf05I4Bp.js new file mode 100644 index 0000000..b2e2144 --- /dev/null +++ b/reference_scripts/KuUkUmOOLf05I4Bp.js @@ -0,0 +1 @@ +this.actor.hasCondition("broken")?.delete(); diff --git a/reference_scripts/KuuWAhoSzk0rCxxw.js b/reference_scripts/KuuWAhoSzk0rCxxw.js new file mode 100644 index 0000000..2d3f461 --- /dev/null +++ b/reference_scripts/KuuWAhoSzk0rCxxw.js @@ -0,0 +1 @@ +args.fields.modifier += -20; \ No newline at end of file diff --git a/reference_scripts/KyUPYV1RXJxPOfyA.js b/reference_scripts/KyUPYV1RXJxPOfyA.js new file mode 100644 index 0000000..5e60157 --- /dev/null +++ b/reference_scripts/KyUPYV1RXJxPOfyA.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "veasy"}}) +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("fatigued"); +} \ No newline at end of file diff --git a/reference_scripts/KyswmGj1uG3QS3ng.js b/reference_scripts/KyswmGj1uG3QS3ng.js new file mode 100644 index 0000000..81a6df2 --- /dev/null +++ b/reference_scripts/KyswmGj1uG3QS3ng.js @@ -0,0 +1 @@ +args.applyAP = false; \ No newline at end of file diff --git a/reference_scripts/L1RMLvKtRPFtnczI.js b/reference_scripts/L1RMLvKtRPFtnczI.js new file mode 100644 index 0000000..9e11b96 --- /dev/null +++ b/reference_scripts/L1RMLvKtRPFtnczI.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.MGEPI4jNhymNIRVz"); +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/L2cdQppcPwxz24hN.js b/reference_scripts/L2cdQppcPwxz24hN.js new file mode 100644 index 0000000..8eabc28 --- /dev/null +++ b/reference_scripts/L2cdQppcPwxz24hN.js @@ -0,0 +1 @@ +return !args.weapon \ No newline at end of file diff --git a/reference_scripts/L89UcafRHqUfxoux.js b/reference_scripts/L89UcafRHqUfxoux.js new file mode 100644 index 0000000..092415c --- /dev/null +++ b/reference_scripts/L89UcafRHqUfxoux.js @@ -0,0 +1,3 @@ +let injury = await fromUuid("Compendium.wfrp4e-core.items.3S4OYOZLauXctmev") +injury.updateSource({"system.location.key" : this.item.system.location.key}) +this.actor.createEmbeddedDocuments("Item", [injury], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/L9eAtDyaoHvqryk4.js b/reference_scripts/L9eAtDyaoHvqryk4.js new file mode 100644 index 0000000..c5efbe5 --- /dev/null +++ b/reference_scripts/L9eAtDyaoHvqryk4.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Intimidate"); \ No newline at end of file diff --git a/reference_scripts/LAyLbcC0lOPwZP3U.js b/reference_scripts/LAyLbcC0lOPwZP3U.js new file mode 100644 index 0000000..328bcfe --- /dev/null +++ b/reference_scripts/LAyLbcC0lOPwZP3U.js @@ -0,0 +1 @@ +this.actor.addCondition("ablaze", parseInt(this.effect.sourceTest.result.SL)) \ No newline at end of file diff --git a/reference_scripts/LHUUXfZVLBhWqRvb.js b/reference_scripts/LHUUXfZVLBhWqRvb.js new file mode 100644 index 0000000..9dae93e --- /dev/null +++ b/reference_scripts/LHUUXfZVLBhWqRvb.js @@ -0,0 +1 @@ +this.actor.status.addArmour(5, {magical: true, source : this.effect}) \ No newline at end of file diff --git a/reference_scripts/LLqAT9wEUGMLfDhU.js b/reference_scripts/LLqAT9wEUGMLfDhU.js new file mode 100644 index 0000000..4102c46 --- /dev/null +++ b/reference_scripts/LLqAT9wEUGMLfDhU.js @@ -0,0 +1 @@ +return !args.item?.system.isRanged \ No newline at end of file diff --git a/reference_scripts/LOL2TGf8p8KxP14D.js b/reference_scripts/LOL2TGf8p8KxP14D.js new file mode 100644 index 0000000..a462357 --- /dev/null +++ b/reference_scripts/LOL2TGf8p8KxP14D.js @@ -0,0 +1,2 @@ +let wind = this.effect.name.split(" ")[2] +return args.type != "cast" || game.wfrp4e.config.magicWind[args.item.system.lore.value] != wind; \ No newline at end of file diff --git a/reference_scripts/LQEWSN5KnHHATPsf.js b/reference_scripts/LQEWSN5KnHHATPsf.js new file mode 100644 index 0000000..bd8c028 --- /dev/null +++ b/reference_scripts/LQEWSN5KnHHATPsf.js @@ -0,0 +1,4 @@ +if (args.totalWoundLoss > 0) +{ + this.script.scriptMessage(`${args.actor.name} must pass an Easy (+40) Endurance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/reference_scripts/LXEUhHuXe8keEPI9.js b/reference_scripts/LXEUhHuXe8keEPI9.js new file mode 100644 index 0000000..0683f16 --- /dev/null +++ b/reference_scripts/LXEUhHuXe8keEPI9.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupCharacteristic("wp", {fields: {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) +{ + let stuns = Math.max(1, Math.abs(test.result.SL)) + this.actor.addCondition("stunned", stuns) +} \ No newline at end of file diff --git a/reference_scripts/LeKLtvEDrWh4yHsx.js b/reference_scripts/LeKLtvEDrWh4yHsx.js new file mode 100644 index 0000000..bfe04ec --- /dev/null +++ b/reference_scripts/LeKLtvEDrWh4yHsx.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.CharmAnimal") || args.skill?.name.includes(game.i18n.localize("NAME.AnimalTraining")); \ No newline at end of file diff --git a/reference_scripts/LedRsrVo2f7lm3Ix.js b/reference_scripts/LedRsrVo2f7lm3Ix.js new file mode 100644 index 0000000..647d323 --- /dev/null +++ b/reference_scripts/LedRsrVo2f7lm3Ix.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Intimidate"); \ No newline at end of file diff --git a/reference_scripts/Lg1oRg4oNRvucsvi.js b/reference_scripts/Lg1oRg4oNRvucsvi.js new file mode 100644 index 0000000..42395c3 --- /dev/null +++ b/reference_scripts/Lg1oRg4oNRvucsvi.js @@ -0,0 +1 @@ +return !(args.skill?.name == game.i18n.localize("NAME.Climb") || args.skill?.name == game.i18n.localize("NAME.Athletics")) \ No newline at end of file diff --git a/reference_scripts/LjXPlgdXBdllnA3i.js b/reference_scripts/LjXPlgdXBdllnA3i.js new file mode 100644 index 0000000..402cd45 --- /dev/null +++ b/reference_scripts/LjXPlgdXBdllnA3i.js @@ -0,0 +1 @@ +return !["s", "t"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/LkPtgN9A36OI6Frh.js b/reference_scripts/LkPtgN9A36OI6Frh.js new file mode 100644 index 0000000..4bda5cb --- /dev/null +++ b/reference_scripts/LkPtgN9A36OI6Frh.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Leadership"); \ No newline at end of file diff --git a/reference_scripts/LlRhPGorLl5qJCU8.js b/reference_scripts/LlRhPGorLl5qJCU8.js new file mode 100644 index 0000000..3393901 --- /dev/null +++ b/reference_scripts/LlRhPGorLl5qJCU8.js @@ -0,0 +1,8 @@ +if (this.actor.hasCondition("prone")) +{ + this.actor.addCondition("unconscious"); +} +else +{ + this.actor.addCondition("prone"); +} \ No newline at end of file diff --git a/reference_scripts/Lm9IBkc918Duw3US.js b/reference_scripts/Lm9IBkc918Duw3US.js new file mode 100644 index 0000000..c27cbaf --- /dev/null +++ b/reference_scripts/Lm9IBkc918Duw3US.js @@ -0,0 +1,6 @@ +let career = this.actor.itemTypes.career.find(c => c.getFlag("wfrp4e", "doubleLife")) + +if(career) +{ + career.system.current.value = true; +} \ No newline at end of file diff --git a/reference_scripts/Lp261O9fgEXmgPf3.js b/reference_scripts/Lp261O9fgEXmgPf3.js new file mode 100644 index 0000000..65d054e --- /dev/null +++ b/reference_scripts/Lp261O9fgEXmgPf3.js @@ -0,0 +1,5 @@ +// If this actor wins a defending test, swap the test +if (!args.opposedTest.result.swapped && args.opposedTest.result.winner == "defender" && args.opposedTest.attackerTest.result.damage) +{ + args.opposedTest.swap(this.effect.label); +} \ No newline at end of file diff --git a/reference_scripts/Lpv2N9LK9loeumiW.js b/reference_scripts/Lpv2N9LK9loeumiW.js new file mode 100644 index 0000000..ad3c30e --- /dev/null +++ b/reference_scripts/Lpv2N9LK9loeumiW.js @@ -0,0 +1,6 @@ +if (this.actor.uuid != this.effect.sourceActor.uuid) +{ + 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 => { + test.roll(); + }) +} \ No newline at end of file diff --git a/reference_scripts/Lrb1S2aK7SFVD0C7.js b/reference_scripts/Lrb1S2aK7SFVD0C7.js new file mode 100644 index 0000000..2f40127 --- /dev/null +++ b/reference_scripts/Lrb1S2aK7SFVD0C7.js @@ -0,0 +1,9 @@ +if (args.totalWoundLoss > 0) +{ + let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) + await test.roll(); + if (test.failed) + { + await args.actor.addCondition("fatigued"); + } +} \ No newline at end of file diff --git a/reference_scripts/Lu27iXtJVkrJ8bOx.js b/reference_scripts/Lu27iXtJVkrJ8bOx.js new file mode 100644 index 0000000..73cb61d --- /dev/null +++ b/reference_scripts/Lu27iXtJVkrJ8bOx.js @@ -0,0 +1 @@ +return !args.skill?.name?.includes(game.i18n.localize("NAME.Stealth")) \ No newline at end of file diff --git a/reference_scripts/LxdLkPxH3SFvYrCJ.js b/reference_scripts/LxdLkPxH3SFvYrCJ.js new file mode 100644 index 0000000..8f8a38c --- /dev/null +++ b/reference_scripts/LxdLkPxH3SFvYrCJ.js @@ -0,0 +1,4 @@ +if (args.effect.conditionId == "ablaze") +{ + args.data.formula += ` - ${this.actor.system.characteristics.t.bonus}` +} \ No newline at end of file diff --git a/reference_scripts/LyAK0dVDS5L09yq2.js b/reference_scripts/LyAK0dVDS5L09yq2.js new file mode 100644 index 0000000..e8b817a --- /dev/null +++ b/reference_scripts/LyAK0dVDS5L09yq2.js @@ -0,0 +1,9 @@ +let caster = this.effect.sourceActor + +if (caster) +{ + let bonus = caster.system.characteristics.wp.bonus + this.actor.modifyWounds(bonus) + + this.script.scriptMessage(`${this.actor.prototypeToken.name} regains ${bonus} Wounds`) +} \ No newline at end of file diff --git a/reference_scripts/M0XhKnWjG14pk3iH.js b/reference_scripts/M0XhKnWjG14pk3iH.js new file mode 100644 index 0000000..1431d31 --- /dev/null +++ b/reference_scripts/M0XhKnWjG14pk3iH.js @@ -0,0 +1 @@ +return !args.skill?.name.includes("Channelling") && args.type != "channelling" && args.skill?.name != game.i18n.localize("NAME.Charm") && !args.skill?.name.includes("Language (Magick)") && args.type != "cast" \ No newline at end of file diff --git a/reference_scripts/M2FshTX4PjKFVU8y.js b/reference_scripts/M2FshTX4PjKFVU8y.js new file mode 100644 index 0000000..6aa49fc --- /dev/null +++ b/reference_scripts/M2FshTX4PjKFVU8y.js @@ -0,0 +1,9 @@ +args.flags.earCount = Number.isNumeric(args.flags.earCount) ? args.flags.earCount+1 : 1; +if (args.characteristic == "fel") +{ + args.fields.modifier -= 5; +} +if (args.flags.earCount == 2 && args.skill?.name == game.i18n.localize("NAME.Perception")) +{ + args.fields.modifier -= 20; +} diff --git a/reference_scripts/M5bh0heeafA2fQQ8.js b/reference_scripts/M5bh0heeafA2fQQ8.js new file mode 100644 index 0000000..3583c70 --- /dev/null +++ b/reference_scripts/M5bh0heeafA2fQQ8.js @@ -0,0 +1,8 @@ +if (args.test.spell?.getFlag("wfrp4e", "boonOfTzeentch")) +{ + if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis) + { + this.script.scriptMessage(`${this.effect.name} quits your mind in disgust and erases itself from your grimoire!`) + this.effect.sourceItem.delete(); + } +} \ No newline at end of file diff --git a/reference_scripts/M9VgeYGiUO97ZUW4.js b/reference_scripts/M9VgeYGiUO97ZUW4.js new file mode 100644 index 0000000..4cb39af --- /dev/null +++ b/reference_scripts/M9VgeYGiUO97ZUW4.js @@ -0,0 +1,12 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.hCadFsTRvLN9faaY") +let data = item.toObject(); +data.system.location.value = "Jaw" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (!test.succeeded) +{ + args.actor.addCondition("unconscious") +} + diff --git a/reference_scripts/MCK6WyjwYT28lsTN.js b/reference_scripts/MCK6WyjwYT28lsTN.js new file mode 100644 index 0000000..e13fea1 --- /dev/null +++ b/reference_scripts/MCK6WyjwYT28lsTN.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.u0CFf3xwiyidD9T5") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/MDLttXplnNthncGr.js b/reference_scripts/MDLttXplnNthncGr.js new file mode 100644 index 0000000..b7a08ee --- /dev/null +++ b/reference_scripts/MDLttXplnNthncGr.js @@ -0,0 +1 @@ +return args.type == "cast" && ["death", "necromancy", "life", "light", "heavens"].includes(args.spell?.system.lore.value) \ No newline at end of file diff --git a/reference_scripts/MFKhU9vp8bQpHP3I.js b/reference_scripts/MFKhU9vp8bQpHP3I.js new file mode 100644 index 0000000..126a0b5 --- /dev/null +++ b/reference_scripts/MFKhU9vp8bQpHP3I.js @@ -0,0 +1,14 @@ +let value = parseInt(this.item.specification.value) +let name = this.actor.prototypeToken.name + +if (game.user.isGM && game.user.targets.size) +{ + game.user.targets.forEach(t => { + t.actor.applyTerror(value, name) + }) + game.user.updateTokenTargets([]); +} +else +{ + game.wfrp4e.utility.postTerror(value, name) +} \ No newline at end of file diff --git a/reference_scripts/MI2GgNi3fZtUCtQD.js b/reference_scripts/MI2GgNi3fZtUCtQD.js new file mode 100644 index 0000000..4a7e8fc --- /dev/null +++ b/reference_scripts/MI2GgNi3fZtUCtQD.js @@ -0,0 +1 @@ +return ["int", "wp"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/MJB6WbZSF6Briz30.js b/reference_scripts/MJB6WbZSF6Briz30.js new file mode 100644 index 0000000..13bb16c --- /dev/null +++ b/reference_scripts/MJB6WbZSF6Briz30.js @@ -0,0 +1 @@ +return args.item?.name == game.i18n.localize("NAME.Leadership") \ No newline at end of file diff --git a/reference_scripts/MSJWJEUrX7ZmMvAD.js b/reference_scripts/MSJWJEUrX7ZmMvAD.js new file mode 100644 index 0000000..ad91ce3 --- /dev/null +++ b/reference_scripts/MSJWJEUrX7ZmMvAD.js @@ -0,0 +1 @@ +return !(args.skill?.name.includes(game.i18n.localize("NAME.Ranged")) || args.item?.isRanged || args.item?.name == game.i18n.localize("NAME.Charm")) \ No newline at end of file diff --git a/reference_scripts/McLR9YcgVUG3MooC.js b/reference_scripts/McLR9YcgVUG3MooC.js new file mode 100644 index 0000000..38225fd --- /dev/null +++ b/reference_scripts/McLR9YcgVUG3MooC.js @@ -0,0 +1 @@ +args.applyTB = false; \ No newline at end of file diff --git a/reference_scripts/MfxWXZwaZUjGSBqw.js b/reference_scripts/MfxWXZwaZUjGSBqw.js new file mode 100644 index 0000000..4e012c4 --- /dev/null +++ b/reference_scripts/MfxWXZwaZUjGSBqw.js @@ -0,0 +1,5 @@ +if (this.actor.hasCondition("ablaze")) +{ + this.script.scriptNotification("Immune to Ablaze") + await this.actor.hasCondition("ablaze")?.delete() +} \ No newline at end of file diff --git a/reference_scripts/MfxzwJz2o9ho2hOM.js b/reference_scripts/MfxzwJz2o9ho2hOM.js new file mode 100644 index 0000000..664e6ec --- /dev/null +++ b/reference_scripts/MfxzwJz2o9ho2hOM.js @@ -0,0 +1 @@ +return args.skill?.name == "Lore (Apothecary)" \ No newline at end of file diff --git a/reference_scripts/MgMMoC4Umpg7fmNI.js b/reference_scripts/MgMMoC4Umpg7fmNI.js new file mode 100644 index 0000000..ef41566 --- /dev/null +++ b/reference_scripts/MgMMoC4Umpg7fmNI.js @@ -0,0 +1,24 @@ +// Apply changes when the mask is worn + +if (args.equipped) { + this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) + this.script.scriptMessage(`${this.actor.name} dons the ${this.item.name}.
+ They cannot cast Spells or pray for Blessings and Miracles.
+ If they wear the mask for more than an hour or benefit from any of its effects, they are exposed to @Corruption[moderate]{Moderate Corruption}. + `, + {whisper: ChatMessage.getWhisperRecipients("GM")}) +} + +// Notify of lingering effects when mask is removed +else if (!args.equipped) +{ + await this.item.effects.contents[0].delete(); + await this.item.update({name : this.item.name += " (Used)"}) + this.script.scriptMessage(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`, + {whisper: ChatMessage.getWhisperRecipients("GM")} + ) + +} + + + diff --git a/reference_scripts/MgTqCMRjxhezT73T.js b/reference_scripts/MgTqCMRjxhezT73T.js new file mode 100644 index 0000000..91cd17f --- /dev/null +++ b/reference_scripts/MgTqCMRjxhezT73T.js @@ -0,0 +1 @@ +return args.fields.hitLocation == "head" && args.weapon?.system.properties.qualities.pummel \ No newline at end of file diff --git a/reference_scripts/MgZreqq3Jua10c8s.js b/reference_scripts/MgZreqq3Jua10c8s.js new file mode 100644 index 0000000..b3da966 --- /dev/null +++ b/reference_scripts/MgZreqq3Jua10c8s.js @@ -0,0 +1 @@ +return !["ws", "bs", "s", "fel", "ag", "t", "dex"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/Mhb67xufvA9uWO21.js b/reference_scripts/Mhb67xufvA9uWO21.js new file mode 100644 index 0000000..05b8bc7 --- /dev/null +++ b/reference_scripts/Mhb67xufvA9uWO21.js @@ -0,0 +1,8 @@ +let actorSize = game.wfrp4e.config.actorSizeNums[args.actor.details.size.value] +let attackerSize = game.wfrp4e.config.actorSizeNums[args.attacker.details.size.value] + +if (attackerSize > actorSize) +{ + args.actor.addCondition("prone") + this.script.scriptMessage(`Tail Attack: ${args.actor.prototypeToken.name} is now Prone`) +} \ No newline at end of file diff --git a/reference_scripts/Mir4FMHQRdVqazAF.js b/reference_scripts/Mir4FMHQRdVqazAF.js new file mode 100644 index 0000000..7ad1e1f --- /dev/null +++ b/reference_scripts/Mir4FMHQRdVqazAF.js @@ -0,0 +1,13 @@ +let actorSize = game.wfrp4e.config.actorSizeNums[args.actor.details.size.value] +let attackerSize = game.wfrp4e.config.actorSizeNums[args.attacker.details.size.value] + +if (attackerSize > actorSize) +{ + let msg = `Tongue Attack: ${args.actor.prototypeToken.name} is now @Condition[Entangled]`; + await args.actor.addCondition("entangled"); + if (actorSize <= 2) + { + msg += `and @Condition[Engaged]` + } + this.script.scriptMessage(msg, {speaker : {alias: args.attacker.prototypeToken.name}}) +} \ No newline at end of file diff --git a/reference_scripts/MkEcdViivk7abf1x.js b/reference_scripts/MkEcdViivk7abf1x.js new file mode 100644 index 0000000..0ae9907 --- /dev/null +++ b/reference_scripts/MkEcdViivk7abf1x.js @@ -0,0 +1 @@ +args.actor.flags.meleeDamageIncrease += 1 \ No newline at end of file diff --git a/reference_scripts/MnXny8SCh6OceJc9.js b/reference_scripts/MnXny8SCh6OceJc9.js new file mode 100644 index 0000000..544e090 --- /dev/null +++ b/reference_scripts/MnXny8SCh6OceJc9.js @@ -0,0 +1 @@ +return args.characteristic == "int" \ No newline at end of file diff --git a/reference_scripts/MnqQkXVp20Lw84I1.js b/reference_scripts/MnqQkXVp20Lw84I1.js new file mode 100644 index 0000000..93be773 --- /dev/null +++ b/reference_scripts/MnqQkXVp20Lw84I1.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "difficult"}}) +await test.roll(); +if (test.failed) +{ + this.script.scriptMessage(await this.actor.applyBasicDamage(3, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})) +} \ No newline at end of file diff --git a/reference_scripts/Mp8UjuCLa9jdzhBS.js b/reference_scripts/Mp8UjuCLa9jdzhBS.js new file mode 100644 index 0000000..0e448e2 --- /dev/null +++ b/reference_scripts/Mp8UjuCLa9jdzhBS.js @@ -0,0 +1,20 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); + +if (test.failed) +{ + if (!this.actor.hasCondition("fatigued")) + { + await this.actor.addCondition("fatigued"); + } + else + { + await this.actor.addCondition("blinded"); + await this.actor.addCondition("deafened"); + } + + if (((this.actor.hasCondition("blinded").conditionValue || 0) + (this.actor.hasCondition("deafened").conditionValue || 0)) > this.actor.system.characteristics.i.bonus) + { + await this.actor.addCondition("unconscious"); + } +} \ No newline at end of file diff --git a/reference_scripts/Msygc7oQQPB5fw0b.js b/reference_scripts/Msygc7oQQPB5fw0b.js new file mode 100644 index 0000000..2a7c502 --- /dev/null +++ b/reference_scripts/Msygc7oQQPB5fw0b.js @@ -0,0 +1,14 @@ +let test = this.effect.sourceTest; +if (test.failed && (test.result.roll % 11 == 0 || test.result.roll == 100)) +{ + let points = await new Roll("1d10").roll(); + game.dice3d?.showForRoll(points) + this.actor.update({"system.status.corruption.value" : this.actor.system.status.corruption.value + points.total}) + this.script.scriptMessage(`Gains ${points.total} Corruption`) +} +else +{ + let points = this.effect.sourceTest.result.overcast.usage.other.current; + this.actor.update({"system.status.corruption.value" : this.actor.system.status.corruption.value - points}) + this.script.scriptMessage(`Loses ${points} Corruption`) +} \ No newline at end of file diff --git a/reference_scripts/MwUzyAgd0yPnmZCH.js b/reference_scripts/MwUzyAgd0yPnmZCH.js new file mode 100644 index 0000000..aef44fc --- /dev/null +++ b/reference_scripts/MwUzyAgd0yPnmZCH.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.klCJX0mNpXYH5AIx") +let data = item.toObject(); +data.name = data.name.replace("Target", "Strangers"); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/Myl1Ishu9GBraYUZ.js b/reference_scripts/Myl1Ishu9GBraYUZ.js new file mode 100644 index 0000000..7bc2097 --- /dev/null +++ b/reference_scripts/Myl1Ishu9GBraYUZ.js @@ -0,0 +1 @@ +this.actor.removeCondition("bleeding") \ No newline at end of file diff --git a/reference_scripts/N2MeOlf0GjPiRcSb.js b/reference_scripts/N2MeOlf0GjPiRcSb.js new file mode 100644 index 0000000..8b92869 --- /dev/null +++ b/reference_scripts/N2MeOlf0GjPiRcSb.js @@ -0,0 +1,2 @@ +let test = await this.actor.setupCharacteristic("dex", {context : {failure : "Drops the item"}}) +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/N7nGncsPrTz2ZbDA.js b/reference_scripts/N7nGncsPrTz2ZbDA.js new file mode 100644 index 0000000..dc64a26 --- /dev/null +++ b/reference_scripts/N7nGncsPrTz2ZbDA.js @@ -0,0 +1 @@ +return !args.options.dodge || !this.actor.isMounted \ No newline at end of file diff --git a/reference_scripts/N8hA6ysHCTlLd8Kj.js b/reference_scripts/N8hA6ysHCTlLd8Kj.js new file mode 100644 index 0000000..1d8cf17 --- /dev/null +++ b/reference_scripts/N8hA6ysHCTlLd8Kj.js @@ -0,0 +1,86 @@ +let characteristics = { + "ws" : 0, + "bs" : 0, + "s" : 0, + "t" : 5, + "i" : 15, + "ag" : 0, + "dex" : 10, + "int" : 15, + "wp" : 15, + "fel" : 0 +} +let skills = ["Channelling", "Cool", "Dodge", "Entertain (Storytelling)", "Intuition", "Language (Magick)", "Lore (Magic)", "Perception"] +let skillAdvancements = [5, 15, 10, 10, 15, 10, 10, 20] +let talents = ["Arcane Magic", "Petty Magic", "Second Sight"] +let trappings = ["Hand Weapon", "Quarterstaff", "Ritual Dress incorporating many ingredients and fetishes"] +let items = []; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + items.push({name : trapping, type : "trapping", "system.trappingType.value" : "clothingAccessories"}) + //ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } +} + +updateObj.name = updateObj.name += " " + this.effect.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/N9kA46ZQ9LiRjy6T.js b/reference_scripts/N9kA46ZQ9LiRjy6T.js new file mode 100644 index 0000000..a19284c --- /dev/null +++ b/reference_scripts/N9kA46ZQ9LiRjy6T.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Haggle") || args.skill?.name == game.i18n.localize("NAME.Gossip"); \ No newline at end of file diff --git a/reference_scripts/NDvNGATDM2xPFJK0.js b/reference_scripts/NDvNGATDM2xPFJK0.js new file mode 100644 index 0000000..58c8edd --- /dev/null +++ b/reference_scripts/NDvNGATDM2xPFJK0.js @@ -0,0 +1,21 @@ +brokenbone = await fromUuid("Compendium.wfrp4e-core.items.hCadFsTRvLN9faaY") +teeth = await fromUuid("Compendium.wfrp4e-core.items.fBcZhOBn8IpoVqQ1") +tongue = await fromUuid("Compendium.wfrp4e-core.items.rkJA1DlK51QuRlJy") +brokenbone = brokenbone.toObject(); +teeth = teeth.toObject(); +tongue = tongue.toObject(); + + +let roll = await new Roll("1d10").roll(); +roll.toMessage(this.script.getChatData({flavor : "Teeth Lost"})) + +teeth.system.location.value = `${roll.total} ${teeth.system.location.value}` +brokenbone.system.location.value = "Jaw" +this.actor.createEmbeddedDocuments("Item", [brokenbone, teeth, tongue]) + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "vhard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("unconscious") +} \ No newline at end of file diff --git a/reference_scripts/NNytXz5XFPrEF6dw.js b/reference_scripts/NNytXz5XFPrEF6dw.js new file mode 100644 index 0000000..ac177e6 --- /dev/null +++ b/reference_scripts/NNytXz5XFPrEF6dw.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) +{ + args.actor.addCondition("bleeding", 1); +} + \ No newline at end of file diff --git a/reference_scripts/NQSvFWhmBQAyx5Zz.js b/reference_scripts/NQSvFWhmBQAyx5Zz.js new file mode 100644 index 0000000..6f94648 --- /dev/null +++ b/reference_scripts/NQSvFWhmBQAyx5Zz.js @@ -0,0 +1 @@ +return args.item?.isRanged \ No newline at end of file diff --git a/reference_scripts/Na7Nanl9YmxZlTo7.js b/reference_scripts/Na7Nanl9YmxZlTo7.js new file mode 100644 index 0000000..e4f212b --- /dev/null +++ b/reference_scripts/Na7Nanl9YmxZlTo7.js @@ -0,0 +1 @@ +return args.type != "cast" && args.type != "channelling") \ No newline at end of file diff --git a/reference_scripts/NdquQqyuOkGCj8Uo.js b/reference_scripts/NdquQqyuOkGCj8Uo.js new file mode 100644 index 0000000..3e25112 --- /dev/null +++ b/reference_scripts/NdquQqyuOkGCj8Uo.js @@ -0,0 +1,8 @@ +let darkvision = await fromUuid("Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc") +let fear = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn") +let acutesense = await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS") +fear = fear.toObject(); +fear.system.specification.value = 1; +acutesense = acutesense.toObject(); +acutesense.name += " (Smell)"; +this.actor.createEmbeddedDocuments("Item", [darkvision, fear, acutesense], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/NkqtQaLEGYst0PUO.js b/reference_scripts/NkqtQaLEGYst0PUO.js new file mode 100644 index 0000000..a5fa1cd --- /dev/null +++ b/reference_scripts/NkqtQaLEGYst0PUO.js @@ -0,0 +1,5 @@ +if (this.actor.has("Magic Resistance", "talent")) + return + +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/NnA4zpuO6iUXKhH7.js b/reference_scripts/NnA4zpuO6iUXKhH7.js new file mode 100644 index 0000000..c49dff4 --- /dev/null +++ b/reference_scripts/NnA4zpuO6iUXKhH7.js @@ -0,0 +1,7 @@ +if ((args.opposedTest.attackerTest.item && args.opposedTest.attackerTest.item.isMelee) || (args.opposedTest.attackerTest.item && !args.opposedTest.attackerTest.item.name.includes("Ranged"))) +{ + let AP = parseInt(this.effect.sourceTest.result.SL) + args.modifiers.ap.value += AP; + args.modifiers.ap.magical += AP; + args.modifiers.ap.details.push(`${this.effect.name} (${AP})`) +} \ No newline at end of file diff --git a/reference_scripts/NnDq4miIPNEtZUWb.js b/reference_scripts/NnDq4miIPNEtZUWb.js new file mode 100644 index 0000000..14c9bf3 --- /dev/null +++ b/reference_scripts/NnDq4miIPNEtZUWb.js @@ -0,0 +1,7 @@ +args.test.result.critModifier = args.test.result.critModifier || 0; +args.test.result.critModifier += 20; + +if (args.test.result.critical) +{ + args.test.result.critical = `${game.i18n.localize("Critical")} (+${args.test.result.critModifier})` +} \ No newline at end of file diff --git a/reference_scripts/NrVFrIXM8GnIbojv.js b/reference_scripts/NrVFrIXM8GnIbojv.js new file mode 100644 index 0000000..c13398d --- /dev/null +++ b/reference_scripts/NrVFrIXM8GnIbojv.js @@ -0,0 +1 @@ +args.item.system.damage.value = `SB + ${this.actor.system.characteristics.fel.bonus}`; \ No newline at end of file diff --git a/reference_scripts/O7lXFZLrLdFaShGR.js b/reference_scripts/O7lXFZLrLdFaShGR.js new file mode 100644 index 0000000..e5cf296 --- /dev/null +++ b/reference_scripts/O7lXFZLrLdFaShGR.js @@ -0,0 +1 @@ +args.options.catfall = true; \ No newline at end of file diff --git a/reference_scripts/O9fc0hLHdkTgSuLg.js b/reference_scripts/O9fc0hLHdkTgSuLg.js new file mode 100644 index 0000000..cc67541 --- /dev/null +++ b/reference_scripts/O9fc0hLHdkTgSuLg.js @@ -0,0 +1,8 @@ +let bite = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") +let venom = await fromUuid("Compendium.wfrp4e-core.items.gFkRm9wS65qe18Xv") +let biteData = bite.toObject(); +let venomData = venom.toObject(); + +biteData.system.specification.value = 3 - this.actor.characteristics.s.bonus; +venomData.system.specification.value = "Average" +this.actor.createEmbeddedDocuments("Item", [biteData, venomData], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/OCFrGXAYfo9OYnhc.js b/reference_scripts/OCFrGXAYfo9OYnhc.js new file mode 100644 index 0000000..142913d --- /dev/null +++ b/reference_scripts/OCFrGXAYfo9OYnhc.js @@ -0,0 +1 @@ +return args.item?.system.magicMissile?.value || args.item?.system.attackType \ No newline at end of file diff --git a/reference_scripts/OEy2lxvic37dRBEt.js b/reference_scripts/OEy2lxvic37dRBEt.js new file mode 100644 index 0000000..583f063 --- /dev/null +++ b/reference_scripts/OEy2lxvic37dRBEt.js @@ -0,0 +1,30 @@ +let filters = [ + { + property : "type", + value : "spell" + }, + { + property : "system.lore.value", + value : "petty" + } +] + +let petty = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 3, "Choose 3 Petty Spells") + + +filters = [ + { + property : "type", + value : "spell" + }, + { + property : "system.lore.value", + value : "" + } +] + +let arcane = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 3, "Choose 3 Arcane Spells") + +let items = petty.concat(arcane).map(i => i.toObject()) + +this.actor.createEmbeddedDocuments("Item", items); \ No newline at end of file diff --git a/reference_scripts/OGX4BneaYAnV25TO.js b/reference_scripts/OGX4BneaYAnV25TO.js new file mode 100644 index 0000000..7e752b3 --- /dev/null +++ b/reference_scripts/OGX4BneaYAnV25TO.js @@ -0,0 +1,40 @@ +let chatData = { whisper: ChatMessage.getWhisperRecipients("GM") } +let message = "" + +let wounds = duplicate(this.actor.status.wounds) +let regenRoll = await new Roll("1d10").roll(); +let regen = regenRoll.total; + +if (wounds.value >= wounds.max) + return + +if (wounds.value > 0) +{ + wounds.value += regen + if (wounds.value > wounds.max) + { + wounds.value = wounds.max + } + message += `${this.actor.name} regains ${regen} Wounds.` + + if (regen == 10) + { + message += `
Additionally, they regenerate a Critical Wound.` + } +} +else if (regen >= 8) +{ + message += `${this.actor.name} rolled a ${regen} and regains 1 Wound.` + wounds.value += 1 + if (regen == 10) + { + message += `
Additionally, they regenerate a Critical Wound.` + } +} +else +{ + message += `${this.actor.name} Regenerate roll of ${regen} - No effect.` +} + +await this.actor.update({ "system.status.wounds": wounds }) +this.script.scriptMessage(message, { whisper: ChatMessage.getWhisperRecipients("GM") }) \ No newline at end of file diff --git a/reference_scripts/OJMgS8ZQv0j4tEFf.js b/reference_scripts/OJMgS8ZQv0j4tEFf.js new file mode 100644 index 0000000..cf6f0f5 --- /dev/null +++ b/reference_scripts/OJMgS8ZQv0j4tEFf.js @@ -0,0 +1 @@ +return ["ws", "bs", "s", "fel", "ag", "t", "dex"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/OMAUX1fnHyIpplul.js b/reference_scripts/OMAUX1fnHyIpplul.js new file mode 100644 index 0000000..b2a1c64 --- /dev/null +++ b/reference_scripts/OMAUX1fnHyIpplul.js @@ -0,0 +1 @@ +return !["fel", "dex"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/OXoqtpOdfkURZbuL.js b/reference_scripts/OXoqtpOdfkURZbuL.js new file mode 100644 index 0000000..ac11a0d --- /dev/null +++ b/reference_scripts/OXoqtpOdfkURZbuL.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q") +let data = item.toObject() +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) diff --git a/reference_scripts/Oa9FmLXRRZRpLrrq.js b/reference_scripts/Oa9FmLXRRZRpLrrq.js new file mode 100644 index 0000000..d20b213 --- /dev/null +++ b/reference_scripts/Oa9FmLXRRZRpLrrq.js @@ -0,0 +1,2 @@ +let test = await this.actor.setupTrait(this.item); +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/OcQe0zfksf1DCJYe.js b/reference_scripts/OcQe0zfksf1DCJYe.js new file mode 100644 index 0000000..87d4ead --- /dev/null +++ b/reference_scripts/OcQe0zfksf1DCJYe.js @@ -0,0 +1,17 @@ +args.actor.system.characteristics.s.value += 30 +args.actor.system.characteristics.t.value += 30 + +args.actor.system.characteristics.s.bonus += 3 +args.actor.system.characteristics.t.bonus += 3 + +if (args.actor.system.characteristics.s.value > 100) +{ + args.actor.system.characteristics.s.value = 100 + args.actor.system.characteristics.s.bonus = 10 +} + +if (args.actor.system.characteristics.t.value > 100) +{ + args.actor.system.characteristics.t.value = 100 +args.actor.system.characteristics.t.bonus = 10 +} \ No newline at end of file diff --git a/reference_scripts/OeCgX3hIsfLfmGvC.js b/reference_scripts/OeCgX3hIsfLfmGvC.js new file mode 100644 index 0000000..6777873 --- /dev/null +++ b/reference_scripts/OeCgX3hIsfLfmGvC.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Perception")) +await test.roll(); +if (test.succeeded) +{ + this.actor.removeCondition("surprised"); +} \ No newline at end of file diff --git a/reference_scripts/OeKeQAAcJhdI4Qky.js b/reference_scripts/OeKeQAAcJhdI4Qky.js new file mode 100644 index 0000000..df7e559 --- /dev/null +++ b/reference_scripts/OeKeQAAcJhdI4Qky.js @@ -0,0 +1,5 @@ +if (this.actor.hasCondition("stunned") || this.actor.hasCondition("unconscious")) +{ + this.script.scriptNotification("Disabled!"); + await this.effect.update({"disabled" : true}) +} \ No newline at end of file diff --git a/reference_scripts/Ofn6vDbP3fZ4UlSc.js b/reference_scripts/Ofn6vDbP3fZ4UlSc.js new file mode 100644 index 0000000..a993e5e --- /dev/null +++ b/reference_scripts/Ofn6vDbP3fZ4UlSc.js @@ -0,0 +1,2 @@ +args.fields.modifier += -20; + \ No newline at end of file diff --git a/reference_scripts/OgSI0Z6SHjYuqKIz.js b/reference_scripts/OgSI0Z6SHjYuqKIz.js new file mode 100644 index 0000000..af30fee --- /dev/null +++ b/reference_scripts/OgSI0Z6SHjYuqKIz.js @@ -0,0 +1,16 @@ +let blows = this.item.getFlag("wfrp4e", "blows") || 0 +let difficulties = Object.keys(game.wfrp4e.config.difficultyLabels) + +blows = Math.clamped(blows, 0, difficulties.length - 1) +if (this.item.system.protects[args.opposedTest.result.hitloc.value]) +{ + let difficulty = difficulties[blows]; + this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields: {difficulty}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => { + await test.roll(); + if (test.failed) + { + this.script.scriptMessage(`${this.actor.name} must break from combat and flee until they pass a Challenging (+0) Willpower Test`); + this.item.setFlag("wfrp4e", "failedCool", true); + } + }) +} \ No newline at end of file diff --git a/reference_scripts/OicQSEVZBbqLtrcf.js b/reference_scripts/OicQSEVZBbqLtrcf.js new file mode 100644 index 0000000..796995b --- /dev/null +++ b/reference_scripts/OicQSEVZBbqLtrcf.js @@ -0,0 +1,4 @@ +let choice = await ItemDialog.create(this.actor.itemTypes.critical, (this.effect.sourceTest.result.overcast.usage.other.current || 1), "Choose the Critical Wounds to heal (cannot reattach body parts)") + +this.script.scriptMessage(`Healed ${choice.map(i => i.name).join(`, `)}`); +this.actor.deleteEmbeddedDocuments("Item", choice.map(i => i.id)) \ No newline at end of file diff --git a/reference_scripts/OnkEe4ISru1hjJWP.js b/reference_scripts/OnkEe4ISru1hjJWP.js new file mode 100644 index 0000000..5631383 --- /dev/null +++ b/reference_scripts/OnkEe4ISru1hjJWP.js @@ -0,0 +1 @@ +this.actor.flags.useless[this.item.system.location.key] = true; \ No newline at end of file diff --git a/reference_scripts/Op88kMtimSEWlY2h.js b/reference_scripts/Op88kMtimSEWlY2h.js new file mode 100644 index 0000000..3fd9036 --- /dev/null +++ b/reference_scripts/Op88kMtimSEWlY2h.js @@ -0,0 +1,10 @@ +if (this.item.system.quantity.value) +{ + this.item.system.reduceQuantity(); + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + actor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/OqLKL0PiCvYH2QxW.js b/reference_scripts/OqLKL0PiCvYH2QxW.js new file mode 100644 index 0000000..1641e71 --- /dev/null +++ b/reference_scripts/OqLKL0PiCvYH2QxW.js @@ -0,0 +1,13 @@ +if (args.test.options.wallcrawler) +{ + if (parseInt(args.test.result.SL) < 0 || args.test.failed) + { + if (parseInt(args.test.result.SL) < 0) + { + args.test.result.SL = "+0"; + args.test.result.description = game.i18n.localize("ROLL.MarginalSuccess"); + } + 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/reference_scripts/OqxeuZfZDfm9ax6h.js b/reference_scripts/OqxeuZfZDfm9ax6h.js new file mode 100644 index 0000000..cf5f9ce --- /dev/null +++ b/reference_scripts/OqxeuZfZDfm9ax6h.js @@ -0,0 +1 @@ +this.actor.system.status.addArmour(1, {locations : "head", source : this.effect}) \ No newline at end of file diff --git a/reference_scripts/OvIELZLvnlN2H2uw.js b/reference_scripts/OvIELZLvnlN2H2uw.js new file mode 100644 index 0000000..73a23e7 --- /dev/null +++ b/reference_scripts/OvIELZLvnlN2H2uw.js @@ -0,0 +1,11 @@ +args.update({light : { + "dim": 2, + "bright": 1, + "alpha": 0.5, + "animation": { + "speed": 4, + "intensity": 4, + "type": "pulse", + }, + "color": "#949bff", +}}); \ No newline at end of file diff --git a/reference_scripts/OxsBnnVI3Smpknpb.js b/reference_scripts/OxsBnnVI3Smpknpb.js new file mode 100644 index 0000000..519a2a2 --- /dev/null +++ b/reference_scripts/OxsBnnVI3Smpknpb.js @@ -0,0 +1,5 @@ +if (this.actor.status.advantage.value && !this.actor.sameSideAs(this.effect.sourceActor)) +{ + this.actor.modifyAdvantage(-1); + this.script.scriptNotification(`${this.actor.name} loses 1 Advantage`); +} \ No newline at end of file diff --git a/reference_scripts/Oz7pWF9mEc1pQypj.js b/reference_scripts/Oz7pWF9mEc1pQypj.js new file mode 100644 index 0000000..c206691 --- /dev/null +++ b/reference_scripts/Oz7pWF9mEc1pQypj.js @@ -0,0 +1,3 @@ +let roll = await new Roll("1d10").roll(); +roll.toMessage({flavor : this.effect.name, speaker : {alias : this.actor.prototypeToken.name}}) +this.actor.addCondition("stunned", roll.total) \ No newline at end of file diff --git a/reference_scripts/P29tT1eMMdAw3CPF.js b/reference_scripts/P29tT1eMMdAw3CPF.js new file mode 100644 index 0000000..28be2ef --- /dev/null +++ b/reference_scripts/P29tT1eMMdAw3CPF.js @@ -0,0 +1,12 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.3S4OYOZLauXctmev") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) + + +let 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) +{ + this.actor.addCondition("unconscious") +} \ No newline at end of file diff --git a/reference_scripts/PBW6IZtwawNHxB6y.js b/reference_scripts/PBW6IZtwawNHxB6y.js new file mode 100644 index 0000000..f0a42aa --- /dev/null +++ b/reference_scripts/PBW6IZtwawNHxB6y.js @@ -0,0 +1 @@ +return args.options.dodge && this.actor.isMounted \ No newline at end of file diff --git a/reference_scripts/PI1QNaKFeqood6d7.js b/reference_scripts/PI1QNaKFeqood6d7.js new file mode 100644 index 0000000..dcae646 --- /dev/null +++ b/reference_scripts/PI1QNaKFeqood6d7.js @@ -0,0 +1,15 @@ +if (args.attackerTest.weapon && args.defenderTest.weapon) +{ + + let attackerReach = game.wfrp4e.config.reachNum[args.attackerTest.weapon.reach.value] + let defenderReach = game.wfrp4e.config.reachNum[args.defenderTest.weapon.reach.value] + + if (attackerReach == defenderReach) + attackerReach = attackerReach < 7 ? attackerReach + 1 : attackerReach + + attackerReach = game.wfrp4e.utility.findKey(attackerReach, game.wfrp4e.config.reachNum) + defenderReach = game.wfrp4e.utility.findKey(defenderReach, game.wfrp4e.config.reachNum) + + args.attackerTest.weapon.reach.value = attackerReach + args.defenderTest.weapon.reach.value = defenderReach +} \ No newline at end of file diff --git a/reference_scripts/PMISUsaEDBA7D3od.js b/reference_scripts/PMISUsaEDBA7D3od.js new file mode 100644 index 0000000..d9cd2ce --- /dev/null +++ b/reference_scripts/PMISUsaEDBA7D3od.js @@ -0,0 +1,33 @@ +// After consumption, the user gains the Magic Resistance 3 Creature Trait, +// reducing the SL of any spell affecting it by 3. +// This effect lasts for one hour. +const hasMagicResistance = this.actor.has("Magic Resistance") + +if (hasMagicResistance === undefined) { + fromUuid("Compendium.wfrp4e-core.items.yrkI7ATjqLPDTFmZ").then(trait => { + let traitItem = trait.toObject() + traitItem.system.specification.value = 2 + this.actor.createEmbeddedDocuments("Item", [traitItem], {fromEffect: this.effect.id}) + }) + this.script.scriptMessage(`

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

`, {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) +} + +if (hasMagicResistance) { + // 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. + 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.

` + + // Resist toxic effect + this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { + fields: {difficulty: "challenging"} + }).then(async test => { + await test.roll() + + // If they fail ... + if (!test.succeeded) { + 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.

+

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.

` + this.actor.addCondition("poisoned", 1) + } + this.script.scriptMessage(msg, {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) + }) +} diff --git a/reference_scripts/PVjaKAHTKDA0rA9J.js b/reference_scripts/PVjaKAHTKDA0rA9J.js new file mode 100644 index 0000000..8942127 --- /dev/null +++ b/reference_scripts/PVjaKAHTKDA0rA9J.js @@ -0,0 +1,2 @@ +let test = await this.actor.setupSkill("Dodge", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/PdClojv7yNgQpOUc.js b/reference_scripts/PdClojv7yNgQpOUc.js new file mode 100644 index 0000000..071f833 --- /dev/null +++ b/reference_scripts/PdClojv7yNgQpOUc.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Endurance"); \ No newline at end of file diff --git a/reference_scripts/PeZYj8b0vedyJj00.js b/reference_scripts/PeZYj8b0vedyJj00.js new file mode 100644 index 0000000..51a0a44 --- /dev/null +++ b/reference_scripts/PeZYj8b0vedyJj00.js @@ -0,0 +1,14 @@ +// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor + +let mainEffect = this.item.effects.contents[0]; +if (mainEffect.name.includes("(Lore)")) +{ + let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choose Lore"); + if (choice.length) + { + mainEffect.update({name : mainEffect.name.replace("Lore", choice[0].name)}) + this.item.update({name : this.item.name += ` (${choice[0].name})`}) + } +} + +this.effect.delete(); \ No newline at end of file diff --git a/reference_scripts/Pg9C6nJX5QHIdqa9.js b/reference_scripts/Pg9C6nJX5QHIdqa9.js new file mode 100644 index 0000000..f7d625b --- /dev/null +++ b/reference_scripts/Pg9C6nJX5QHIdqa9.js @@ -0,0 +1 @@ +return !args.item?.system.attackType diff --git a/reference_scripts/Ph3TdQw1lGiFr049.js b/reference_scripts/Ph3TdQw1lGiFr049.js new file mode 100644 index 0000000..f7e4852 --- /dev/null +++ b/reference_scripts/Ph3TdQw1lGiFr049.js @@ -0,0 +1,19 @@ + if (!args.test.context.phantasmal && + (this.actor.isOpposing || args.test.context.defending) && + args.test.result.roll % 11 == 0 && + args.test.succeeded && + ["Language (Magick)", "Dodge"].includes(args.test.item?.name)) + { + args.test.context.phantasmal = true; // Flag so items aren't readded if test is edited + let text = `${this.effect.name}: Adding Unstable and Ward` + args.test.result.other.push(text) + this.script.scriptNotification(text); + + let ward = await fromUuid("Compendium.wfrp4e-core.items.Bvd2aZ0gQUXHfCTh") + let wardData = ward.toObject(); + wardData.system.specification.value = 9; + + let unstable = await fromUuid("Compendium.wfrp4e-core.items.D0ImWEIMSDgElsnl") + let unstableData = unstable.toObject(); + this.actor.createEmbeddedDocuments("Item", [wardData, unstableData], {fromEffect: this.effect.id}) + } diff --git a/reference_scripts/PjRxGuUDKGmSmVDc.js b/reference_scripts/PjRxGuUDKGmSmVDc.js new file mode 100644 index 0000000..dd06719 --- /dev/null +++ b/reference_scripts/PjRxGuUDKGmSmVDc.js @@ -0,0 +1,5 @@ +fromUuid("Compendium.wfrp4e-core.items.EO05HX7jql0g605A").then(item => { + item = item.toObject() + item.system.specification.value = this.actor.characteristics.ag.value + this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) +}) \ No newline at end of file diff --git a/reference_scripts/PmELrzD3RmF9qKkO.js b/reference_scripts/PmELrzD3RmF9qKkO.js new file mode 100644 index 0000000..3d5c0b3 --- /dev/null +++ b/reference_scripts/PmELrzD3RmF9qKkO.js @@ -0,0 +1,9 @@ +if (this.item.system.specification.value == "Size") +{ + let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.actorSizes, this.item.img), 1, "Choose Size"); + if (choice[0]) + { + this.item.updateSource({"system.specification.value" : choice[0].name}) + this.effect.updateSource({name : this.effect.name + ` (${choice[0].name})`}) + } +} \ No newline at end of file diff --git a/reference_scripts/PoNnT5EqvLj2r5yf.js b/reference_scripts/PoNnT5EqvLj2r5yf.js new file mode 100644 index 0000000..af693bc --- /dev/null +++ b/reference_scripts/PoNnT5EqvLj2r5yf.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.OutdoorSurvival") && args.skill?.name != game.i18n.localize("NAME.Track"); \ No newline at end of file diff --git a/reference_scripts/PwqTmw7rsG8hzqCS.js b/reference_scripts/PwqTmw7rsG8hzqCS.js new file mode 100644 index 0000000..6ce47bf --- /dev/null +++ b/reference_scripts/PwqTmw7rsG8hzqCS.js @@ -0,0 +1,10 @@ +if (args.test.result.critical && args.test.result.roll % 10 == 0) +{ + game.wfrp4e.tables.findTable("knuckleduster-diseases").roll().then(roll => { + let results = roll.results[0] + + this.script.scriptMessage(`${this.actor.name} contracts @UUID[Compendium.${results.documentCollection}.${results.documentId}]{${results.text}}`, {blind : true, whisper: ChatMessage.getWhisperRecipients("GM") }) + }) + + } + diff --git a/reference_scripts/Q1trEhtqjIiDvFPF.js b/reference_scripts/Q1trEhtqjIiDvFPF.js new file mode 100644 index 0000000..edff223 --- /dev/null +++ b/reference_scripts/Q1trEhtqjIiDvFPF.js @@ -0,0 +1 @@ +args.prefillModifiers.modifier -= 10 * getProperty(this.effect, 'flags.wfrp4e.value') \ No newline at end of file diff --git a/reference_scripts/Q4EQgP4gZR8TTm7S.js b/reference_scripts/Q4EQgP4gZR8TTm7S.js new file mode 100644 index 0000000..2ae696c --- /dev/null +++ b/reference_scripts/Q4EQgP4gZR8TTm7S.js @@ -0,0 +1,9 @@ +let penalty = 0 +if (args.item?.system.attackType) +{ + penalty -= 30 +} +if (args.actor.has("Second Sight", "talent")) + penalty += 10 + +args.prefillModifiers.modifier += penalty \ No newline at end of file diff --git a/reference_scripts/Q68WiUWY7GxiXBbT.js b/reference_scripts/Q68WiUWY7GxiXBbT.js new file mode 100644 index 0000000..536d1ae --- /dev/null +++ b/reference_scripts/Q68WiUWY7GxiXBbT.js @@ -0,0 +1,5 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.9GNpAqgsKzxZKJpp") +let data = item.toObject(); +data.system.specification.value = "When Alone"; +data.effects[0].disabled = true; +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Q9EmlWmuDac83cJw.js b/reference_scripts/Q9EmlWmuDac83cJw.js new file mode 100644 index 0000000..65e9e2e --- /dev/null +++ b/reference_scripts/Q9EmlWmuDac83cJw.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Climb") || args.skill?.name?.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/QF8LanKNoAlTkQG0.js b/reference_scripts/QF8LanKNoAlTkQG0.js new file mode 100644 index 0000000..bb333fb --- /dev/null +++ b/reference_scripts/QF8LanKNoAlTkQG0.js @@ -0,0 +1 @@ +this.actor.system.status.encumbrance.max += 2 \ No newline at end of file diff --git a/reference_scripts/QKTA2TqZ77pvHWSJ.js b/reference_scripts/QKTA2TqZ77pvHWSJ.js new file mode 100644 index 0000000..1a94aec --- /dev/null +++ b/reference_scripts/QKTA2TqZ77pvHWSJ.js @@ -0,0 +1,9 @@ + this.actor.getActiveTokens().forEach(t => t.document.update({light : { + "dim": 0, + "bright": 0, + "alpha": 0.5, + "animation": { + "type": "", + }, + "color": "#000000", + }})); \ No newline at end of file diff --git a/reference_scripts/QKjR6P1WEHXf4K77.js b/reference_scripts/QKjR6P1WEHXf4K77.js new file mode 100644 index 0000000..1fee3fb --- /dev/null +++ b/reference_scripts/QKjR6P1WEHXf4K77.js @@ -0,0 +1 @@ +args.fields.slBonus -= 2 diff --git a/reference_scripts/QPVVDPcJ4Xi5FmQl.js b/reference_scripts/QPVVDPcJ4Xi5FmQl.js new file mode 100644 index 0000000..340975c --- /dev/null +++ b/reference_scripts/QPVVDPcJ4Xi5FmQl.js @@ -0,0 +1,9 @@ +if(this.actor.hasCondition("fatigued") && args.opposedTest.result.hitloc.value == "head" && (args.opposedTest.attackerTest.result.critical || args.actor.status.wounds.value - args.totalWoundLoss < 0)) +{ + let 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("unconscious") + } +} \ No newline at end of file diff --git a/reference_scripts/QQ2gHThZHdO4yLLX.js b/reference_scripts/QQ2gHThZHdO4yLLX.js new file mode 100644 index 0000000..abb25c3 --- /dev/null +++ b/reference_scripts/QQ2gHThZHdO4yLLX.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Swim"); \ No newline at end of file diff --git a/reference_scripts/QQPiREc50HT5W2Tr.js b/reference_scripts/QQPiREc50HT5W2Tr.js new file mode 100644 index 0000000..7190682 --- /dev/null +++ b/reference_scripts/QQPiREc50HT5W2Tr.js @@ -0,0 +1,2 @@ +if (args.item.type == "weapon" && args.item.weaponGroup.value == "brawling") + args.item.damage.value += " + 1" \ No newline at end of file diff --git a/reference_scripts/QRSACifDrvojIXHB.js b/reference_scripts/QRSACifDrvojIXHB.js new file mode 100644 index 0000000..0527702 --- /dev/null +++ b/reference_scripts/QRSACifDrvojIXHB.js @@ -0,0 +1,11 @@ +if (!this.actor.effects.find(e => e.isCondition)) +{ + return this.script.scriptNotification("No Conditions on this Actor") +} + +let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choose a Condition") + +if (choice[0]) +{ + this.actor.removeCondition(choice[0].conditionId) +} diff --git a/reference_scripts/QaGNsqKm2Nf0zGVm.js b/reference_scripts/QaGNsqKm2Nf0zGVm.js new file mode 100644 index 0000000..3fc40b5 --- /dev/null +++ b/reference_scripts/QaGNsqKm2Nf0zGVm.js @@ -0,0 +1 @@ +return ["t", "int", "wp", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/QbIYnshWeP1U8SUy.js b/reference_scripts/QbIYnshWeP1U8SUy.js new file mode 100644 index 0000000..d6c5e61 --- /dev/null +++ b/reference_scripts/QbIYnshWeP1U8SUy.js @@ -0,0 +1,2 @@ +args.applyAP = false; +args.applyTB = false; \ No newline at end of file diff --git a/reference_scripts/Qgn92fZyc3Psn8QJ.js b/reference_scripts/Qgn92fZyc3Psn8QJ.js new file mode 100644 index 0000000..fcfd3fd --- /dev/null +++ b/reference_scripts/Qgn92fZyc3Psn8QJ.js @@ -0,0 +1,10 @@ +if (args.test.options.useOnesAttractive && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) +{ + +let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) +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.result.other.push(`${this.effect.name}: Used unit dice as SL`) +} \ No newline at end of file diff --git a/reference_scripts/Qk7t2l5ep9RDVpgE.js b/reference_scripts/Qk7t2l5ep9RDVpgE.js new file mode 100644 index 0000000..80de579 --- /dev/null +++ b/reference_scripts/Qk7t2l5ep9RDVpgE.js @@ -0,0 +1 @@ +args.options.diceman= true; \ No newline at end of file diff --git a/reference_scripts/QoEOxRruQXYrZrv3.js b/reference_scripts/QoEOxRruQXYrZrv3.js new file mode 100644 index 0000000..c084829 --- /dev/null +++ b/reference_scripts/QoEOxRruQXYrZrv3.js @@ -0,0 +1,17 @@ +let filters = [ + { + property : "type", + value : "skill" + }, + { + property : "name", + value : /Melee/gm, + regex: true + } +] + +let items = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 2, "Choose 2 Skills to add +20") +items = items.map(i => i.toObject()) +items.forEach(i => i.system.advances.value = 20) + +this.actor.createEmbeddedDocuments("Item", items); \ No newline at end of file diff --git a/reference_scripts/QqkE7rlqhkeRohFD.js b/reference_scripts/QqkE7rlqhkeRohFD.js new file mode 100644 index 0000000..896b9a2 --- /dev/null +++ b/reference_scripts/QqkE7rlqhkeRohFD.js @@ -0,0 +1 @@ +return !(["cast", "channelling"].includes(args.type) && this.actor.hasCondition("fatigued")) \ No newline at end of file diff --git a/reference_scripts/QqybHxNCzPEzG1Qh.js b/reference_scripts/QqybHxNCzPEzG1Qh.js new file mode 100644 index 0000000..05952e9 --- /dev/null +++ b/reference_scripts/QqybHxNCzPEzG1Qh.js @@ -0,0 +1 @@ +return args.fields.dualWielding || args.options.dualWieldOffhand \ No newline at end of file diff --git a/reference_scripts/QwHoqu2oO8QO8Mad.js b/reference_scripts/QwHoqu2oO8QO8Mad.js new file mode 100644 index 0000000..a5972f6 --- /dev/null +++ b/reference_scripts/QwHoqu2oO8QO8Mad.js @@ -0,0 +1,3 @@ +let content = `${this.effect.name}: All targets engaged with ${this.actor.prototypeToken.name} take [[/r 1d10]] Damage, modified by TB and AP.` + +this.script.scriptMessage(content) \ No newline at end of file diff --git a/reference_scripts/R32U01LBjBrK1pns.js b/reference_scripts/R32U01LBjBrK1pns.js new file mode 100644 index 0000000..4816313 --- /dev/null +++ b/reference_scripts/R32U01LBjBrK1pns.js @@ -0,0 +1,33 @@ + const templateMap = { + 'P2e7Yx98bK3u110a' : "", + 'iuMp3KLaMT2WCmie' : "Xp4r2KUhqfjak8zq", + 'RBuYcT5tppwcmnC5' : "wYN19h3WVF1yOVq2", + 'vcGpNwNbhvfzVveQ' : "ac5ClOuaYtzOYyWp", + 'jmhKZy0w9TzkEK9c' : "IS3LTdTuay6uRHUq", + '9Byj6k7SmdTYis2V' : "LjMlx99gBGeRJUQu", + 'laJwc2l9tzJPgaaJ' : "x5wpMprsObuqMCYg", + } + let template = (await game.wfrp4e.tables.rollTable("hireling-templates", {hideDSN: true})).object; + let physicalQuirk = (await game.wfrp4e.tables.rollTable("physical-quirks", {hideDSN: true})).text; + let workEthic = (await game.wfrp4e.tables.rollTable("work-ethic", {hideDSN: true})).text; + let personalityQuirk = (await game.wfrp4e.tables.rollTable("personality-quirks", {hideDSN: true})).text; + + + let templateItem = await game.wfrp4e.utility.findItemId(templateMap[template._id]); + + let bio = + ` +

Template: ${template.text}

+

Phsyical Quirk: ${physicalQuirk}

+

Work Ethic: ${workEthic}

+

Personality Quirk: ${personalityQuirk}

+ ` + + this.script.scriptMessage(bio, {whisper : ChatMessage.getWhisperRecipients("GM")}) + + await this.actor.update({"system.details.gmnotes.value" : bio}) + + if (templateItem) + { + this.actor.createEmbeddedDocuments("Item", [templateItem.toObject()]) + } \ No newline at end of file diff --git a/reference_scripts/R5dOZWFxE2n6tooX.js b/reference_scripts/R5dOZWFxE2n6tooX.js new file mode 100644 index 0000000..d6c0f61 --- /dev/null +++ b/reference_scripts/R5dOZWFxE2n6tooX.js @@ -0,0 +1 @@ +return this.item.system.usesLocation(args.weapon) \ No newline at end of file diff --git a/reference_scripts/R6SnyF3y4Vsq6oga.js b/reference_scripts/R6SnyF3y4Vsq6oga.js new file mode 100644 index 0000000..9cb3f07 --- /dev/null +++ b/reference_scripts/R6SnyF3y4Vsq6oga.js @@ -0,0 +1,8 @@ +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 +// 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 diff --git a/reference_scripts/R95pDZMHnD9iHAl8.js b/reference_scripts/R95pDZMHnD9iHAl8.js new file mode 100644 index 0000000..903d7c3 --- /dev/null +++ b/reference_scripts/R95pDZMHnD9iHAl8.js @@ -0,0 +1 @@ +return args.skill?.name.includes(this.item.system.tests.value); \ No newline at end of file diff --git a/reference_scripts/RDtJXji3hgcKnEBk.js b/reference_scripts/RDtJXji3hgcKnEBk.js new file mode 100644 index 0000000..84cd8d9 --- /dev/null +++ b/reference_scripts/RDtJXji3hgcKnEBk.js @@ -0,0 +1,33 @@ +let as = (await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS")).toObject(); +let hv = (await fromUuid("Compendium.wfrp4e-core.items.Item.Nj3tC8A5fZ3zEdMR")).toObject(); +let ms = (await fromUuid("Compendium.wfrp4e-core.items.Item.6w30u0VPsAicrqb5")).toObject(); +let ss = (await fromUuid("Compendium.wfrp4e-core.items.Item.OEjUvJKi0xmBwbS2")).toObject(); + +as.name += " (Sight)"; + +let roll = (await new Roll("1d10").roll()); +roll.toMessage(this.script.getChatData()) +let items = [] + +if (roll.total <= 2) +{ + items = items.concat([as]); +} +else if (roll.total <= 4) +{ + items = items.concat([hv]); +} +else if (roll.total <= 6) +{ + items = items.concat([ms]); +} +else if (roll.total <= 8) +{ + items = items.concat([ss]); +} +else if (roll.total <= 10) +{ + items = items.concat([as, hv, ms, ss]); +} + +this.actor.createEmbeddedDocuments("Item", items, {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/RHyBLYT5oHf7EPnG.js b/reference_scripts/RHyBLYT5oHf7EPnG.js new file mode 100644 index 0000000..0eeaadd --- /dev/null +++ b/reference_scripts/RHyBLYT5oHf7EPnG.js @@ -0,0 +1,21 @@ +let skills = this.actor.itemTypes.skill.filter(i => i.name.includes(game.i18n.localize("NAME.Melee"))) + +let skill = await ItemDialog.create(skills, 1, "Select the skill used by the weapon") +let group = game.wfrp4e.utility.extractParenthesesText(skill[0]?.name) +let groupKey = game.wfrp4e.utility.findKey(group, game.wfrp4e.config.weaponGroups) + +let weapon = { + name : this.effect.name, + type : "weapon", + img : this.effect.img, + system : { + "damage.value" : this.actor.system.characteristics.wp.bonus, + "weaponGroup.value" : groupKey || "basic", + "twohanded.value" : ["polearm", "twohanded"].includes(groupKey), + "reach.value" : "average", + "qualities.value" : [{name : "magical"}] + }, +} + +Item.implementation.create(foundry.utils.expandObject(weapon), {parent : this.actor, fromEffect : this.effect.id}) +this.script.scriptNotification("Item created. Further customization must be done manually within the Item's sheet"); \ No newline at end of file diff --git a/reference_scripts/RI8crJxeD8JLDwMh.js b/reference_scripts/RI8crJxeD8JLDwMh.js new file mode 100644 index 0000000..0a98874 --- /dev/null +++ b/reference_scripts/RI8crJxeD8JLDwMh.js @@ -0,0 +1 @@ +return args.weapon?.system?.weaponGroup?.value != "fencing" \ No newline at end of file diff --git a/reference_scripts/RJpglw5eVRM1f9t0.js b/reference_scripts/RJpglw5eVRM1f9t0.js new file mode 100644 index 0000000..ab32d24 --- /dev/null +++ b/reference_scripts/RJpglw5eVRM1f9t0.js @@ -0,0 +1 @@ +args.wounds *= 5 \ No newline at end of file diff --git a/reference_scripts/RKIFGN583PQnqHGk.js b/reference_scripts/RKIFGN583PQnqHGk.js new file mode 100644 index 0000000..c0633f0 --- /dev/null +++ b/reference_scripts/RKIFGN583PQnqHGk.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) +{ + args.actor.addCondition("bleeding", 2) + this.script.scriptMessage("Gained 2 Bleeding Conditions") +} \ No newline at end of file diff --git a/reference_scripts/RNHrSTfMLXm5sXkC.js b/reference_scripts/RNHrSTfMLXm5sXkC.js new file mode 100644 index 0000000..c5b8e70 --- /dev/null +++ b/reference_scripts/RNHrSTfMLXm5sXkC.js @@ -0,0 +1 @@ +return ["ws", "bs", "s", "ag"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/RNr9CwyvLhlnwD2h.js b/reference_scripts/RNr9CwyvLhlnwD2h.js new file mode 100644 index 0000000..2dbcde4 --- /dev/null +++ b/reference_scripts/RNr9CwyvLhlnwD2h.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Sail")); \ No newline at end of file diff --git a/reference_scripts/ROXCqAFSTLouJniL.js b/reference_scripts/ROXCqAFSTLouJniL.js new file mode 100644 index 0000000..dcc969a --- /dev/null +++ b/reference_scripts/ROXCqAFSTLouJniL.js @@ -0,0 +1,7 @@ +if (args.test.spell.name == "Warp Lightning") +{ + if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis) + { + this.script.scriptMessage(`${this.item.name} Overloads!`) + } +} \ No newline at end of file diff --git a/reference_scripts/RSsGiDFibuqg3sHr.js b/reference_scripts/RSsGiDFibuqg3sHr.js new file mode 100644 index 0000000..9132550 --- /dev/null +++ b/reference_scripts/RSsGiDFibuqg3sHr.js @@ -0,0 +1,15 @@ +let diseaseIndex = game.packs +.filter(i => i.metadata.type == "Item") +.reduce((acc, pack) => acc.concat(pack.index.contents), []) +.filter(i => i.type == "disease") +.map(i => { + i.id = i._id + return i +}) + +let choice = await ItemDialog.create(diseaseIndex , 1, "Choose a Disease") + +if (choice[0]) +{ + await this.item.updateSource({"system.specification.value" : choice[0].name}) +} \ No newline at end of file diff --git a/reference_scripts/RZlMkxJz5apn0mUj.js b/reference_scripts/RZlMkxJz5apn0mUj.js new file mode 100644 index 0000000..74fe1bc --- /dev/null +++ b/reference_scripts/RZlMkxJz5apn0mUj.js @@ -0,0 +1 @@ +return args.item?.system.attackType != "ranged" \ No newline at end of file diff --git a/reference_scripts/RprZWlnopSqZt7KZ.js b/reference_scripts/RprZWlnopSqZt7KZ.js new file mode 100644 index 0000000..523491c --- /dev/null +++ b/reference_scripts/RprZWlnopSqZt7KZ.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/RqWnhnwFxaHubgiA.js b/reference_scripts/RqWnhnwFxaHubgiA.js new file mode 100644 index 0000000..a9b12cd --- /dev/null +++ b/reference_scripts/RqWnhnwFxaHubgiA.js @@ -0,0 +1,3 @@ +await args.actor.addCondition("blinded"); +await args.actor.addCondition("deafened"); +await args.actor.addCondition("stunned"); \ No newline at end of file diff --git a/reference_scripts/RrchOMpEdIvceJxl.js b/reference_scripts/RrchOMpEdIvceJxl.js new file mode 100644 index 0000000..300050b --- /dev/null +++ b/reference_scripts/RrchOMpEdIvceJxl.js @@ -0,0 +1 @@ +return args.skill?.name == "Stealth (Rural)" \ No newline at end of file diff --git a/reference_scripts/RuW1PWUFxIbbSlIm.js b/reference_scripts/RuW1PWUFxIbbSlIm.js new file mode 100644 index 0000000..c333e53 --- /dev/null +++ b/reference_scripts/RuW1PWUFxIbbSlIm.js @@ -0,0 +1 @@ +return !["t", "wp", "ag", "i", "int"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/RvipIYj9H7n4UDMe.js b/reference_scripts/RvipIYj9H7n4UDMe.js new file mode 100644 index 0000000..4ae90e5 --- /dev/null +++ b/reference_scripts/RvipIYj9H7n4UDMe.js @@ -0,0 +1,84 @@ + let characteristics = { + "ws" : -10, + "bs" : -10, + "s" : -5, + "t" : -5, + "i" : -10, + "ag" : -10, + "dex" : -10, + "int" : 0, + "wp" : 0, + "fel" : 0 + } + let skills = [] + let skillAdvancements = [] + let talents = [] + let trappings = [] + let items = [] + + let updateObj = this.actor.toObject(); + + for (let ch in characteristics) + { + updateObj.system.characteristics[ch].modifier += characteristics[ch]; + } + + for (let index = 0; index < skills.length; index++) + { + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } + } + + for (let talent of talents) + { + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } + } + + for (let trapping of trappings) + { + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } + } + + + await this.actor.update(updateObj) + this.actor.createEmbeddedDocuments("Item", items); + + function equip(item) + { + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true + } \ No newline at end of file diff --git a/reference_scripts/S1QihXuvdEVzeRtB.js b/reference_scripts/S1QihXuvdEVzeRtB.js new file mode 100644 index 0000000..0194c09 --- /dev/null +++ b/reference_scripts/S1QihXuvdEVzeRtB.js @@ -0,0 +1,40 @@ +let dice = await new Roll("1d10").roll() +let roll = dice.total +let talent +let message +let modifier = 0 + +if (roll <= 3) +{ + item = await fromUuid("Compendium.wfrp4e-core.items.mNoCuaVbFBflfO6X") +} + +else if (roll <= 6) +{ + item = await fromUuid("Compendium.wfrp4e-core.items.OEjUvJKi0xmBwbS2") + modifier = -3 +} + +else if (roll <= 9) +{ + item = await fromUuid("Compendium.wfrp4e-core.items.mdPGZsn2396dEpOf") + modifier = -3 +} + +else if (roll = 10) +{ + item = await fromUuid("Compendium.wfrp4e-core.items.qdMbxW09FUoYBzmB") + modifier = -5 +} + +message = `${roll} Rolled, gain ${item.name}, ${modifier} Strength` +dice.toMessage(this.script.getChatData()) + +let changes = duplicate(this.effect.changes) +changes[0].value = modifier + +this.effect.updateSource({changes}) + +await this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}) + +this.script.scriptNotification(message) \ No newline at end of file diff --git a/reference_scripts/S3DCTw4yJ85eSaKp.js b/reference_scripts/S3DCTw4yJ85eSaKp.js new file mode 100644 index 0000000..666ee45 --- /dev/null +++ b/reference_scripts/S3DCTw4yJ85eSaKp.js @@ -0,0 +1 @@ +this.actor.setupCharacteristic("s", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(test => test.roll()) \ No newline at end of file diff --git a/reference_scripts/S3Dev4hleOYqDNe9.js b/reference_scripts/S3Dev4hleOYqDNe9.js new file mode 100644 index 0000000..82a4f59 --- /dev/null +++ b/reference_scripts/S3Dev4hleOYqDNe9.js @@ -0,0 +1,16 @@ +if (args.test.options.healWounds) { + if (args.test.succeeded) + { + let wounds = this.actor.characteristics.int.bonus + Number(args.test.result.SL) + if (args.test.options.fieldDressing && args.test.result.reversed) + { + wounds = this.actor.characteristics.int.bonus + Math.min(1, Number(args.test.result.SL)) + } + args.test.result.woundsHealed = wounds + args.test.result.other.push(`${this.actor.name} healed ${wounds} wounds of the patient.`) + } + else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0) + { + args.test.result.other.push(`The patient contracts a @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Minor Infection}.`) + } +} \ No newline at end of file diff --git a/reference_scripts/S4793DLFhjMxpM8x.js b/reference_scripts/S4793DLFhjMxpM8x.js new file mode 100644 index 0000000..4f2f739 --- /dev/null +++ b/reference_scripts/S4793DLFhjMxpM8x.js @@ -0,0 +1 @@ +return !["ws", "bs"].includes(args.characteristic) && !args.item?.system.attackType && !args.options.dodge \ No newline at end of file diff --git a/reference_scripts/S6tUyFJvGMV19mvP.js b/reference_scripts/S6tUyFJvGMV19mvP.js new file mode 100644 index 0000000..867c8d8 --- /dev/null +++ b/reference_scripts/S6tUyFJvGMV19mvP.js @@ -0,0 +1 @@ +this.actor.status.addArmour(2, {source: this.effect}) \ No newline at end of file diff --git a/reference_scripts/S95QqpX1cZyIVCPy.js b/reference_scripts/S95QqpX1cZyIVCPy.js new file mode 100644 index 0000000..3011ed7 --- /dev/null +++ b/reference_scripts/S95QqpX1cZyIVCPy.js @@ -0,0 +1,5 @@ +if (parseInt(this.item.system.specification.value) > 0) +{ + this.actor.system.status.ward.value = parseInt(this.item.system.specification.value); +} + diff --git a/reference_scripts/SGr50Hq1AHIEzIFN.js b/reference_scripts/SGr50Hq1AHIEzIFN.js new file mode 100644 index 0000000..324b7a2 --- /dev/null +++ b/reference_scripts/SGr50Hq1AHIEzIFN.js @@ -0,0 +1,6 @@ +let choice = await ItemDialog.create(ItemDialog.objectToArray({ + int : game.wfrp4e.config.characteristics.int, + fel : game.wfrp4e.config.characteristics.fel +}, this.effect.img), 1, "Choose Characteristic"); + +this.effect.updateSource({"flags.wfrp4e.characteristic" : choice[0].id}) \ No newline at end of file diff --git a/reference_scripts/SLy1Fs3oXcHgFgjK.js b/reference_scripts/SLy1Fs3oXcHgFgjK.js new file mode 100644 index 0000000..4add629 --- /dev/null +++ b/reference_scripts/SLy1Fs3oXcHgFgjK.js @@ -0,0 +1,5 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn") +let data = item.toObject(); +let value = getProperty(this.effect.sourceTest, "result.overcast.usage.other.current") || 1 +data.system.specification.value = value +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/SO4Aa9argKbuO9rQ.js b/reference_scripts/SO4Aa9argKbuO9rQ.js new file mode 100644 index 0000000..2af913b --- /dev/null +++ b/reference_scripts/SO4Aa9argKbuO9rQ.js @@ -0,0 +1 @@ +args.prefillModifiers.modifier -= 20 \ No newline at end of file diff --git a/reference_scripts/SPOkFWZWziZk5b7A.js b/reference_scripts/SPOkFWZWziZk5b7A.js new file mode 100644 index 0000000..d26b8cb --- /dev/null +++ b/reference_scripts/SPOkFWZWziZk5b7A.js @@ -0,0 +1 @@ +return args.item?.system?.attackType != "melee" \ No newline at end of file diff --git a/reference_scripts/SRmfstEs278bP9Pz.js b/reference_scripts/SRmfstEs278bP9Pz.js new file mode 100644 index 0000000..4831d32 --- /dev/null +++ b/reference_scripts/SRmfstEs278bP9Pz.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/SSqGxyN9hw0HDmED.js b/reference_scripts/SSqGxyN9hw0HDmED.js new file mode 100644 index 0000000..ea4faf2 --- /dev/null +++ b/reference_scripts/SSqGxyN9hw0HDmED.js @@ -0,0 +1 @@ +this.actor.addCondition("prone"); \ No newline at end of file diff --git a/reference_scripts/SWIJjM2RCmzfr64u.js b/reference_scripts/SWIJjM2RCmzfr64u.js new file mode 100644 index 0000000..5a07e2e --- /dev/null +++ b/reference_scripts/SWIJjM2RCmzfr64u.js @@ -0,0 +1,6 @@ +if (args.test.result.hitloc.result == "head") +{ + args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 40 : 40 + + args.test.result.critical += ` (+${args.test.result.critModifier})` +} diff --git a/reference_scripts/SrCHfOJFZwDickqa.js b/reference_scripts/SrCHfOJFZwDickqa.js new file mode 100644 index 0000000..28558bc --- /dev/null +++ b/reference_scripts/SrCHfOJFZwDickqa.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "average"}}); +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("prone") +} \ No newline at end of file diff --git a/reference_scripts/StAderQaQQsxb6Rv.js b/reference_scripts/StAderQaQQsxb6Rv.js new file mode 100644 index 0000000..d361e9a --- /dev/null +++ b/reference_scripts/StAderQaQQsxb6Rv.js @@ -0,0 +1,10 @@ +let target = await game.wfrp4e.tables.rollTable("fixations") +if (target) +{ + this.script.scriptNotification(target.result); + let hatred = this.actor.items.find(i => i.getFlag("wfrp4e", "fromEffect") == this.effect.id) + if (hatred) + { + hatred.update({"system.specification.value" : target.result}) + } +} \ No newline at end of file diff --git a/reference_scripts/SvFKt9hMcFQjeILA.js b/reference_scripts/SvFKt9hMcFQjeILA.js new file mode 100644 index 0000000..52d528c --- /dev/null +++ b/reference_scripts/SvFKt9hMcFQjeILA.js @@ -0,0 +1 @@ +args.actor.addCondition("entangled", this.effect.sourceTest.result.overcast.usage.other.current) \ No newline at end of file diff --git a/reference_scripts/T5fiTzhXEQAv9Drf.js b/reference_scripts/T5fiTzhXEQAv9Drf.js new file mode 100644 index 0000000..536b32a --- /dev/null +++ b/reference_scripts/T5fiTzhXEQAv9Drf.js @@ -0,0 +1,20 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.rlDZZTj5PXjuRXa2") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key; +await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) + +let location = this.item.system.location.key; + +if (location) +{ + let dropped = this.item.system.weaponsAtLocation; + + if (dropped.length) + { + this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + for(let weapon of dropped) + { + await weapon.system.toggleEquip(); + } + } +} \ No newline at end of file diff --git a/reference_scripts/T74FEjfFrh3f6MKv.js b/reference_scripts/T74FEjfFrh3f6MKv.js new file mode 100644 index 0000000..1a4f658 --- /dev/null +++ b/reference_scripts/T74FEjfFrh3f6MKv.js @@ -0,0 +1 @@ +args.wpb = args.sb; \ No newline at end of file diff --git a/reference_scripts/TAw9vXnfyIAl5DGs.js b/reference_scripts/TAw9vXnfyIAl5DGs.js new file mode 100644 index 0000000..c6062cd --- /dev/null +++ b/reference_scripts/TAw9vXnfyIAl5DGs.js @@ -0,0 +1,11 @@ +if (this.item.system.quantity.value) +{ + game.wfrp4e.utility.postCorruptionTest("minor", this.script.getChatData()); + this.item.system.reduceQuantity(); + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + actor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/TBpNFRL5uehs0fze.js b/reference_scripts/TBpNFRL5uehs0fze.js new file mode 100644 index 0000000..be5a2fb --- /dev/null +++ b/reference_scripts/TBpNFRL5uehs0fze.js @@ -0,0 +1,10 @@ +if (this.item.system.quantity.value) +{ + this.item.system.reduceQuantity(); + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + actor.applyEffect({effectData : [this.item.effects.contents[0]]}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/TEiNj5FgkoD3YbhS.js b/reference_scripts/TEiNj5FgkoD3YbhS.js new file mode 100644 index 0000000..bcac25e --- /dev/null +++ b/reference_scripts/TEiNj5FgkoD3YbhS.js @@ -0,0 +1 @@ +this.actor.hasCondition("bleeding")?.delete() \ No newline at end of file diff --git a/reference_scripts/TGN070HeJLl3gSMY.js b/reference_scripts/TGN070HeJLl3gSMY.js new file mode 100644 index 0000000..876f760 --- /dev/null +++ b/reference_scripts/TGN070HeJLl3gSMY.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "Goes Prone" }}) +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("prone"); +} \ No newline at end of file diff --git a/reference_scripts/TNWmIkuubqBn38he.js b/reference_scripts/TNWmIkuubqBn38he.js new file mode 100644 index 0000000..8f318aa --- /dev/null +++ b/reference_scripts/TNWmIkuubqBn38he.js @@ -0,0 +1 @@ +this.effect.deleteCreatedItems(); \ No newline at end of file diff --git a/reference_scripts/TOyQLrugFGzwc5nY.js b/reference_scripts/TOyQLrugFGzwc5nY.js new file mode 100644 index 0000000..1e8b373 --- /dev/null +++ b/reference_scripts/TOyQLrugFGzwc5nY.js @@ -0,0 +1 @@ +return !(args.skill?.name.includes(game.i18n.localize("NAME.Melee")) || args.item?.isMelee || args.options.corruption); \ No newline at end of file diff --git a/reference_scripts/TQRL4mZhZohXg1Au.js b/reference_scripts/TQRL4mZhZohXg1Au.js new file mode 100644 index 0000000..2288bc8 --- /dev/null +++ b/reference_scripts/TQRL4mZhZohXg1Au.js @@ -0,0 +1,2 @@ +let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +test.roll(); \ No newline at end of file diff --git a/reference_scripts/TU2xjbJ0zFtytF3J.js b/reference_scripts/TU2xjbJ0zFtytF3J.js new file mode 100644 index 0000000..9325462 --- /dev/null +++ b/reference_scripts/TU2xjbJ0zFtytF3J.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.CharmAnimal"); \ No newline at end of file diff --git a/reference_scripts/TY0xSQ00XXyEr49r.js b/reference_scripts/TY0xSQ00XXyEr49r.js new file mode 100644 index 0000000..7b1ab7b --- /dev/null +++ b/reference_scripts/TY0xSQ00XXyEr49r.js @@ -0,0 +1 @@ +args.fields.slBonus += 1; \ No newline at end of file diff --git a/reference_scripts/TcqumwUFAL6V0cty.js b/reference_scripts/TcqumwUFAL6V0cty.js new file mode 100644 index 0000000..e7a337e --- /dev/null +++ b/reference_scripts/TcqumwUFAL6V0cty.js @@ -0,0 +1,11 @@ +if (this.item.getFlag("wfrp4e", "failedCool")) +{ + this.item.system.AP = { + "head": 0, + "lArm": 0, + "rArm": 0, + "lLeg": 0, + "rLeg": 0, + "body": 0 + } +} \ No newline at end of file diff --git a/reference_scripts/TdjlJro0RRVSh8g8.js b/reference_scripts/TdjlJro0RRVSh8g8.js new file mode 100644 index 0000000..a893cc5 --- /dev/null +++ b/reference_scripts/TdjlJro0RRVSh8g8.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Gamble") && args.skill?.name != game.i18n.localize("NAME.SleightOfHand"); \ No newline at end of file diff --git a/reference_scripts/TmaS8o33825QUMrx.js b/reference_scripts/TmaS8o33825QUMrx.js new file mode 100644 index 0000000..599ff1b --- /dev/null +++ b/reference_scripts/TmaS8o33825QUMrx.js @@ -0,0 +1,3 @@ +let stomp = game.wfrp4e.config.systemItems.stomp; +let test = await this.actor.setupTrait(stomp) +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/TnFobCxG4pxlYmKr.js b/reference_scripts/TnFobCxG4pxlYmKr.js new file mode 100644 index 0000000..75668c8 --- /dev/null +++ b/reference_scripts/TnFobCxG4pxlYmKr.js @@ -0,0 +1,16 @@ +let gorCharacteristics = { + "ws": 45, + "bs": 30, + "s": 35, + "t": 45, + "i": 30, + "ag": 35, + "dex": 25, + "int": 25, + "wp": 30, + "fel": 25 +} +for (let char in this.actor.characteristics) { + if (this.actor.characteristics[char].initial < gorCharacteristics[char]) + this.actor.characteristics[char].initial = gorCharacteristics[char] +} \ No newline at end of file diff --git a/reference_scripts/ToKlHDAjJOsC51ag.js b/reference_scripts/ToKlHDAjJOsC51ag.js new file mode 100644 index 0000000..2ee3319 --- /dev/null +++ b/reference_scripts/ToKlHDAjJOsC51ag.js @@ -0,0 +1,11 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}); +await test.roll(); +if (test.failed) +{ + args.actor.addCondition("unconscious") +} \ No newline at end of file diff --git a/reference_scripts/TpZItJ5Ugbazaobd.js b/reference_scripts/TpZItJ5Ugbazaobd.js new file mode 100644 index 0000000..414537b --- /dev/null +++ b/reference_scripts/TpZItJ5Ugbazaobd.js @@ -0,0 +1,15 @@ +let locations = []; + +while (locations.length < 2) +{ + let loc = await game.wfrp4e.tables.rollTable("hitloc", {hideDSN : true}) + if (!locations.includes(loc.result)) + { + locations.push(loc.result); + } +} + +locationText = locations.map(i => game.wfrp4e.config.locations[i]).join(", ") + +this.item.updateSource({name : this.item.name += ` (${locationText})`, "flags.wfrp4e.locations" : locations}) +this.effect.updateSource({"flags.wfrp4e.locations" : locations}) \ No newline at end of file diff --git a/reference_scripts/Tq45Nd8J3eTvHT41.js b/reference_scripts/Tq45Nd8J3eTvHT41.js new file mode 100644 index 0000000..88ba249 --- /dev/null +++ b/reference_scripts/Tq45Nd8J3eTvHT41.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Perception") && args.skill?.name != game.i18n.localize("NAME.SetTrap"); \ No newline at end of file diff --git a/reference_scripts/TrIYdcG3jDER4WgY.js b/reference_scripts/TrIYdcG3jDER4WgY.js new file mode 100644 index 0000000..5965a8c --- /dev/null +++ b/reference_scripts/TrIYdcG3jDER4WgY.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.xsGbDFqK2qh7lsIj") +let data = item.toObject(); +data.system.specification.value = "Minor" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/TwgdEucxcHloc4cX.js b/reference_scripts/TwgdEucxcHloc4cX.js new file mode 100644 index 0000000..325d158 --- /dev/null +++ b/reference_scripts/TwgdEucxcHloc4cX.js @@ -0,0 +1,135 @@ +let choice1 = [ + { + type : "armour", + name : "Mail Chausses" + }, + { + type : "armour", + name : "Mail Coat" + }, + { + type : "armour", + name : "Mail Coif" + }, +] +let choice2 = [ + { + type : "armour", + name : "Mail Chausses" + }, + { + type : "armour", + name : "Mail Coat" + }, + { + type : "armour", + name : "Mail Coif" + }, + { + type : "armour", + name : "Leather Leggings" + }, + { + type : "armour", + name : "Leather Skullcap" + }, + { + type : "armour", + name : "Leather Jack" + }, +] +let choice3 = [ + { + type : "armour", + name : "Plate Breastplate" + }, + { + type : "armour", + name : "Plate Bracers" + }, + { + type : "armour", + name : "Plate Helm" + }, + { + type : "armour", + name : "Plate Leggings" + }, +] + +let choice = await new Promise((resolve, reject) => { + new Dialog({ + title : "Choice", + content : + `

+ Select your choice +

+
    +
  1. Mail
  2. +
  3. Mail & Leather
  4. +
  5. Plate
  6. +
+ `, + buttons : { + 1 : { + label : "Mail", + callback : () => { + resolve(choice1) + } + }, + 2 : { + label : "Mail & Leather", + callback : () => { + resolve(choice2) + } + }, + 3 : { + label : "Plate", + callback : () => { + resolve(choice3) + } + } + } + }).render(true) +}) + +let updateObj = this.actor.toObject(); +let items = [] +for (let c of choice) +{ + let existing + if (c.type == "skill") + { + existing = updateObj.items.find(i => i.name == c.name && i.type == c.type) + if (existing && c.diff?.system?.advances?.value) + { + existing.system.advances.value += c.diff.system.advances.value + } + } + + if (!existing) + { + let item = await game.wfrp4e.utility.find(c.name, c.type) + if (item) + { + item = item.toObject() + equip(item); + items.push(mergeObject(item, (c.diff || {}))) + } + else + ui.notifications.warn(`Could not find ${c.name}`, {permanent : true}) + } + +} +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/TwwKxFjK6TNGKbRB.js b/reference_scripts/TwwKxFjK6TNGKbRB.js new file mode 100644 index 0000000..ca92445 --- /dev/null +++ b/reference_scripts/TwwKxFjK6TNGKbRB.js @@ -0,0 +1,8 @@ +this.script.scriptMessage(await this.actor.applyBasicDamage(12, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})) +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}}) +await test.roll(); +if (test.failed) +{ + this.actor.addSystemEffect("cold1") +} + diff --git a/reference_scripts/TxfmxDGBj04AQQpt.js b/reference_scripts/TxfmxDGBj04AQQpt.js new file mode 100644 index 0000000..8f6c8d2 --- /dev/null +++ b/reference_scripts/TxfmxDGBj04AQQpt.js @@ -0,0 +1,11 @@ +let weapon = args.opposedTest.defenderTest.weapon +if ( + !args.opposedTest.result.swapped && + args.opposedTest.result.winner == "defender" && + args.opposedTest.attackerTest.result.damage && + weapon && + weapon?.system.properties.qualities.fast + ) +{ + args.opposedTest.swap(this.effect.label); +} \ No newline at end of file diff --git a/reference_scripts/TzgmYRXFXRspIo1i.js b/reference_scripts/TzgmYRXFXRspIo1i.js new file mode 100644 index 0000000..f91fa9d --- /dev/null +++ b/reference_scripts/TzgmYRXFXRspIo1i.js @@ -0,0 +1 @@ +this.effect.delete(); \ No newline at end of file diff --git a/reference_scripts/U1RUcgP8LD2qeGTm.js b/reference_scripts/U1RUcgP8LD2qeGTm.js new file mode 100644 index 0000000..7c629a2 --- /dev/null +++ b/reference_scripts/U1RUcgP8LD2qeGTm.js @@ -0,0 +1 @@ +return !args.options.reload \ No newline at end of file diff --git a/reference_scripts/U1UpSRJOSjPpO4HS.js b/reference_scripts/U1UpSRJOSjPpO4HS.js new file mode 100644 index 0000000..e0bdcd1 --- /dev/null +++ b/reference_scripts/U1UpSRJOSjPpO4HS.js @@ -0,0 +1,4 @@ +let mutations = await game.wfrp4e.utility.findAll("mutation", "Loading Mutations") +let roll = Math.floor(CONFIG.Dice.randomUniform() * mutations.length); +this.actor.createEmbeddedDocuments("Item", [mutations[roll]]); +this.script.scriptNotification(`Added ${mutations[roll].name}`) \ No newline at end of file diff --git a/reference_scripts/U26XMie3Kjoddisj.js b/reference_scripts/U26XMie3Kjoddisj.js new file mode 100644 index 0000000..6b2b8bd --- /dev/null +++ b/reference_scripts/U26XMie3Kjoddisj.js @@ -0,0 +1,10 @@ +let stunned = this.actor.hasCondition("stunned") +if (stunned) +{ + this.script.scriptNotification(`Cleared 1 Stunned Condition`) + this.actor.removeCondition("stunned"); +} +else +{ + this.script.scriptNotification(`No Stunned Conditions`) +} \ No newline at end of file diff --git a/reference_scripts/U2xKn7R1gm8kiQm8.js b/reference_scripts/U2xKn7R1gm8kiQm8.js new file mode 100644 index 0000000..798875a --- /dev/null +++ b/reference_scripts/U2xKn7R1gm8kiQm8.js @@ -0,0 +1,4 @@ +this.actor.hasCondition("broken")?.delete(); + +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/U4A8FDNmwBGTuQZO.js b/reference_scripts/U4A8FDNmwBGTuQZO.js new file mode 100644 index 0000000..8e8a337 --- /dev/null +++ b/reference_scripts/U4A8FDNmwBGTuQZO.js @@ -0,0 +1,5 @@ +if (args.attacker.has("Undead") && !args.attacker.has("Ethereal")) +{ + args.totalWoundLoss = Math.floor(args.totalWoundLoss / 2) + args.modifiers.other.push({label : this.effect.name, details : "Halved", value : "× 0.5"}) +} \ No newline at end of file diff --git a/reference_scripts/U5ndCwcJ1s3Ns26w.js b/reference_scripts/U5ndCwcJ1s3Ns26w.js new file mode 100644 index 0000000..481fde6 --- /dev/null +++ b/reference_scripts/U5ndCwcJ1s3Ns26w.js @@ -0,0 +1,3 @@ +args.item.system.qualities.value.push({name : "magical"}); +args.item.system.damage.value += ` + ${parseInt(this.effect.sourceTest.result.SL)}`; +args.item.name += ` (${this.effect.name})` \ No newline at end of file diff --git a/reference_scripts/U78c4oUjKwyUu6jT.js b/reference_scripts/U78c4oUjKwyUu6jT.js new file mode 100644 index 0000000..cd17a48 --- /dev/null +++ b/reference_scripts/U78c4oUjKwyUu6jT.js @@ -0,0 +1 @@ +return (args.skill?.name != game.i18n.localize("NAME.Perception") && args.characteristic != "fel") \ No newline at end of file diff --git a/reference_scripts/U9xh2wriSqCosugW.js b/reference_scripts/U9xh2wriSqCosugW.js new file mode 100644 index 0000000..5770437 --- /dev/null +++ b/reference_scripts/U9xh2wriSqCosugW.js @@ -0,0 +1,13 @@ +if (args.test.options.stag) +{ + if (parseInt(args.test.result.SL) < 0 || args.test.failed) + { + if (parseInt(args.test.result.SL) < 0) + { + args.test.result.SL = "+0"; + args.test.result.description = game.i18n.localize("ROLL.MarginalSuccess"); + } + 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/reference_scripts/UC6G3pFQwzUhrw6F.js b/reference_scripts/UC6G3pFQwzUhrw6F.js new file mode 100644 index 0000000..5ca75a2 --- /dev/null +++ b/reference_scripts/UC6G3pFQwzUhrw6F.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.CharmAnimal"); \ No newline at end of file diff --git a/reference_scripts/UH5MIzqi2MvEqTwj.js b/reference_scripts/UH5MIzqi2MvEqTwj.js new file mode 100644 index 0000000..0b5562d --- /dev/null +++ b/reference_scripts/UH5MIzqi2MvEqTwj.js @@ -0,0 +1,7 @@ +if (args.totalWoundLoss > 0) +{ + let roll = await new Roll("1d10").roll(); + 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/reference_scripts/ULmZMLezDamerN04.js b/reference_scripts/ULmZMLezDamerN04.js new file mode 100644 index 0000000..a8fefdb --- /dev/null +++ b/reference_scripts/ULmZMLezDamerN04.js @@ -0,0 +1,32 @@ +let spells = await game.wfrp4e.utility.findAll("spell", "Loading Spells") + +let lore = (await game.wfrp4e.tables.rollTable("random-caster", {hideDSN: true})).text +this.script.scriptNotification(lore) +if (lore == "GM's Choice") { + return +} + +else if (lore == "Arcane Magic") { + lore = "Arcane" +} + +else if (lore == "Petty Magic") { + lore = "petty" +} + +else { + lore = lore.toLowerCase(); +} + +let spellsWithLore = [] +if (lore == "Arcane") { + spellsWithLore = spells.filter(i => !i.system.lore.value) +} +else { + spellsWithLore = spells.filter(i => i.system.lore.value == lore) +} + +let selectedSpell = spellsWithLore[Math.floor(CONFIG.Dice.randomUniform() * spellsWithLore.length)] +Item.implementation.create(selectedSpell.toObject(), { parent: this.actor}).then(item => { + this.actor.setupCast(item).then(test => test.roll()); +}) \ No newline at end of file diff --git a/reference_scripts/UTlgF4azrGQZsoDv.js b/reference_scripts/UTlgF4azrGQZsoDv.js new file mode 100644 index 0000000..052e2d2 --- /dev/null +++ b/reference_scripts/UTlgF4azrGQZsoDv.js @@ -0,0 +1,2 @@ +const talents = await Promise.all(["Ambidextrous", "Distract"].map(game.wfrp4e.utility.findTalent)) +this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/UWrzokgabRKUpnkG.js b/reference_scripts/UWrzokgabRKUpnkG.js new file mode 100644 index 0000000..954ba01 --- /dev/null +++ b/reference_scripts/UWrzokgabRKUpnkG.js @@ -0,0 +1 @@ +return ["t", "wp", "ag", "i", "int"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/UYLXm2W6jVn21Age.js b/reference_scripts/UYLXm2W6jVn21Age.js new file mode 100644 index 0000000..3202cf0 --- /dev/null +++ b/reference_scripts/UYLXm2W6jVn21Age.js @@ -0,0 +1 @@ +args.fields.modifier += 40; \ No newline at end of file diff --git a/reference_scripts/UaImulhbPURkLJg2.js b/reference_scripts/UaImulhbPURkLJg2.js new file mode 100644 index 0000000..77d2ab5 --- /dev/null +++ b/reference_scripts/UaImulhbPURkLJg2.js @@ -0,0 +1 @@ +return this.actor.attacker && (args.skill?.name.includes("Melee (Basic)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic")) \ No newline at end of file diff --git a/reference_scripts/UgQW0UMPOZ0jwfVJ.js b/reference_scripts/UgQW0UMPOZ0jwfVJ.js new file mode 100644 index 0000000..3dc1a6d --- /dev/null +++ b/reference_scripts/UgQW0UMPOZ0jwfVJ.js @@ -0,0 +1,5 @@ +let current = this.actor.status.fortune.value + +this.actor.update({"system.status.fortune.value" : 1 + current}) + +this.script.scriptMessage(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${1 + current}`) \ No newline at end of file diff --git a/reference_scripts/Um6xMMiUftLXJxEt.js b/reference_scripts/Um6xMMiUftLXJxEt.js new file mode 100644 index 0000000..5365edb --- /dev/null +++ b/reference_scripts/Um6xMMiUftLXJxEt.js @@ -0,0 +1 @@ +return ["fel", "dex"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/UnqnWi0dZYLf5fTT.js b/reference_scripts/UnqnWi0dZYLf5fTT.js new file mode 100644 index 0000000..e5dd8a6 --- /dev/null +++ b/reference_scripts/UnqnWi0dZYLf5fTT.js @@ -0,0 +1,133 @@ +let choice1 = [ + { + type : "armour", + name : "Mail Chausses" + }, + { + type : "armour", + name : "Mail Coat" + }, + { + type : "armour", + name : "Mail Coif" + }, +] +let choice2 = [ + { + type : "armour", + name : "Mail Chausses" + }, + { + type : "armour", + name : "Mail Coat" + }, + { + type : "armour", + name : "Mail Coif" + }, + { + type : "armour", + name : "Leather Leggings" + }, + { + type : "armour", + name : "Leather Skullcap" + }, + { + type : "armour", + name : "Leather Jack" + }, +] +let choice3 = [ + { + type : "armour", + name : "Plate Breastplate" + }, + { + type : "armour", + name : "Plate Bracers" + }, + { + type : "armour", + name : "Plate Helm" + }, + { + type : "armour", + name : "Plate Leggings" + }, +] + +let choice = await Dialog.wait({ + title : "Choice", + content : + `

+ Select your choice +

+
    +
  1. Mail
  2. +
  3. Mail & Leather
  4. +
  5. Plate
  6. +
+ `, + buttons : { + 1 : { + label : "Mail", + callback : () => { + return choice1 + } + }, + 2 : { + label : "Mail & Leather", + callback : () => { + return choice2 + } + }, + 3 : { + label : "Plate", + callback : () => { + return choice3 + } + } + } +}) + +let updateObj = this.actor.toObject(); +let items = [] +for (let c of choice) +{ + let existing + if (c.type == "skill") + { + existing = updateObj.items.find(i => i.name == c.name && i.type == c.type) + if (existing && c.diff?.system?.advances?.value) + { + existing.system.advances.value += c.diff.system.advances.value + } + } + + if (!existing) + { + let item = await game.wfrp4e.utility.find(c.name, c.type) + if (item) + { + item = item.toObject() + equip(item); + items.push(mergeObject(item, (c.diff || {}))) + } + else + ui.notifications.warn(`Could not find ${c.name}`, {permanent : true}) + } + +} +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/UsAHQecRlWL5PhP6.js b/reference_scripts/UsAHQecRlWL5PhP6.js new file mode 100644 index 0000000..44806e5 --- /dev/null +++ b/reference_scripts/UsAHQecRlWL5PhP6.js @@ -0,0 +1,8 @@ +this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : "average"}}).then(async test => +{ + await test.roll() + if (test.failed) + { + this.actor.corruptionDialog("moderate") + } +}) \ No newline at end of file diff --git a/reference_scripts/UsuwsmU1TUQLQVM2.js b/reference_scripts/UsuwsmU1TUQLQVM2.js new file mode 100644 index 0000000..47d19c6 --- /dev/null +++ b/reference_scripts/UsuwsmU1TUQLQVM2.js @@ -0,0 +1,2 @@ +let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); +return !args.spell || (args.type == "cast" && ["petty", lore].includes(args.spell.system.lore.value)); \ No newline at end of file diff --git a/reference_scripts/UvycHOjSPm5Zv9KJ.js b/reference_scripts/UvycHOjSPm5Zv9KJ.js new file mode 100644 index 0000000..59b3eea --- /dev/null +++ b/reference_scripts/UvycHOjSPm5Zv9KJ.js @@ -0,0 +1,10 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +let baseDamage = "4"; +if (test.succeeded) + baseDamage = "0"; + +let damage = this.effect.sourceItem.system.computeSpellDamage(baseDamage, true) + parseInt(this.effect.sourceTest.result.SL); + +this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {suppressMsg : true})) +this.actor.addCondition("ablaze") \ No newline at end of file diff --git a/reference_scripts/UwjkHRAQHESdYXJs.js b/reference_scripts/UwjkHRAQHESdYXJs.js new file mode 100644 index 0000000..9f8e905 --- /dev/null +++ b/reference_scripts/UwjkHRAQHESdYXJs.js @@ -0,0 +1,11 @@ +this.actor.getActiveTokens().forEach(t => t.document.update({light : { + "dim": 2, + "bright": 1, + "alpha": 0.5, + "animation": { + "speed": 4, + "intensity": 4, + "type": "pulse", + }, + "color": "#949bff", +}})); \ No newline at end of file diff --git a/reference_scripts/Ux4buMc7llF1Kg8p.js b/reference_scripts/Ux4buMc7llF1Kg8p.js new file mode 100644 index 0000000..4390159 --- /dev/null +++ b/reference_scripts/Ux4buMc7llF1Kg8p.js @@ -0,0 +1,4 @@ +if (!this.actor.hasCondition("stunned") && !this.actor.hasCondition("unconcscious")) +{ + this.effect.delete(); +} \ No newline at end of file diff --git a/reference_scripts/V1D2Uo3WDKYQePU3.js b/reference_scripts/V1D2Uo3WDKYQePU3.js new file mode 100644 index 0000000..cab27a0 --- /dev/null +++ b/reference_scripts/V1D2Uo3WDKYQePU3.js @@ -0,0 +1,14 @@ +let damage = this.effect.sourceTest.result.damage; + +let loc = "head" +let APatLoc = this.actor.system.status.armour[loc]; + +let metalAP = APatLoc.layers.reduce((metal, layer) => metal += (layer.metal ? layer.value : 0), 0) + +let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location; + +damage -= (APused + this.actor.system.characteristics.t.bonus) + +let msg = await this.actor.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL}); +msg += ` (ignored ${metalAP} metal AP on ${game.wfrp4e.config.locations[loc]})` +this.script.scriptMessage(msg) diff --git a/reference_scripts/V2lsVTi6q28eL5jl.js b/reference_scripts/V2lsVTi6q28eL5jl.js new file mode 100644 index 0000000..6bde5ea --- /dev/null +++ b/reference_scripts/V2lsVTi6q28eL5jl.js @@ -0,0 +1 @@ +args.fields.slBonus += parseInt(this.effect.sourceTest.result.SL) \ No newline at end of file diff --git a/reference_scripts/V7qmFwUMCY2tfziH.js b/reference_scripts/V7qmFwUMCY2tfziH.js new file mode 100644 index 0000000..1349ebf --- /dev/null +++ b/reference_scripts/V7qmFwUMCY2tfziH.js @@ -0,0 +1 @@ +this.actor.addCondition("stunned") \ No newline at end of file diff --git a/reference_scripts/V9wD9FWHWxZUOGSI.js b/reference_scripts/V9wD9FWHWxZUOGSI.js new file mode 100644 index 0000000..c0e2cb8 --- /dev/null +++ b/reference_scripts/V9wD9FWHWxZUOGSI.js @@ -0,0 +1,15 @@ +let roll = await (new Roll(`max(0, 1d10 - ${this.actor.characteristics.wp.bonus})`).roll()) +let fatigued = roll.total +roll.toMessage(this.script.getChatData()); +if (fatigued > this.actor.characteristics.wp.bonus) +{ + this.actor.addCondition("unconscious") + this.script.scriptNotification(`Fell Unconscious`) +} +else +{ + fatigued = Math.max(0, fatigued) + if (fatigued) + this.actor.addCondition("fatigued", fatigued) + this.script.scriptNotification(`Gained ${fatigued} conditions`) +} \ No newline at end of file diff --git a/reference_scripts/V9xm4X1x3lPYTQaI.js b/reference_scripts/V9xm4X1x3lPYTQaI.js new file mode 100644 index 0000000..200cae7 --- /dev/null +++ b/reference_scripts/V9xm4X1x3lPYTQaI.js @@ -0,0 +1,6 @@ +if (args.extendedTest?.getFlag("wfrp4e", "fear")) +{ + this.script.scriptNotification("Immune to Fear"); + args.extendedTest.delete(); + args.abort = true; +} \ No newline at end of file diff --git a/reference_scripts/V9zm2hKUVLVZtAcN.js b/reference_scripts/V9zm2hKUVLVZtAcN.js new file mode 100644 index 0000000..f0c1db7 --- /dev/null +++ b/reference_scripts/V9zm2hKUVLVZtAcN.js @@ -0,0 +1,133 @@ +let characteristics = { + "ws" : -10, + "bs" : -10, + "s" : 0, + "t" : 15, + "i" : 15, + "ag" : -20, + "dex" : 0, + "int" : 20, + "wp" : 10, + "fel" : 10 +} +let skills = ["Charm", "Channelling", "Entertain (Prophecy)", "Intuition"] +let skillAdvancements = [0, 0, 20, 10] +let talents = ["Detect Artefact", "Menacing", "Sixth Sense"] +let traits = ["Dooming", "Spellcaster (Lore of Life)", "Ward"] +let trappings = [] +let items = []; +let spells = ["Forest of Thorns"]; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +const traitRegex = /(?:,?(.+?)(\+?\d{1,2}\+?)?\s*?(?:\((.+?)\)\s*(\+?\d{1,2})?|,|$))/gm +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's a specialization + let traitSpec = traitMatches[3] + + let traitItem; + try { + traitItem = await WFRP_Utility.findItem(traitName, "trait") + } + catch { } + if (!traitItem) { + ui.notifications.warn(`Could not find ${trait}`, {permanent : true}) + } + traitItem = traitItem.toObject() + + if (Number.isNumeric(traitVal)) + { + traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal; + traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim() + } + else + traitItem.system.specification.value = traitSpec + + items.push(traitItem) + +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + 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 += " " + this.effect.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + + +function equip(item) +{ + if (item.type == "armour") + item.worn = true + else if (item.type == "weapon") + item.equipped = true + else if (item.type == "trapping" && item.trappingType?.value == "clothingAccessories") + item.worn = true +} \ No newline at end of file diff --git a/reference_scripts/VAPsww9x3HAw1sKP.js b/reference_scripts/VAPsww9x3HAw1sKP.js new file mode 100644 index 0000000..29c3c6e --- /dev/null +++ b/reference_scripts/VAPsww9x3HAw1sKP.js @@ -0,0 +1 @@ +return !args.options.dodge \ No newline at end of file diff --git a/reference_scripts/VAs1nXvicdQK18Do.js b/reference_scripts/VAs1nXvicdQK18Do.js new file mode 100644 index 0000000..88f8ad9 --- /dev/null +++ b/reference_scripts/VAs1nXvicdQK18Do.js @@ -0,0 +1 @@ +return args.skill?.name.includes(game.i18n.localize("NAME.Language")); \ No newline at end of file diff --git a/reference_scripts/VKpKq4RSbI1KkUQK.js b/reference_scripts/VKpKq4RSbI1KkUQK.js new file mode 100644 index 0000000..fe2cb4a --- /dev/null +++ b/reference_scripts/VKpKq4RSbI1KkUQK.js @@ -0,0 +1 @@ +this.actor.flags.useless[this.effect.getFlag("wfrp4e", "location")] = true; \ No newline at end of file diff --git a/reference_scripts/VNOKTzCrFbZ6PJUj.js b/reference_scripts/VNOKTzCrFbZ6PJUj.js new file mode 100644 index 0000000..ab82da5 --- /dev/null +++ b/reference_scripts/VNOKTzCrFbZ6PJUj.js @@ -0,0 +1 @@ +return !["Charm Animal", "Endurance", "Outdoor Survival"].includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/VQaC6ynouW5EQCbC.js b/reference_scripts/VQaC6ynouW5EQCbC.js new file mode 100644 index 0000000..011cb84 --- /dev/null +++ b/reference_scripts/VQaC6ynouW5EQCbC.js @@ -0,0 +1,13 @@ +let roll = await new Roll("1d10").roll(); + +await roll.toMessage(this.script.getChatData()); + +this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})); + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name}); +await test.roll(); + +if (test.succeeded) +{ + return false; +} \ No newline at end of file diff --git a/reference_scripts/Vb7rgl8T4VRswbnZ.js b/reference_scripts/Vb7rgl8T4VRswbnZ.js new file mode 100644 index 0000000..d728bad --- /dev/null +++ b/reference_scripts/Vb7rgl8T4VRswbnZ.js @@ -0,0 +1 @@ +this.actor.status.addArmour(parseInt(this.item.system.specification.value) || 0, {source: this.effect, damage : this.item.getFlag("wfrp4e", "APdamage")}) \ No newline at end of file diff --git a/reference_scripts/VbL0TgaBAmYjrezZ.js b/reference_scripts/VbL0TgaBAmYjrezZ.js new file mode 100644 index 0000000..eb99900 --- /dev/null +++ b/reference_scripts/VbL0TgaBAmYjrezZ.js @@ -0,0 +1,2 @@ +const talents = await Promise.all(["Hardy"].map(game.wfrp4e.utility.findTalent)) +this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Vkuu70BZV4DPYO2Q.js b/reference_scripts/Vkuu70BZV4DPYO2Q.js new file mode 100644 index 0000000..daabdec --- /dev/null +++ b/reference_scripts/Vkuu70BZV4DPYO2Q.js @@ -0,0 +1 @@ +return args.item?.system?.attackType != "ranged" \ No newline at end of file diff --git a/reference_scripts/VlFUDaKUYoBYKYn0.js b/reference_scripts/VlFUDaKUYoBYKYn0.js new file mode 100644 index 0000000..9c3af2a --- /dev/null +++ b/reference_scripts/VlFUDaKUYoBYKYn0.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: "1 Corruption Point Gained"}}) +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.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/reference_scripts/VqTrKPtxv9hpn0Hr.js b/reference_scripts/VqTrKPtxv9hpn0Hr.js new file mode 100644 index 0000000..f63598a --- /dev/null +++ b/reference_scripts/VqTrKPtxv9hpn0Hr.js @@ -0,0 +1 @@ +return args.skill?.name != "Language (Magick)" \ No newline at end of file diff --git a/reference_scripts/VuE1mhrB6X6MYTzg.js b/reference_scripts/VuE1mhrB6X6MYTzg.js new file mode 100644 index 0000000..eb176b0 --- /dev/null +++ b/reference_scripts/VuE1mhrB6X6MYTzg.js @@ -0,0 +1 @@ +return args.characteristic == "fel" \ No newline at end of file diff --git a/reference_scripts/VurA2XNqC0d9U49C.js b/reference_scripts/VurA2XNqC0d9U49C.js new file mode 100644 index 0000000..9853d7f --- /dev/null +++ b/reference_scripts/VurA2XNqC0d9U49C.js @@ -0,0 +1,8 @@ +this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => +{ + await test.roll() + if (test.failed) + { + this.actor.addCondition("fatigued") + } +}) \ No newline at end of file diff --git a/reference_scripts/VzO0ZDcTWvaBn4vm.js b/reference_scripts/VzO0ZDcTWvaBn4vm.js new file mode 100644 index 0000000..ab2caf1 --- /dev/null +++ b/reference_scripts/VzO0ZDcTWvaBn4vm.js @@ -0,0 +1,13 @@ +if (args.test.preData.skillName?.includes(game.i18n.localize("NAME.Language")) || args.test instanceof CastTest) +{ + if (parseInt(args.test.result.SL) > 0 || args.test.succeeded) + { + if (parseInt(args.test.result.SL) > 0) + { + args.test.result.SL = "-0"; + args.test.result.description = game.i18n.localize("ROLL.MarginalFailure"); + } + args.test.result.outcome = "failure" + args.test.result.other.push(`${this.effect.name}: Maximum -0 SL`) + } +} \ No newline at end of file diff --git a/reference_scripts/VzgTGb5QXKoyPNh3.js b/reference_scripts/VzgTGb5QXKoyPNh3.js new file mode 100644 index 0000000..0d934ee --- /dev/null +++ b/reference_scripts/VzgTGb5QXKoyPNh3.js @@ -0,0 +1,14 @@ +if (args.attackerTest.weapon && args.defenderTest.weapon) +{ + let attackerReach = game.wfrp4e.config.reachNum[args.attackerTest.weapon.reach.value] + let defenderReach = game.wfrp4e.config.reachNum[args.defenderTest.weapon.reach.value] + + if (attackerReach == defenderReach) + defenderReach = defenderReach < 7 ? defenderReach + 1 : defenderReach + + attackerReach = game.wfrp4e.utility.findKey(attackerReach, game.wfrp4e.config.reachNum) + defenderReach = game.wfrp4e.utility.findKey(defenderReach, game.wfrp4e.config.reachNum) + + args.attackerTest.weapon.reach.value = attackerReach + args.defenderTest.weapon.reach.value = defenderReach +} \ No newline at end of file diff --git a/reference_scripts/W9nyUNQStMr1pUHJ.js b/reference_scripts/W9nyUNQStMr1pUHJ.js new file mode 100644 index 0000000..8a0c850 --- /dev/null +++ b/reference_scripts/W9nyUNQStMr1pUHJ.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.hitloc.value == this.item.system.location.key) +{ + args.actor.addCondition("bleeding", 1); + this.script.scriptNotification("Added Bleeding") +} \ No newline at end of file diff --git a/reference_scripts/WB6sIpLEPC8YPX67.js b/reference_scripts/WB6sIpLEPC8YPX67.js new file mode 100644 index 0000000..48584b2 --- /dev/null +++ b/reference_scripts/WB6sIpLEPC8YPX67.js @@ -0,0 +1,6 @@ +if (args.options.dodge) +{ + args.abort = true; + this.script.scriptNotification("Cannot Dodge!") +} +return ["t", "int", "wp", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/WKXyVHQwQCNTfSKv.js b/reference_scripts/WKXyVHQwQCNTfSKv.js new file mode 100644 index 0000000..6ef2a63 --- /dev/null +++ b/reference_scripts/WKXyVHQwQCNTfSKv.js @@ -0,0 +1,4 @@ +if ((args.item.type == "weapon" || args.item.system.attackType) && !args.item.isMagical ) +{ + args.item.system.qualities.value.push({name : "magical"}) +} \ No newline at end of file diff --git a/reference_scripts/WO5n7Vbx8AgoVrwC.js b/reference_scripts/WO5n7Vbx8AgoVrwC.js new file mode 100644 index 0000000..18d9585 --- /dev/null +++ b/reference_scripts/WO5n7Vbx8AgoVrwC.js @@ -0,0 +1,84 @@ + let characteristics = { + "ws" : 0, + "bs" : 0, + "s" : 0, + "t" : 0, + "i" : 10, + "ag" : 0, + "dex" : 0, + "int" : 10, + "wp" : 5, + "fel" : 5 + } + let skills = ["Intuition", "Lore (Local)", "Perception"] + let skillAdvancements = [10, 10, 10] + let talents = [] + let trappings = ["Mail Coat", "Mail Chausses", "Mail Coif", "Hand Weapon"] + let items = [] + + let updateObj = this.actor.toObject(); + + for (let ch in characteristics) + { + updateObj.system.characteristics[ch].modifier += characteristics[ch]; + } + + for (let index = 0; index < skills.length; index++) + { + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } + } + + for (let talent of talents) + { + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } + } + + for (let trapping of trappings) + { + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } + } + + + await this.actor.update(updateObj) + this.actor.createEmbeddedDocuments("Item", items); + + function equip(item) + { + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true + } \ No newline at end of file diff --git a/reference_scripts/WPQbVpD1uwSLAXq1.js b/reference_scripts/WPQbVpD1uwSLAXq1.js new file mode 100644 index 0000000..3a7653d --- /dev/null +++ b/reference_scripts/WPQbVpD1uwSLAXq1.js @@ -0,0 +1,4 @@ +if (this.actor.system.status.wounds.value == 0) +{ + this.actor.addCondition("dead"); +} \ No newline at end of file diff --git a/reference_scripts/WRe1eGmGVGejPcS8.js b/reference_scripts/WRe1eGmGVGejPcS8.js new file mode 100644 index 0000000..d47ed86 --- /dev/null +++ b/reference_scripts/WRe1eGmGVGejPcS8.js @@ -0,0 +1,2 @@ +let wind = this.effect.name.split(" ")[2] +return args.type == "cast" && game.wfrp4e.config.magicWind[args.item.system.lore.value] == wind; \ No newline at end of file diff --git a/reference_scripts/WTRYAEzwxRuGENyI.js b/reference_scripts/WTRYAEzwxRuGENyI.js new file mode 100644 index 0000000..6614176 --- /dev/null +++ b/reference_scripts/WTRYAEzwxRuGENyI.js @@ -0,0 +1,18 @@ + // Every living creature within 10 yards, other than the wielder of the hammer, + // must make a Challenging (+0) Endurance Test + + let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { + skipTargets: true, appendTitle : " - " + this.effect.name, + fields: {difficulty: "challenging"} + }) + + await test.roll(); + if (test.failed) + { + // or gain a Deafened Condition + this.actor.addCondition("deafened"); + // and suffer 1d10 Wounds which bypass armour but not Toughness Bonus. + let damage = (await new Roll("1d10").roll()); + await damage.toMessage(this.script.getChatData()); + this.script.scriptMessage(await this.actor.applyBasicDamage(damage.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})) + } \ No newline at end of file diff --git a/reference_scripts/WY3DajPRGcMNt158.js b/reference_scripts/WY3DajPRGcMNt158.js new file mode 100644 index 0000000..37fa26b --- /dev/null +++ b/reference_scripts/WY3DajPRGcMNt158.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF") +this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/WiYtNU2Y5BJfIpeM.js b/reference_scripts/WiYtNU2Y5BJfIpeM.js new file mode 100644 index 0000000..837c65a --- /dev/null +++ b/reference_scripts/WiYtNU2Y5BJfIpeM.js @@ -0,0 +1,15 @@ +let location = this.item.system.location.key; + +if (location) +{ + let dropped = this.item.system.weaponsAtLocation; + + if (dropped.length) + { + this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + for(let weapon of dropped) + { + await weapon.system.toggleEquip(); + } + } +} \ No newline at end of file diff --git a/reference_scripts/WnWA0e0bgqBsZp2L.js b/reference_scripts/WnWA0e0bgqBsZp2L.js new file mode 100644 index 0000000..3231f2e --- /dev/null +++ b/reference_scripts/WnWA0e0bgqBsZp2L.js @@ -0,0 +1 @@ +this.item.update({"system.twohanded.value" : !this.item.system.twohanded.value}) \ No newline at end of file diff --git a/reference_scripts/Wo4wQKUxSItAhRzZ.js b/reference_scripts/Wo4wQKUxSItAhRzZ.js new file mode 100644 index 0000000..0923471 --- /dev/null +++ b/reference_scripts/Wo4wQKUxSItAhRzZ.js @@ -0,0 +1,8 @@ +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 +// 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 diff --git a/reference_scripts/WwxXgsNxlccmqTze.js b/reference_scripts/WwxXgsNxlccmqTze.js new file mode 100644 index 0000000..c381b33 --- /dev/null +++ b/reference_scripts/WwxXgsNxlccmqTze.js @@ -0,0 +1 @@ +this.actor.addCondition("dead") \ No newline at end of file diff --git a/reference_scripts/WzMmwjZbhyCbHxyZ.js b/reference_scripts/WzMmwjZbhyCbHxyZ.js new file mode 100644 index 0000000..9642316 --- /dev/null +++ b/reference_scripts/WzMmwjZbhyCbHxyZ.js @@ -0,0 +1,2 @@ +this.actor.status.encumbrance.state += 2 +this.actor.status.encumbrance.pct = 100; \ No newline at end of file diff --git a/reference_scripts/X3bLbOfcJAftOMa7.js b/reference_scripts/X3bLbOfcJAftOMa7.js new file mode 100644 index 0000000..18e79ab --- /dev/null +++ b/reference_scripts/X3bLbOfcJAftOMa7.js @@ -0,0 +1 @@ +return ["ws", "bs", "ag"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/X7ikFOGKYzTMr4d1.js b/reference_scripts/X7ikFOGKYzTMr4d1.js new file mode 100644 index 0000000..729311c --- /dev/null +++ b/reference_scripts/X7ikFOGKYzTMr4d1.js @@ -0,0 +1 @@ +args.fields.difficulty = "difficult" \ No newline at end of file diff --git a/reference_scripts/XClTZOjuhcxWLF51.js b/reference_scripts/XClTZOjuhcxWLF51.js new file mode 100644 index 0000000..9765515 --- /dev/null +++ b/reference_scripts/XClTZOjuhcxWLF51.js @@ -0,0 +1,13 @@ +let 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") +} + + +let item = await fromUuid("Compendium.wfrp4e-core.items.4lj1ik958mbgAlaF") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) diff --git a/reference_scripts/XO9m2AvFRAAeEuty.js b/reference_scripts/XO9m2AvFRAAeEuty.js new file mode 100644 index 0000000..67412d0 --- /dev/null +++ b/reference_scripts/XO9m2AvFRAAeEuty.js @@ -0,0 +1,5 @@ +if (args.test.options.fieldDressing && args.test.result.reversed) +{ + args.test.data.result.SL = "+" + Math.min(1, Number(args.test.data.result.SL)) + args.test.result.other.push(`${this.effect.name}: SL limited to 1`) +} \ No newline at end of file diff --git a/reference_scripts/XPxAKqPpPYE4E6B5.js b/reference_scripts/XPxAKqPpPYE4E6B5.js new file mode 100644 index 0000000..e8a65fe --- /dev/null +++ b/reference_scripts/XPxAKqPpPYE4E6B5.js @@ -0,0 +1 @@ +args.fields.modifier -= 10 * this.effect.conditionValue \ No newline at end of file diff --git a/reference_scripts/XRrGBbplNLZpXnCH.js b/reference_scripts/XRrGBbplNLZpXnCH.js new file mode 100644 index 0000000..4e877c0 --- /dev/null +++ b/reference_scripts/XRrGBbplNLZpXnCH.js @@ -0,0 +1,53 @@ +let item; +let items = [] +item = await fromUuid("Compendium.wfrp4e-core.items.rOV2s6PQBBrhpMOv") +{ + let data = item.toObject(); + items.push(data) +} +item = await fromUuid("Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj") +{ + let data = item.toObject(); + data.system.specification.value = 2 + items.push(data) +} +item = await fromUuid("Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj") +{ + let data = item.toObject(); + items.push(data) +} +item = await fromUuid("Compendium.wfrp4e-core.items.a8MC97PLzl10WocT") +{ + let data = item.toObject(); + items.push(data) +} +item = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") +{ + let data = item.toObject(); + data.system.specification.value = 1; + items.push(data) +} +item = await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn") +{ + let data = item.toObject(); + data.system.specification.value = 1; + items.push(data) +} +item = await fromUuid("Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp") +{ + let data = item.toObject(); + items.push(data) +} +item = await fromUuid("Compendium.wfrp4e-core.items.mDgEMOoJpi8DkRYb") +{ + let data = item.toObject(); + items.push(data) +} +item = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM") +{ + let data = item.toObject(); + data.system.specification.value = 2; + items.push(data) +} + +this.actor.createEmbeddedDocuments("Item", items, {fromEffect : this.effect.id}) diff --git a/reference_scripts/XXnzUdsIYQ9Wjyu0.js b/reference_scripts/XXnzUdsIYQ9Wjyu0.js new file mode 100644 index 0000000..04f2e20 --- /dev/null +++ b/reference_scripts/XXnzUdsIYQ9Wjyu0.js @@ -0,0 +1 @@ +return args.item?.system.attackType != "ranged" || args.flags.howlingWarpGale || this.actor.sameSideAs(this.effect.sourceActor) \ No newline at end of file diff --git a/reference_scripts/XYaYeiVkc5GKYTjC.js b/reference_scripts/XYaYeiVkc5GKYTjC.js new file mode 100644 index 0000000..8fe5ef9 --- /dev/null +++ b/reference_scripts/XYaYeiVkc5GKYTjC.js @@ -0,0 +1 @@ +return args.spell?.system.lore.value != "fire" \ No newline at end of file diff --git a/reference_scripts/XcvDYNZgJ2rpAdDV.js b/reference_scripts/XcvDYNZgJ2rpAdDV.js new file mode 100644 index 0000000..ba3519f --- /dev/null +++ b/reference_scripts/XcvDYNZgJ2rpAdDV.js @@ -0,0 +1,7 @@ + + 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/reference_scripts/Xe8ijqWU3bbtq7ZY.js b/reference_scripts/Xe8ijqWU3bbtq7ZY.js new file mode 100644 index 0000000..f232698 --- /dev/null +++ b/reference_scripts/Xe8ijqWU3bbtq7ZY.js @@ -0,0 +1,5 @@ +if (args.opposedTest.defenderTest.actor.Species.toLowerCase().includes("skaven")) +{ + args.addImpact = true; + args.opposedTest.result.other.push("Impact against Skaven") +} \ No newline at end of file diff --git a/reference_scripts/Xf4FcZ4ZLdWmOXBa.js b/reference_scripts/Xf4FcZ4ZLdWmOXBa.js new file mode 100644 index 0000000..9aec486 --- /dev/null +++ b/reference_scripts/Xf4FcZ4ZLdWmOXBa.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Perception") && !args.skill?.name.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/XfRvVBTVIuAm8RaZ.js b/reference_scripts/XfRvVBTVIuAm8RaZ.js new file mode 100644 index 0000000..d338357 --- /dev/null +++ b/reference_scripts/XfRvVBTVIuAm8RaZ.js @@ -0,0 +1 @@ +return args.item?.name != game.i18n.localize("NAME.CharmAnimal") \ No newline at end of file diff --git a/reference_scripts/Xg4qHLsyXGuUZfT8.js b/reference_scripts/Xg4qHLsyXGuUZfT8.js new file mode 100644 index 0000000..e83b38b --- /dev/null +++ b/reference_scripts/Xg4qHLsyXGuUZfT8.js @@ -0,0 +1 @@ +this.actor.hasCondition("ablaze")?.delete(); \ No newline at end of file diff --git a/reference_scripts/Xk9XPklxxTvFlwpI.js b/reference_scripts/Xk9XPklxxTvFlwpI.js new file mode 100644 index 0000000..2c3a1c6 --- /dev/null +++ b/reference_scripts/Xk9XPklxxTvFlwpI.js @@ -0,0 +1 @@ +args.options.useOnesArgumentative = true; \ No newline at end of file diff --git a/reference_scripts/XthZ3GCC3WhsEI2g.js b/reference_scripts/XthZ3GCC3WhsEI2g.js new file mode 100644 index 0000000..af499f4 --- /dev/null +++ b/reference_scripts/XthZ3GCC3WhsEI2g.js @@ -0,0 +1,11 @@ +args.update({light : { + "dim": 10, + "bright": 5, + "alpha": 0.5, + "animation": { + "speed": 4, + "intensity": 4, + "type": "flame", + }, + "color": "#ac9e6c", +}}); \ No newline at end of file diff --git a/reference_scripts/Xu5cED1MhT4ba7da.js b/reference_scripts/Xu5cED1MhT4ba7da.js new file mode 100644 index 0000000..a33a76d --- /dev/null +++ b/reference_scripts/Xu5cED1MhT4ba7da.js @@ -0,0 +1 @@ +args.fields.modifier += 10 diff --git a/reference_scripts/XuFxKPYheYF4WMmQ.js b/reference_scripts/XuFxKPYheYF4WMmQ.js new file mode 100644 index 0000000..ed63e68 --- /dev/null +++ b/reference_scripts/XuFxKPYheYF4WMmQ.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Cool"); \ No newline at end of file diff --git a/reference_scripts/Y6ppJBerpM3TtSic.js b/reference_scripts/Y6ppJBerpM3TtSic.js new file mode 100644 index 0000000..807715e --- /dev/null +++ b/reference_scripts/Y6ppJBerpM3TtSic.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.g4Q6AtzZuo5iIvD4"); +this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/Y7McxsHFeGhwQx0J.js b/reference_scripts/Y7McxsHFeGhwQx0J.js new file mode 100644 index 0000000..f2deebb --- /dev/null +++ b/reference_scripts/Y7McxsHFeGhwQx0J.js @@ -0,0 +1,11 @@ +this.actor.createEmbeddedDocuments("Item", [expandObject({ + name : "Ghostly Flame", + type : "weapon", + img : this.effect.img, + system : { + "weaponGroup.value" : "throwing", + "damage.value" : "SB + WPB", + "qualities.value" : [{name : "magical"}], + "equipped" : true + } +})], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Y8J66v8VTKUASGuK.js b/reference_scripts/Y8J66v8VTKUASGuK.js new file mode 100644 index 0000000..956a94a --- /dev/null +++ b/reference_scripts/Y8J66v8VTKUASGuK.js @@ -0,0 +1,16 @@ +if (!this.actor.effects.find(e => e.isCondition)) +{ + return this.script.scriptNotification("No Conditions on this Actor") +} + +let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choose a Condition") + +if (choice[0]) +{ + await this.actor.removeCondition(choice[0].conditionId) +} + +if (this.actor.effects.find(e => e.isCondition)) +{ + return false; // Delete the effect if there are still conditions, otherwise, effect remains and provides the bonus +} \ No newline at end of file diff --git a/reference_scripts/YDqpKJVy8ijEKdLX.js b/reference_scripts/YDqpKJVy8ijEKdLX.js new file mode 100644 index 0000000..3cc93cf --- /dev/null +++ b/reference_scripts/YDqpKJVy8ijEKdLX.js @@ -0,0 +1 @@ +return !(this.actor.attacker && (args.skill?.name.includes("Melee (Basic)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic"))) \ No newline at end of file diff --git a/reference_scripts/YEBw2CzHYxsTpTy5.js b/reference_scripts/YEBw2CzHYxsTpTy5.js new file mode 100644 index 0000000..8b438ad --- /dev/null +++ b/reference_scripts/YEBw2CzHYxsTpTy5.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Haggle"); \ No newline at end of file diff --git a/reference_scripts/YFSgWRXel0bWE3EE.js b/reference_scripts/YFSgWRXel0bWE3EE.js new file mode 100644 index 0000000..459f8b2 --- /dev/null +++ b/reference_scripts/YFSgWRXel0bWE3EE.js @@ -0,0 +1 @@ +return ["ag", "ws", "bs"].includes(args.characteristic) || args.skill?.name == game.i18n.localize("NAME.Climb"); \ No newline at end of file diff --git a/reference_scripts/YHEIkBKWXKNPqglh.js b/reference_scripts/YHEIkBKWXKNPqglh.js new file mode 100644 index 0000000..ee2ebfb --- /dev/null +++ b/reference_scripts/YHEIkBKWXKNPqglh.js @@ -0,0 +1,4 @@ +if (args.test.result.castOutcome == "success") +{ + game.wfrp4e.utility.postCorruptionTest("moderate", this.script.getChatData()) +} diff --git a/reference_scripts/YMaxpXnml01bLGpO.js b/reference_scripts/YMaxpXnml01bLGpO.js new file mode 100644 index 0000000..e1e5841 --- /dev/null +++ b/reference_scripts/YMaxpXnml01bLGpO.js @@ -0,0 +1 @@ +return args.item?.name.includes(game.i18n.localize("NAME.Stealth")) \ No newline at end of file diff --git a/reference_scripts/YOKoZFlBEpFavfOS.js b/reference_scripts/YOKoZFlBEpFavfOS.js new file mode 100644 index 0000000..b690956 --- /dev/null +++ b/reference_scripts/YOKoZFlBEpFavfOS.js @@ -0,0 +1 @@ +return args.type == "channelling" \ No newline at end of file diff --git a/reference_scripts/YQ2LnLxp0xgy3meI.js b/reference_scripts/YQ2LnLxp0xgy3meI.js new file mode 100644 index 0000000..8fe36d5 --- /dev/null +++ b/reference_scripts/YQ2LnLxp0xgy3meI.js @@ -0,0 +1,3 @@ +if (args.test.preData.options?.corruption && args.test.failed) { + args.test?.result?.other.push("Gain additional +1 Corruption from " + this.effect.name) +} \ No newline at end of file diff --git a/reference_scripts/YRUTliBzAQvncGNX.js b/reference_scripts/YRUTliBzAQvncGNX.js new file mode 100644 index 0000000..c29c046 --- /dev/null +++ b/reference_scripts/YRUTliBzAQvncGNX.js @@ -0,0 +1,2 @@ +this.actor.addCondition("fatigued"); +this.script.scriptNotification("Added Fatigued") \ No newline at end of file diff --git a/reference_scripts/YaKnYEbmmZZtByJc.js b/reference_scripts/YaKnYEbmmZZtByJc.js new file mode 100644 index 0000000..65dd7e3 --- /dev/null +++ b/reference_scripts/YaKnYEbmmZZtByJc.js @@ -0,0 +1,5 @@ +if (args.opposedTest.attackerTest.options.ballockKnife) +{ + args.weaponProperties.impale = true; + args.extraMessages.push(`${this.item.name}: Impale Added`) +} \ No newline at end of file diff --git a/reference_scripts/Yf2MmOzazzMdmoPU.js b/reference_scripts/Yf2MmOzazzMdmoPU.js new file mode 100644 index 0000000..19b3449 --- /dev/null +++ b/reference_scripts/Yf2MmOzazzMdmoPU.js @@ -0,0 +1,12 @@ +let armour = await fromUuid("Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj") +let armourData = armour.toObject() +armourData.system.specification.value = 1 + +let fury = await fromUuid("Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp"); +let furyData = fury.toObject(); + +let horns = await fromUuid("Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW") +let hornsData = horns.toObject() +hornsData.system.specification.value = 6 + +this.actor.createEmbeddedDocuments("Item", [armourData, furyData, hornsData], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/YhhiWEQbox3WZA3Q.js b/reference_scripts/YhhiWEQbox3WZA3Q.js new file mode 100644 index 0000000..4b25255 --- /dev/null +++ b/reference_scripts/YhhiWEQbox3WZA3Q.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Heal") && game.combat?.active \ No newline at end of file diff --git a/reference_scripts/YjAIsFlxKTJvYs60.js b/reference_scripts/YjAIsFlxKTJvYs60.js new file mode 100644 index 0000000..aae8c55 --- /dev/null +++ b/reference_scripts/YjAIsFlxKTJvYs60.js @@ -0,0 +1 @@ +this.item.system.reduceQuantity(); \ No newline at end of file diff --git a/reference_scripts/YjJcRdytVRm88qLn.js b/reference_scripts/YjJcRdytVRm88qLn.js new file mode 100644 index 0000000..e34b448 --- /dev/null +++ b/reference_scripts/YjJcRdytVRm88qLn.js @@ -0,0 +1 @@ +args.options.additionalDamage = 1 \ No newline at end of file diff --git a/reference_scripts/YsS2RZsl2ZsqjhWV.js b/reference_scripts/YsS2RZsl2ZsqjhWV.js new file mode 100644 index 0000000..247e5e0 --- /dev/null +++ b/reference_scripts/YsS2RZsl2ZsqjhWV.js @@ -0,0 +1 @@ +return !args.fields.charging \ No newline at end of file diff --git a/reference_scripts/YwLEw4BiKq4EMy57.js b/reference_scripts/YwLEw4BiKq4EMy57.js new file mode 100644 index 0000000..277a43a --- /dev/null +++ b/reference_scripts/YwLEw4BiKq4EMy57.js @@ -0,0 +1,19 @@ +let i_gain = (await new Roll("2d10").roll()).total +let fel_gain = 0 +if (args.actor.characteristics.fel.value <= 0) +{ + fel_gain += (await new Roll("2d10").roll()).total +} + +let msg = `${this.actor.prototypeToken.name} gains ${i_gain} Intelligence` + +if (fel_gain) + msg += ` and ${fel_gain} Fellowship` + + +let newInt = i_gain + args.actor.characteristics.int.modifier +let newFel = fel_gain + args.actor.characteristics.fel.modifier + +args.actor.update({"system.characteristics.int.modifier" : newInt, "system.characteristics.fel.modifier" : newFel}) + +this.script.scriptMessage(msg) \ No newline at end of file diff --git a/reference_scripts/YyKU2rIRmFSCqSlW.js b/reference_scripts/YyKU2rIRmFSCqSlW.js new file mode 100644 index 0000000..dc0a984 --- /dev/null +++ b/reference_scripts/YyKU2rIRmFSCqSlW.js @@ -0,0 +1,6 @@ +let newEffect = this.effect.sourceItem.effects?.contents[1] + +if (newEffect) +{ + this.actor.createEmbeddedDocuments("ActiveEffect", [newEffect.convertToApplied()]); +} \ No newline at end of file diff --git a/reference_scripts/Z1zriXibT0mAmdhb.js b/reference_scripts/Z1zriXibT0mAmdhb.js new file mode 100644 index 0000000..a583e99 --- /dev/null +++ b/reference_scripts/Z1zriXibT0mAmdhb.js @@ -0,0 +1,6 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW") +item = item.toObject() +item.name = this.effect.name +item.system.specification.value = this.actor.characteristics.s.bonus +item.system.description.value = "" +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/Z30zYayPryXOjT5N.js b/reference_scripts/Z30zYayPryXOjT5N.js new file mode 100644 index 0000000..4cb014e --- /dev/null +++ b/reference_scripts/Z30zYayPryXOjT5N.js @@ -0,0 +1 @@ +args.item.system.damage.value = "SB + 6"; \ No newline at end of file diff --git a/reference_scripts/Z4WrrlVGpPY4iUbG.js b/reference_scripts/Z4WrrlVGpPY4iUbG.js new file mode 100644 index 0000000..fcc4289 --- /dev/null +++ b/reference_scripts/Z4WrrlVGpPY4iUbG.js @@ -0,0 +1 @@ +await this.actor.addCondition("ablaze") \ No newline at end of file diff --git a/reference_scripts/Z52yZDm6lP6fOP3O.js b/reference_scripts/Z52yZDm6lP6fOP3O.js new file mode 100644 index 0000000..07e9c66 --- /dev/null +++ b/reference_scripts/Z52yZDm6lP6fOP3O.js @@ -0,0 +1,6 @@ +let ablaze = this.actor.hasCondition("ablaze") +if (ablaze) +{ + this.script.scriptNotification("Immune to Ablaze"); + ablaze.delete() +} \ No newline at end of file diff --git a/reference_scripts/Z6OmmC0irJzxSnMH.js b/reference_scripts/Z6OmmC0irJzxSnMH.js new file mode 100644 index 0000000..83bc8f3 --- /dev/null +++ b/reference_scripts/Z6OmmC0irJzxSnMH.js @@ -0,0 +1,59 @@ +let chatData = { whisper: ChatMessage.getWhisperRecipients("GM") } +let message = "" + +let wounds = duplicate(this.actor.status.wounds) +let regenRoll = await new Roll("1d10").roll(); +let regen = regenRoll.total; + +if (wounds.value >= wounds.max) + return + +if (wounds.value > 0) +{ + wounds.value += regen + if (wounds.value > wounds.max) + { + wounds.value = wounds.max + } + message += `${this.actor.name} regains ${regen} Wounds.` + + if (regen == 10) + { + message += `
Additionally, they regenerate a Critical Wound.` + } +} +else if (regen >= 8) +{ + message += `${this.actor.name} rolled a ${regen} and regains 1 Wound.` + wounds.value += 1 + if (regen == 10) + { + message += `
Additionally, they regenerate a Critical Wound.` + } +} +else +{ + message += `${this.actor.name} Regenerate roll of ${regen} - No effect.` +} + +await this.actor.update({ "system.status.wounds": wounds }) +this.script.scriptMessage(message, { whisper: ChatMessage.getWhisperRecipients("GM") }) + +if (this.actor.Species?.toLowerCase() != "ogre") +{ + this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name, fields : {difficulty : "average"}}).then(test => { + test.roll() + }) +} + + + + + + + + + + + + diff --git a/reference_scripts/Z6jNlyZMECkW4Hon.js b/reference_scripts/Z6jNlyZMECkW4Hon.js new file mode 100644 index 0000000..e9b08d4 --- /dev/null +++ b/reference_scripts/Z6jNlyZMECkW4Hon.js @@ -0,0 +1,13 @@ +let spells = await game.wfrp4e.utility.findAll("spell", "Loading Spells", true); + +let choice = await ItemDialog.create(spells, 1); + +if (choice[0]) +{ + this.script.scriptMessage(`Chose @UUID[${choice[0].uuid}]{${choice[0].name}}`) + let spell = (await fromUuid(choice[0].uuid)).toObject(); // Might be an index so retrieve item object for sure + setProperty(spell, "flags.wfrp4e.boonOfTzeentch", true); + spell.system.wind.value = "Channelling (Dhar)"; + spell.system.memorized.value = true; + this.actor.createEmbeddedDocuments("Item", [spell], {fromEffect: this.effect.id}) +} \ No newline at end of file diff --git a/reference_scripts/ZCkYe5XMVY1RWMXG.js b/reference_scripts/ZCkYe5XMVY1RWMXG.js new file mode 100644 index 0000000..34cd3e9 --- /dev/null +++ b/reference_scripts/ZCkYe5XMVY1RWMXG.js @@ -0,0 +1 @@ +args.options.wallcrawler = true; \ No newline at end of file diff --git a/reference_scripts/ZCrfdLPOxiNDCDSg.js b/reference_scripts/ZCrfdLPOxiNDCDSg.js new file mode 100644 index 0000000..dfcbf82 --- /dev/null +++ b/reference_scripts/ZCrfdLPOxiNDCDSg.js @@ -0,0 +1 @@ +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/reference_scripts/ZCuOjLAeENKN1Q4L.js b/reference_scripts/ZCuOjLAeENKN1Q4L.js new file mode 100644 index 0000000..88928db --- /dev/null +++ b/reference_scripts/ZCuOjLAeENKN1Q4L.js @@ -0,0 +1,15 @@ +let halve; +if (args.opposedTest.attackerTest.item?.type != "spell") +{ + halve = await Dialog.confirm({title : this.effect.name, content : "Halve Damage? (Halves Damage from all fire)"}) +} +else +{ + halve = args.opposedTest.attackerTest.item?.system.lore?.value == "fire"; +} + +if (halve) +{ + args.totalWoundLoss /= 2; + args.modifiers.other.push({label : this.effect.name, details : "Halved", value : "× 0.5"}) +} \ No newline at end of file diff --git a/reference_scripts/ZEXhYJqqxF6QAixX.js b/reference_scripts/ZEXhYJqqxF6QAixX.js new file mode 100644 index 0000000..9070cbc --- /dev/null +++ b/reference_scripts/ZEXhYJqqxF6QAixX.js @@ -0,0 +1 @@ +return args.options.terror || args.extendedTest?.getFlag("wfrp4e", "fear"); \ No newline at end of file diff --git a/reference_scripts/ZEdDcBka21rnMuz5.js b/reference_scripts/ZEdDcBka21rnMuz5.js new file mode 100644 index 0000000..0b33c5e --- /dev/null +++ b/reference_scripts/ZEdDcBka21rnMuz5.js @@ -0,0 +1,19 @@ +let initiativeSetting = game.settings.get("wfrp4e", "initiativeRule") + +switch (initiativeSetting) { + case "default": + args.initiative += "+10" + break; + + case "sl": + args.initiative += "+1" + break; + + case "d10Init": + args.initiative += "+10" + break; + + case "d10InitAgi": + args.initiative += "+1" + break; +} \ No newline at end of file diff --git a/reference_scripts/ZGlJnrIemqul24j7.js b/reference_scripts/ZGlJnrIemqul24j7.js new file mode 100644 index 0000000..4054270 --- /dev/null +++ b/reference_scripts/ZGlJnrIemqul24j7.js @@ -0,0 +1,8 @@ +let infected = await fromUuid("Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW") +let bite = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") +let biteData = bite.toObject(); +let infectedData = infected.toObject(); + +biteData.system.specification.value = 4 - this.actor.characteristics.s.bonus + +this.actor.createEmbeddedDocuments("Item", [biteData, infectedData], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/ZI2YnAAGoLpmVDIL.js b/reference_scripts/ZI2YnAAGoLpmVDIL.js new file mode 100644 index 0000000..9f19b3e --- /dev/null +++ b/reference_scripts/ZI2YnAAGoLpmVDIL.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.aE3pyW20Orvdjzj0") +let data = item.toObject(); +data.system.specification.value = "Religion" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/ZJy2rvpKmUHXGrAi.js b/reference_scripts/ZJy2rvpKmUHXGrAi.js new file mode 100644 index 0000000..c8deacc --- /dev/null +++ b/reference_scripts/ZJy2rvpKmUHXGrAi.js @@ -0,0 +1 @@ +args.actor.details.move.run *= 1.5 \ No newline at end of file diff --git a/reference_scripts/ZMwJad6v4G13SgjR.js b/reference_scripts/ZMwJad6v4G13SgjR.js new file mode 100644 index 0000000..09abcb6 --- /dev/null +++ b/reference_scripts/ZMwJad6v4G13SgjR.js @@ -0,0 +1 @@ +return args.type == "cast" || args.type == "channelling" \ No newline at end of file diff --git a/reference_scripts/ZNW3ubbKIYXAyE48.js b/reference_scripts/ZNW3ubbKIYXAyE48.js new file mode 100644 index 0000000..8669753 --- /dev/null +++ b/reference_scripts/ZNW3ubbKIYXAyE48.js @@ -0,0 +1,29 @@ +let wounds = this.actor.itemTypes.disease.filter(i => i.name == "Festering Wound" && i.system.duration.active); +let selected; +if (wounds.length == 0) +{ + return this.script.scriptNotification("No Festering Wounds!"); +} +else if (wounds.length == 1) +{ + selected = wounds[0]; +} +else if (wounds.length >= 2) +{ + selected = (await ItemDialog.create(wounds, 1))[0]; +} + +if (selected) +{ + let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "average"}}) + await test.roll(); + if (test.succeeded) + { + let SL = parseInt(test.result.SL); + if (SL >= 0) + { + selected.update({"system.duration.value" : selected.system.duration.value - SL}) + this.script.scriptMessage(`${selected.name} duration reduced by ${SL}!`) + } + } +} \ No newline at end of file diff --git a/reference_scripts/ZNu4B0OdjkM9lmtu.js b/reference_scripts/ZNu4B0OdjkM9lmtu.js new file mode 100644 index 0000000..2177c29 --- /dev/null +++ b/reference_scripts/ZNu4B0OdjkM9lmtu.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") +let data = item.toObject(); +data.name = data.name += " (Vision)" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/ZTE8LdRblyG4yYoE.js b/reference_scripts/ZTE8LdRblyG4yYoE.js new file mode 100644 index 0000000..16fcab5 --- /dev/null +++ b/reference_scripts/ZTE8LdRblyG4yYoE.js @@ -0,0 +1,8 @@ +if (args.test.result.castOutcome == "success") +{ + // Wait till after chat card is posted + game.wfrp4e.utility.sleep(500).then(() => { + game.wfrp4e.utility.postTerror(1, this.effect.name) + game.wfrp4e.utility.postTerror(2, this.effect.name) + }) +} \ No newline at end of file diff --git a/reference_scripts/ZYsMgB4BwXBJcpYf.js b/reference_scripts/ZYsMgB4BwXBJcpYf.js new file mode 100644 index 0000000..e935d19 --- /dev/null +++ b/reference_scripts/ZYsMgB4BwXBJcpYf.js @@ -0,0 +1,3 @@ +// The wearer of the cloak causes Fear 2 +// in Wolves, Lions, Goats, and Chimeras. +game.wfrp4e.utility.postFear(2, this.effect.name) diff --git a/reference_scripts/ZbuW8y7t9Y8oUFWq.js b/reference_scripts/ZbuW8y7t9Y8oUFWq.js new file mode 100644 index 0000000..16270cc --- /dev/null +++ b/reference_scripts/ZbuW8y7t9Y8oUFWq.js @@ -0,0 +1 @@ +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")) \ No newline at end of file diff --git a/reference_scripts/ZdHvGvSJBsIuPphF.js b/reference_scripts/ZdHvGvSJBsIuPphF.js new file mode 100644 index 0000000..b20bae0 --- /dev/null +++ b/reference_scripts/ZdHvGvSJBsIuPphF.js @@ -0,0 +1 @@ +return !args.fields.dualWielding && !args.options.dualWieldOffhand \ No newline at end of file diff --git a/reference_scripts/Ze9E2zR1GFGWGMVH.js b/reference_scripts/Ze9E2zR1GFGWGMVH.js new file mode 100644 index 0000000..1cc8e6f --- /dev/null +++ b/reference_scripts/Ze9E2zR1GFGWGMVH.js @@ -0,0 +1 @@ +return ["Pick Lock", "Sleight of Hand", "Channelling (Ulgu)"].includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/ZhuitY1KOU1Xe7cP.js b/reference_scripts/ZhuitY1KOU1Xe7cP.js new file mode 100644 index 0000000..70a94b6 --- /dev/null +++ b/reference_scripts/ZhuitY1KOU1Xe7cP.js @@ -0,0 +1 @@ +return !args.weapon?.system.properties.qualities.pummel \ No newline at end of file diff --git a/reference_scripts/ZqTW093qENOwGONP.js b/reference_scripts/ZqTW093qENOwGONP.js new file mode 100644 index 0000000..9757bed --- /dev/null +++ b/reference_scripts/ZqTW093qENOwGONP.js @@ -0,0 +1,10 @@ +let msg = "" + +let SL = parseInt(this.effect.sourceTest.result.SL); + +for(let i = 0; i < SL; i++) +{ + msg += `

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

` +} + +this.script.scriptMessage(msg); \ No newline at end of file diff --git a/reference_scripts/ZrePyV2spv3v65Tg.js b/reference_scripts/ZrePyV2spv3v65Tg.js new file mode 100644 index 0000000..e7da169 --- /dev/null +++ b/reference_scripts/ZrePyV2spv3v65Tg.js @@ -0,0 +1 @@ +return args.type != "weapon" && !this.actor.statuses.has("infighting") \ No newline at end of file diff --git a/reference_scripts/ZsQR3AVKi0v5U593.js b/reference_scripts/ZsQR3AVKi0v5U593.js new file mode 100644 index 0000000..9ecf140 --- /dev/null +++ b/reference_scripts/ZsQR3AVKi0v5U593.js @@ -0,0 +1 @@ +args.actor.addCondition("ablaze", 2) \ No newline at end of file diff --git a/reference_scripts/ZvbBM4gTJHPdU8jU.js b/reference_scripts/ZvbBM4gTJHPdU8jU.js new file mode 100644 index 0000000..b8ce00a --- /dev/null +++ b/reference_scripts/ZvbBM4gTJHPdU8jU.js @@ -0,0 +1,3 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) +await test.roll(); +return test.failed \ No newline at end of file diff --git a/reference_scripts/Zxh4RAENoaAQAaNg.js b/reference_scripts/Zxh4RAENoaAQAaNg.js new file mode 100644 index 0000000..a16ea6f --- /dev/null +++ b/reference_scripts/Zxh4RAENoaAQAaNg.js @@ -0,0 +1 @@ +return !this.actor.flags.useless.rEye || !this.actor.flags.useless.lEye || ["wp", "t", "s"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/ZxtOdwsM2Sqj9Zam.js b/reference_scripts/ZxtOdwsM2Sqj9Zam.js new file mode 100644 index 0000000..e58661f --- /dev/null +++ b/reference_scripts/ZxtOdwsM2Sqj9Zam.js @@ -0,0 +1,5 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM") +let data = item.toObject(); +data.system.specification.value = 0 +data.name = this.effect.name; +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/a02tlRCXpaoaDjSN.js b/reference_scripts/a02tlRCXpaoaDjSN.js new file mode 100644 index 0000000..c70bd5f --- /dev/null +++ b/reference_scripts/a02tlRCXpaoaDjSN.js @@ -0,0 +1,16 @@ +let careers = await game.wfrp4e.utility.findAll("career", "", true); +careers.forEach(c => { + if (!c.id) + { + c.id = c._id; + } +}); +let choice = await ItemDialog.create(careers, 1, "Choose Double Life Career"); +if (choice[0]) +{ + let career = await fromUuid(choice[0].uuid); + let data = career.toObject(); + setProperty(data, "flags.wfrp4e.doubleLife", true); + this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) + this.effect.updateSource({name : this.effect.name + ` (${data.name})`}) +} diff --git a/reference_scripts/a0YU3whUm16wGBNu.js b/reference_scripts/a0YU3whUm16wGBNu.js new file mode 100644 index 0000000..ed24c51 --- /dev/null +++ b/reference_scripts/a0YU3whUm16wGBNu.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}}) +await test.roll(); + +if (test.failed) +{ + this.actor.addCondition("fatigued"); +} \ No newline at end of file diff --git a/reference_scripts/a4Aza4a9v8JMU8dC.js b/reference_scripts/a4Aza4a9v8JMU8dC.js new file mode 100644 index 0000000..7ec136f --- /dev/null +++ b/reference_scripts/a4Aza4a9v8JMU8dC.js @@ -0,0 +1,2 @@ +const talents = await Promise.all(["Frenzy", "Magic Resistance"].map(game.wfrp4e.utility.findTalent)) +this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/a6gacHsvgwtsIFSQ.js b/reference_scripts/a6gacHsvgwtsIFSQ.js new file mode 100644 index 0000000..735565f --- /dev/null +++ b/reference_scripts/a6gacHsvgwtsIFSQ.js @@ -0,0 +1,2 @@ +if (args.test.item && args.test.item.name == game.i18n.localize("NAME.Research")) + args.test.preData.canReverse = true \ No newline at end of file diff --git a/reference_scripts/a7pEvCycVnFBXGAQ.js b/reference_scripts/a7pEvCycVnFBXGAQ.js new file mode 100644 index 0000000..604c31c --- /dev/null +++ b/reference_scripts/a7pEvCycVnFBXGAQ.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupCharacteristic("i", {skipTargets: true, appendTitle : " - Stunned", fields : {difficulty : "easy"}}) +await test.roll(); + +if (!test.succeeded) +{ + this.actor.addCondition("stunned"); +} \ No newline at end of file diff --git a/reference_scripts/a8RabrnJ08O07rDX.js b/reference_scripts/a8RabrnJ08O07rDX.js new file mode 100644 index 0000000..5ac0cfe --- /dev/null +++ b/reference_scripts/a8RabrnJ08O07rDX.js @@ -0,0 +1,5 @@ +if (args.totalWoundLoss > 0) +{ + // I'm assuming the endurance test specified is for the end-round check + await args.actor.addCondition("poisoned", 2); +} \ No newline at end of file diff --git a/reference_scripts/a8i0sA1RBnD8nHZt.js b/reference_scripts/a8i0sA1RBnD8nHZt.js new file mode 100644 index 0000000..b78fb2c --- /dev/null +++ b/reference_scripts/a8i0sA1RBnD8nHZt.js @@ -0,0 +1,42 @@ +let caster = this.effect.sourceActor +let targetedItem = this.actor.items.get(this.effect.flags.wfrp4e.itemTargets[0]) + +let qualities = foundry.utils.deepClone(game.wfrp4e.config.itemQualities); +let flaws = foundry.utils.deepClone(game.wfrp4e.config.itemFlaws); + +if (targetedItem.type == "weapon") +{ + mergeObject(qualities, game.wfrp4e.config.weaponQualities) + mergeObject(flaws, game.wfrp4e.config.weaponFlaws) +} +else if (targetedItem.type == "armour") +{ + mergeObject(qualities, game.wfrp4e.config.armorQualities) + mergeObject(flaws, game.wfrp4e.config.armorFlaws) +} + +for(let q in qualities) +{ + // If the weapon already has a flaw, don't put it in the dialog + if (targetedItem.system.properties.qualities[q]) + { + delete qualities[q] + } +} +for(let f in flaws) +{ + // If a weapon doesn't have a flaw, don't put it in the dialog + if (!targetedItem.system.properties.flaws[f]) + { + delete flaws[f] + } +} + +let added = await ItemDialog.create(ItemDialog.objectToArray(qualities), "unlimited", "Choose Qualities to add"); +let removed = [] +if (!foundry.utils.isEmpty(flaws)) +{ + removed = await ItemDialog.create(ItemDialog.objectToArray(flaws), "unlimited", "Choose Flaws to remove"); +} + +this.effect.updateSource({"flags.wfrp4e.propertiesChanged" : {added : added.map(i => i.id), removed : removed.map(i => i.id)}}) diff --git a/reference_scripts/aAvJrAKLzXhS9qN6.js b/reference_scripts/aAvJrAKLzXhS9qN6.js new file mode 100644 index 0000000..645c806 --- /dev/null +++ b/reference_scripts/aAvJrAKLzXhS9qN6.js @@ -0,0 +1 @@ +return args.item?.name == game.i18n.localize("NAME.Climb") \ No newline at end of file diff --git a/reference_scripts/aCVtaW8ag1WibcAr.js b/reference_scripts/aCVtaW8ag1WibcAr.js new file mode 100644 index 0000000..bf9b92d --- /dev/null +++ b/reference_scripts/aCVtaW8ag1WibcAr.js @@ -0,0 +1,2 @@ +args.attacker.modifyWounds(1) +this.script.scriptMessage(`${args.attacker.prototypeToken.name} recovers 1 Wound.`) \ No newline at end of file diff --git a/reference_scripts/aIYUsBIDKWJ3CEtj.js b/reference_scripts/aIYUsBIDKWJ3CEtj.js new file mode 100644 index 0000000..9779863 --- /dev/null +++ b/reference_scripts/aIYUsBIDKWJ3CEtj.js @@ -0,0 +1 @@ +this.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true})); \ No newline at end of file diff --git a/reference_scripts/aMHGjWyn6BXCI4pw.js b/reference_scripts/aMHGjWyn6BXCI4pw.js new file mode 100644 index 0000000..0f73350 --- /dev/null +++ b/reference_scripts/aMHGjWyn6BXCI4pw.js @@ -0,0 +1,2 @@ +let frenzy = await fromUuid("Compendium.wfrp4e-core.items.Item.hXcfygzujgyMN1uI"); +this.actor.createEmbeddedDocuments("Item", [frenzy], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/abLWYtNTu1UVDQAs.js b/reference_scripts/abLWYtNTu1UVDQAs.js new file mode 100644 index 0000000..547de25 --- /dev/null +++ b/reference_scripts/abLWYtNTu1UVDQAs.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.hitloc.value == this.effect.flags.wfrp4e.location) // e.g. 'head', rLeg, 'lArm' +{ + this.scriptMessage(`Gains a @Condition[Blinded] condition as their ${this.item.name} was hit`); + this.actor.addCondition("blinded"); +} \ No newline at end of file diff --git a/reference_scripts/abVIvJBzuskNzCQv.js b/reference_scripts/abVIvJBzuskNzCQv.js new file mode 100644 index 0000000..2fd5bf8 --- /dev/null +++ b/reference_scripts/abVIvJBzuskNzCQv.js @@ -0,0 +1,8 @@ +let amount = this.effect.sourceTest.result.overcast.usage.other.current; + +let sss = await fromUuid("Compendium.wfrp4e-core.items.MGEPI4jNhymNIRVz"); +let strider = await fromUuid("Compendium.wfrp4e-core.items.1dUizIgLBgn4jICC"); + +let items = Array(amount).fill(sss).concat(Array(amount).fill(strider)) + +this.actor.createEmbeddedDocuments("Item", items, {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/afdmOvPGMpEdZvCb.js b/reference_scripts/afdmOvPGMpEdZvCb.js new file mode 100644 index 0000000..20d9df6 --- /dev/null +++ b/reference_scripts/afdmOvPGMpEdZvCb.js @@ -0,0 +1 @@ +return (args.skill?.name == game.i18n.localize("NAME.Perception") || args.characteristic == "fel") \ No newline at end of file diff --git a/reference_scripts/agsm3NI1NDtHRG4y.js b/reference_scripts/agsm3NI1NDtHRG4y.js new file mode 100644 index 0000000..3391c51 --- /dev/null +++ b/reference_scripts/agsm3NI1NDtHRG4y.js @@ -0,0 +1 @@ +this.actor.getActiveTokens().forEach(t => t.document.update({texture : this.actor.prototypeToken.texture}, {animate : false})); \ No newline at end of file diff --git a/reference_scripts/ahbA7o5G9dzMFl76.js b/reference_scripts/ahbA7o5G9dzMFl76.js new file mode 100644 index 0000000..0937f98 --- /dev/null +++ b/reference_scripts/ahbA7o5G9dzMFl76.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.SfUUdOGjdYpr3KSR") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/alJgj25l3239h2SW.js b/reference_scripts/alJgj25l3239h2SW.js new file mode 100644 index 0000000..edd4d2f --- /dev/null +++ b/reference_scripts/alJgj25l3239h2SW.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.hTgrGkWnmIR4xhVe") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/ayIbw2Vw2t9xg33P.js b/reference_scripts/ayIbw2Vw2t9xg33P.js new file mode 100644 index 0000000..0af0e36 --- /dev/null +++ b/reference_scripts/ayIbw2Vw2t9xg33P.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.EaqlLRQigwnsEAXX") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/b1zMefdoZYtzCm7i.js b/reference_scripts/b1zMefdoZYtzCm7i.js new file mode 100644 index 0000000..d165c01 --- /dev/null +++ b/reference_scripts/b1zMefdoZYtzCm7i.js @@ -0,0 +1 @@ +return ["roll", "none"].includes(args.fields.hitLocation) || args.item?.attackType != "ranged" \ No newline at end of file diff --git a/reference_scripts/b2Kb4IuD22RhKhR0.js b/reference_scripts/b2Kb4IuD22RhKhR0.js new file mode 100644 index 0000000..fcbecf9 --- /dev/null +++ b/reference_scripts/b2Kb4IuD22RhKhR0.js @@ -0,0 +1,10 @@ +let actor = Array.from(game.user.targets)[0]?.actor; + +if (actor) +{ + actor.applyEffect({effectUuids : this.effect.sourceItem.effects.contents[0].uuid}) +} +else +{ + this.script.scriptNotification("No target!", "error") +} \ No newline at end of file diff --git a/reference_scripts/b2WaqRna5CFXmbDG.js b/reference_scripts/b2WaqRna5CFXmbDG.js new file mode 100644 index 0000000..8f874fd --- /dev/null +++ b/reference_scripts/b2WaqRna5CFXmbDG.js @@ -0,0 +1 @@ +args.options.stag = true; \ No newline at end of file diff --git a/reference_scripts/b5DfAWtpV1x2R8If.js b/reference_scripts/b5DfAWtpV1x2R8If.js new file mode 100644 index 0000000..c9f120e --- /dev/null +++ b/reference_scripts/b5DfAWtpV1x2R8If.js @@ -0,0 +1 @@ +this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true})) \ No newline at end of file diff --git a/reference_scripts/b5prg1FLjCAvBjLy.js b/reference_scripts/b5prg1FLjCAvBjLy.js new file mode 100644 index 0000000..705112f --- /dev/null +++ b/reference_scripts/b5prg1FLjCAvBjLy.js @@ -0,0 +1,13 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.zyocWSzEZEC826NS") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data]) + + +let 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) +{ + await this.actor.addCondition("prone") + await this.actor.addCondition("stunned") +} \ No newline at end of file diff --git a/reference_scripts/bBdXzBmxgFFBwMMS.js b/reference_scripts/bBdXzBmxgFFBwMMS.js new file mode 100644 index 0000000..b0eea24 --- /dev/null +++ b/reference_scripts/bBdXzBmxgFFBwMMS.js @@ -0,0 +1,9 @@ +if(args.opposedTest.attackerTest.item?.isRanged && args.applyAP && !args.sureShot) +{ + if (args.modifiers.ap.value) + { + args.sureShot = true; + args.modifiers.ap.details.push(`${this.effect.name} (Ignore ${this.item.Advances})`) + args.modifiers.ap.ignored += this.item.Advances; + } +} \ No newline at end of file diff --git a/reference_scripts/bEVlJOOA1kLlzpWx.js b/reference_scripts/bEVlJOOA1kLlzpWx.js new file mode 100644 index 0000000..4a07c15 --- /dev/null +++ b/reference_scripts/bEVlJOOA1kLlzpWx.js @@ -0,0 +1,86 @@ +let characteristics = { + "ws" : 10, + "bs" : 0, + "s" : 5, + "t" : 15, + "i" : 20, + "ag" : 15, + "dex" : 20, + "int" : 35, + "wp" : 30, + "fel" : 10 +} +let skills = ["Channelling", "Cool", "Dodge", "Entertain (Storytelling)", "Intuition", "Language (Magick)", "Leadership", "Lore (Magic)", "Lore (Theology)", "Perception"] +let skillAdvancements = [20, 25, 20, 25, 30, 25, 15, 20, 10, 30] +let talents = ["Aethyric Attunement", "Arcane Magic", "Instinctive Diction", "Instinctive Diction", "Luck", "Magical Sense", "Menacing", "Petty Magic", "Second Sight", "Sixth Sense"] +let trappings = ["Hand Weapon", "Quarterstaff", "Ritual Dress incorporating many ingredients and fetishes"] +let items = []; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + items.push({name : trapping, type : "trapping", "system.trappingType.value" : "clothingAccessories"}) + //ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } +} + +updateObj.name = updateObj.name += " " + this.effect.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/bLkt8VpTTPoTxW0W.js b/reference_scripts/bLkt8VpTTPoTxW0W.js new file mode 100644 index 0000000..73567e8 --- /dev/null +++ b/reference_scripts/bLkt8VpTTPoTxW0W.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) +{ + args.actor.addCondition("bleeding", 1); + this.script.scriptNotification("Added Bleeding") +} diff --git a/reference_scripts/bMEFHPCei2evnZZw.js b/reference_scripts/bMEFHPCei2evnZZw.js new file mode 100644 index 0000000..7eb94d5 --- /dev/null +++ b/reference_scripts/bMEFHPCei2evnZZw.js @@ -0,0 +1,14 @@ +// Victims that take at least 1 Wound from a Fell Dagger +// immediately take a Poisoned Condition +// resisted with a Difficult (-10) Endurance Test. + +// TODO: Add Venom strength to message + +if (args.totalWoundLoss > 0) +{ + args.actor.addCondition("poisoned") + this.script.scriptMessage(` + ${this.effect.name}:
+ ${args.actor.name} has been given a @Condition[Poisoned] Condition, which can be resisted with a Difficult (-10) Endurance Test.`, + {whisper: ChatMessage.getWhisperRecipients("GM")}) +} diff --git a/reference_scripts/bQyVajMN1ETwlzvM.js b/reference_scripts/bQyVajMN1ETwlzvM.js new file mode 100644 index 0000000..757c282 --- /dev/null +++ b/reference_scripts/bQyVajMN1ETwlzvM.js @@ -0,0 +1,9 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.aE3pyW20Orvdjzj0") +let data = item.toObject(); +let target = await game.wfrp4e.tables.rollTable("fixations") +if (target) +{ + data.system.specification.value = target.result + this.script.scriptNotification(target.result); +} +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/bRtZH0xRh8dgqMeW.js b/reference_scripts/bRtZH0xRh8dgqMeW.js new file mode 100644 index 0000000..03b6b69 --- /dev/null +++ b/reference_scripts/bRtZH0xRh8dgqMeW.js @@ -0,0 +1,5 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW") +let data = item.toObject(); +data.system.specification.value = 7 - this.actor.characteristics.s.bonus +data.name = item.name.replace("(Feature)", ""); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/bWr8leucbWslBCYG.js b/reference_scripts/bWr8leucbWslBCYG.js new file mode 100644 index 0000000..b794c09 --- /dev/null +++ b/reference_scripts/bWr8leucbWslBCYG.js @@ -0,0 +1 @@ +return args.characteristic != "s" \ No newline at end of file diff --git a/reference_scripts/bhXUW7IJtEaUGAoV.js b/reference_scripts/bhXUW7IJtEaUGAoV.js new file mode 100644 index 0000000..5be3c04 --- /dev/null +++ b/reference_scripts/bhXUW7IJtEaUGAoV.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {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/reference_scripts/brNRqfpPqD2Ki0cM.js b/reference_scripts/brNRqfpPqD2Ki0cM.js new file mode 100644 index 0000000..e7cf66e --- /dev/null +++ b/reference_scripts/brNRqfpPqD2Ki0cM.js @@ -0,0 +1 @@ +args.prefillModifiers.modifier -= 10 \ No newline at end of file diff --git a/reference_scripts/btPrQkGRKUkhNe3N.js b/reference_scripts/btPrQkGRKUkhNe3N.js new file mode 100644 index 0000000..8c320ab --- /dev/null +++ b/reference_scripts/btPrQkGRKUkhNe3N.js @@ -0,0 +1 @@ +return args.skill?.name == "Trade (Apothecary)" \ No newline at end of file diff --git a/reference_scripts/bwtQOSWn120NICkf.js b/reference_scripts/bwtQOSWn120NICkf.js new file mode 100644 index 0000000..5b27c29 --- /dev/null +++ b/reference_scripts/bwtQOSWn120NICkf.js @@ -0,0 +1,8 @@ +let test = await this.actor.setupCharacteristic("ag", {fields : {difficulty : "hard"}}); +await test.roll(); + +if (test.failed) +{ + await this.actor.addCondition("bleeding") + await this.actor.addCondition("entangled") +} \ No newline at end of file diff --git a/reference_scripts/bwx9wuEOJPF7btD1.js b/reference_scripts/bwx9wuEOJPF7btD1.js new file mode 100644 index 0000000..fd35010 --- /dev/null +++ b/reference_scripts/bwx9wuEOJPF7btD1.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Navigation"); \ No newline at end of file diff --git a/reference_scripts/bzaoWcieMFaU5B5l.js b/reference_scripts/bzaoWcieMFaU5B5l.js new file mode 100644 index 0000000..1d94b8f --- /dev/null +++ b/reference_scripts/bzaoWcieMFaU5B5l.js @@ -0,0 +1 @@ +return !this.actor.flags.useless[this.item.system.location.key] || ["fel", "wp", "int", "t"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/c31hjp7k0hlpdGBC.js b/reference_scripts/c31hjp7k0hlpdGBC.js new file mode 100644 index 0000000..5908428 --- /dev/null +++ b/reference_scripts/c31hjp7k0hlpdGBC.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q"); +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/c3KA1knL2NYNUEww.js b/reference_scripts/c3KA1knL2NYNUEww.js new file mode 100644 index 0000000..b904c0c --- /dev/null +++ b/reference_scripts/c3KA1knL2NYNUEww.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Evaluate"); \ No newline at end of file diff --git a/reference_scripts/cAioHYtlxuOCwRLh.js b/reference_scripts/cAioHYtlxuOCwRLh.js new file mode 100644 index 0000000..7ce39d7 --- /dev/null +++ b/reference_scripts/cAioHYtlxuOCwRLh.js @@ -0,0 +1,2 @@ +let ablaze = Number(args.opposedTest.attackerTest.result.SL) + 1 +args.actor.addCondition("ablaze", ablaze) \ No newline at end of file diff --git a/reference_scripts/cApfxL7Ic0NKdoSr.js b/reference_scripts/cApfxL7Ic0NKdoSr.js new file mode 100644 index 0000000..f436daa --- /dev/null +++ b/reference_scripts/cApfxL7Ic0NKdoSr.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.rOV2s6PQBBrhpMOv") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/cBSy9CR5NZvcLRg8.js b/reference_scripts/cBSy9CR5NZvcLRg8.js new file mode 100644 index 0000000..0605d32 --- /dev/null +++ b/reference_scripts/cBSy9CR5NZvcLRg8.js @@ -0,0 +1,5 @@ + + args.prefillModifiers.modifier += 0; + args.prefillModifiers.slBonus += 0; + args.prefillModifiers.successBonus += 0; + \ No newline at end of file diff --git a/reference_scripts/cDBhmHn5kjgWBAlT.js b/reference_scripts/cDBhmHn5kjgWBAlT.js new file mode 100644 index 0000000..e752dd2 --- /dev/null +++ b/reference_scripts/cDBhmHn5kjgWBAlT.js @@ -0,0 +1,3 @@ +let num = (this.effect.sourceTest.result.overcast.usage.other.current || 1) + +this.actor.addCondition("entangled", num) \ No newline at end of file diff --git a/reference_scripts/cEg09bnvZD6Ysnpc.js b/reference_scripts/cEg09bnvZD6Ysnpc.js new file mode 100644 index 0000000..628bc35 --- /dev/null +++ b/reference_scripts/cEg09bnvZD6Ysnpc.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-archives2.items.anIlqJXFOIEzIOo1") +let data = item.toObject(); +data.name = this.item.name; +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/cJFDnq1HI4gXWcJo.js b/reference_scripts/cJFDnq1HI4gXWcJo.js new file mode 100644 index 0000000..7371b34 --- /dev/null +++ b/reference_scripts/cJFDnq1HI4gXWcJo.js @@ -0,0 +1,8 @@ +if (isNaN(parseInt(this.item.system.specification.value))) +{ + let value = await ValueDialog.create("Ward Value", "Enter the Ward value"); + if (value) + { + this.item.updateSource({"system.specification.value" : value}); + } +} \ No newline at end of file diff --git a/reference_scripts/cK1Jysfu5IMUUH0C.js b/reference_scripts/cK1Jysfu5IMUUH0C.js new file mode 100644 index 0000000..7c148b7 --- /dev/null +++ b/reference_scripts/cK1Jysfu5IMUUH0C.js @@ -0,0 +1,11 @@ +if (!args.ward) +{ + args.ward = (this.effect.getFlag("wfrp4e", "ward") || 0); + if (args.wardRoll >= args.ward && args.ward > 3) + { + let newWard = Math.max(3, args.ward - 1) + this.script.scriptMessage("Ward improved to " + newWard) + this.effect.setFlag("wfrp4e", "ward", newWard) + } + +} \ No newline at end of file diff --git a/reference_scripts/cOuukVo8WakDZIUj.js b/reference_scripts/cOuukVo8WakDZIUj.js new file mode 100644 index 0000000..09d3397 --- /dev/null +++ b/reference_scripts/cOuukVo8WakDZIUj.js @@ -0,0 +1 @@ +args.prefillModifiers.slBonus += 1 \ No newline at end of file diff --git a/reference_scripts/cUFCL02JoaZObRcX.js b/reference_scripts/cUFCL02JoaZObRcX.js new file mode 100644 index 0000000..581a493 --- /dev/null +++ b/reference_scripts/cUFCL02JoaZObRcX.js @@ -0,0 +1,4 @@ +let sl = this.effect.sourceTest.result.slOver; + +this.actor.system.characteristics.s.modifier += sl * 10; +this.actor.system.characteristics.s.calculationBonusModifier -= sl; \ No newline at end of file diff --git a/reference_scripts/cUnbADgOQ4fMKgrH.js b/reference_scripts/cUnbADgOQ4fMKgrH.js new file mode 100644 index 0000000..75b0494 --- /dev/null +++ b/reference_scripts/cUnbADgOQ4fMKgrH.js @@ -0,0 +1,20 @@ +let group +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN"); +let data = item.toObject(); + +if (this.item.name.includes("(")) +{ + group = this.item.parenthesesText +} + +else +{ + group = await ValueDialog.create("Enter Hatred Group", "Hatred Group") + + this.item.updateSource({name : this.item.name + ` (${group})`, "system.tests.value" : this.item.system.tests.value.replace("Group", group)}) + this.effect.updateSource({name : this.effect.name + ` (${group})`}) +} + + +data.name = data.name.replace("Target", group); +await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/cV9JiAgUPOeUHKnS.js b/reference_scripts/cV9JiAgUPOeUHKnS.js new file mode 100644 index 0000000..c65bef6 --- /dev/null +++ b/reference_scripts/cV9JiAgUPOeUHKnS.js @@ -0,0 +1,5 @@ +args.fields.successBonus++; +if (args.skill?.name != game.i18n.localize("NAME.SleightOfHand")) +{ + args.fields.modifier += 10; +} \ No newline at end of file diff --git a/reference_scripts/cYPIXzl86a3LFsTE.js b/reference_scripts/cYPIXzl86a3LFsTE.js new file mode 100644 index 0000000..2764f55 --- /dev/null +++ b/reference_scripts/cYPIXzl86a3LFsTE.js @@ -0,0 +1,6 @@ +if (args.item.type == "spell") +{ + args.item.cn.value -=2 + if (args.item.cn.value < 0) + args.item.cn.value = 0 +} \ No newline at end of file diff --git a/reference_scripts/cgmA2N0MkjA7qIZy.js b/reference_scripts/cgmA2N0MkjA7qIZy.js new file mode 100644 index 0000000..64041c2 --- /dev/null +++ b/reference_scripts/cgmA2N0MkjA7qIZy.js @@ -0,0 +1 @@ +return args.type != "cast" || args.item?.system.lore?.value != "shadow" \ No newline at end of file diff --git a/reference_scripts/ch5SD2XOQfcYo0X5.js b/reference_scripts/ch5SD2XOQfcYo0X5.js new file mode 100644 index 0000000..bdb8570 --- /dev/null +++ b/reference_scripts/ch5SD2XOQfcYo0X5.js @@ -0,0 +1,10 @@ +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 + if (sBonusDiff > 0 && weapon && weapon.damage.value.includes("SB")) + { + args.damage += sBonusDiff + args.breakdown.other.push({label : this.effect.name, value : sBonusDiff}); + } \ No newline at end of file diff --git a/reference_scripts/chUpiI3el8IO8MSs.js b/reference_scripts/chUpiI3el8IO8MSs.js new file mode 100644 index 0000000..714ea80 --- /dev/null +++ b/reference_scripts/chUpiI3el8IO8MSs.js @@ -0,0 +1,6 @@ +if (args.opposedTest.attackerTest.item?.name.includes("Bite")) +{ + let woundsGained = args.totalWoundLoss; + this.script.scriptMessage(`Gains ${woundsGained} Wounds`, { whisper: ChatMessage.getWhisperRecipients("GM") }) + this.actor.modifyWounds(woundsGained) +} \ No newline at end of file diff --git a/reference_scripts/csLKDJKZaUK9vwLT.js b/reference_scripts/csLKDJKZaUK9vwLT.js new file mode 100644 index 0000000..7917870 --- /dev/null +++ b/reference_scripts/csLKDJKZaUK9vwLT.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.7rBhIRo96Mydo0Cv") +let data = item.toObject(); +data.system.location.value = "Back" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) diff --git a/reference_scripts/ct6WGaRMfrcnHhyv.js b/reference_scripts/ct6WGaRMfrcnHhyv.js new file mode 100644 index 0000000..e272979 --- /dev/null +++ b/reference_scripts/ct6WGaRMfrcnHhyv.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn") +let data = item.toObject(); +data.system.specification.value = 2; +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/cuqCtQsfLBBAGjnu.js b/reference_scripts/cuqCtQsfLBBAGjnu.js new file mode 100644 index 0000000..9fe454b --- /dev/null +++ b/reference_scripts/cuqCtQsfLBBAGjnu.js @@ -0,0 +1 @@ +args.fields.slBonus -= (Number(this.item.specification.value) || 0) \ No newline at end of file diff --git a/reference_scripts/cysQDjlDzT8HdNeo.js b/reference_scripts/cysQDjlDzT8HdNeo.js new file mode 100644 index 0000000..05ab52f --- /dev/null +++ b/reference_scripts/cysQDjlDzT8HdNeo.js @@ -0,0 +1 @@ + args.prefillModifiers.slBonus += 1 \ No newline at end of file diff --git a/reference_scripts/d29mu8vRt9AQUm0L.js b/reference_scripts/d29mu8vRt9AQUm0L.js new file mode 100644 index 0000000..bed9802 --- /dev/null +++ b/reference_scripts/d29mu8vRt9AQUm0L.js @@ -0,0 +1,7 @@ +this.actor.characteristics.i.value = Math.min(this.actor.characteristics.i.value, 10); +this.actor.characteristics.i.bonus = 1; + +for(let skill of this.actor.itemTypes.skill.filter(i => i.system.characteristic.value == "i")) +{ + skill.system.total.value= Math.min(skill.system.total.value, 10) +} \ No newline at end of file diff --git a/reference_scripts/d6mVm08o8SeklAcW.js b/reference_scripts/d6mVm08o8SeklAcW.js new file mode 100644 index 0000000..9938b42 --- /dev/null +++ b/reference_scripts/d6mVm08o8SeklAcW.js @@ -0,0 +1 @@ +this.actor.system.status.ward.value = 9; \ No newline at end of file diff --git a/reference_scripts/d9iU08yvqcffF026.js b/reference_scripts/d9iU08yvqcffF026.js new file mode 100644 index 0000000..6de36c3 --- /dev/null +++ b/reference_scripts/d9iU08yvqcffF026.js @@ -0,0 +1 @@ +return args.weapon.system.usesHands.includes(this.effect.getFlag("wfrp4e", "location")) \ No newline at end of file diff --git a/reference_scripts/dAMtbn3uQwF8KpKU.js b/reference_scripts/dAMtbn3uQwF8KpKU.js new file mode 100644 index 0000000..75eba38 --- /dev/null +++ b/reference_scripts/dAMtbn3uQwF8KpKU.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Charm") && args.skill?.name != game.i18n.localize("NAME.Gossip"); \ No newline at end of file diff --git a/reference_scripts/dIxYt421K010eogY.js b/reference_scripts/dIxYt421K010eogY.js new file mode 100644 index 0000000..b628745 --- /dev/null +++ b/reference_scripts/dIxYt421K010eogY.js @@ -0,0 +1,8 @@ + + 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/reference_scripts/dM449AU0FQRnOc3l.js b/reference_scripts/dM449AU0FQRnOc3l.js new file mode 100644 index 0000000..992c1e4 --- /dev/null +++ b/reference_scripts/dM449AU0FQRnOc3l.js @@ -0,0 +1,4 @@ +if (args.opposedTest.result.hitloc.value == "head") +{ + args.abort = "Missed - Headless" +} \ No newline at end of file diff --git a/reference_scripts/dM8FbRH2V8CpOkXw.js b/reference_scripts/dM8FbRH2V8CpOkXw.js new file mode 100644 index 0000000..c174680 --- /dev/null +++ b/reference_scripts/dM8FbRH2V8CpOkXw.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.QluSTTTq3viHJJUh") +let data = item.toObject(); +data.system.location.value = "Ribs"; +await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/dSmRhZ6o1bUcOSF9.js b/reference_scripts/dSmRhZ6o1bUcOSF9.js new file mode 100644 index 0000000..bc3b6fd --- /dev/null +++ b/reference_scripts/dSmRhZ6o1bUcOSF9.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Leadership"); \ No newline at end of file diff --git a/reference_scripts/dXGosSxdoYbET2O8.js b/reference_scripts/dXGosSxdoYbET2O8.js new file mode 100644 index 0000000..2554389 --- /dev/null +++ b/reference_scripts/dXGosSxdoYbET2O8.js @@ -0,0 +1,11 @@ +await this.actor.addCondition("fatigued"); + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool")) + +await test.roll(); + +if (!test.succeeded) +{ + await this.actor.addCondition("fatigued"); + await this.actor.addCondition("broken"); +} \ No newline at end of file diff --git a/reference_scripts/dZ4c5pKDqQV02aIK.js b/reference_scripts/dZ4c5pKDqQV02aIK.js new file mode 100644 index 0000000..3a5ebde --- /dev/null +++ b/reference_scripts/dZ4c5pKDqQV02aIK.js @@ -0,0 +1,4 @@ +if (args.effect.conditionId == "ablaze") +{ + args.data.formula += ` + parseInt(this.effect.sourceTest.result.SL)` +} \ No newline at end of file diff --git a/reference_scripts/dbOSvpgcPjsc2uvq.js b/reference_scripts/dbOSvpgcPjsc2uvq.js new file mode 100644 index 0000000..38e71e9 --- /dev/null +++ b/reference_scripts/dbOSvpgcPjsc2uvq.js @@ -0,0 +1,7 @@ +let menacing = (await fromUuid("Compendium.wfrp4e-core.items.Item.0hn6UaKq8CoZP2zD")).toObject(); +let sense = (await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS")).toObject(); + +sense.name += " (Sight)"; +sense.system.tests.value = sense.system.tests.value.replace("Sense", "Sight") + +this.actor.createEmbeddedDocuments("Item", [menacing, sense], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/dbYjr4oG67Z880To.js b/reference_scripts/dbYjr4oG67Z880To.js new file mode 100644 index 0000000..393ebd8 --- /dev/null +++ b/reference_scripts/dbYjr4oG67Z880To.js @@ -0,0 +1,4 @@ +if (args.test.isFumble) +{ + args.test.result.other.push("@Table[warpfire-thrower-fumble]") +} \ No newline at end of file diff --git a/reference_scripts/dcwY8dCd3PNCEzk6.js b/reference_scripts/dcwY8dCd3PNCEzk6.js new file mode 100644 index 0000000..bba7d38 --- /dev/null +++ b/reference_scripts/dcwY8dCd3PNCEzk6.js @@ -0,0 +1,5 @@ +let current = this.actor.status.fate.value + +this.actor.update({"system.status.fate.value" : current + 1}) + +this.script.scriptMessage(`${this.actor.prototypeToken.name} fate points increased from ${current} to ${current + 1}`) \ No newline at end of file diff --git a/reference_scripts/dfEgat3jz4EtWszH.js b/reference_scripts/dfEgat3jz4EtWszH.js new file mode 100644 index 0000000..91ff1ee --- /dev/null +++ b/reference_scripts/dfEgat3jz4EtWszH.js @@ -0,0 +1 @@ +return args.skill?.name == "Stealth (Urban)" \ No newline at end of file diff --git a/reference_scripts/dfnCK8jCPXNLM7Gh.js b/reference_scripts/dfnCK8jCPXNLM7Gh.js new file mode 100644 index 0000000..a80cc5d --- /dev/null +++ b/reference_scripts/dfnCK8jCPXNLM7Gh.js @@ -0,0 +1,12 @@ +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) + +this.script.scriptMessage(await this.actor.applyBasicDamage(aoeDamage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})) + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - Ablaze`}) + +await test.roll(); + +if (!test.succeeded) +{ + this.actor.addCondition("ablaze"); +} \ No newline at end of file diff --git a/reference_scripts/dk02qSJfJaIo3Geh.js b/reference_scripts/dk02qSJfJaIo3Geh.js new file mode 100644 index 0000000..dbcbd4a --- /dev/null +++ b/reference_scripts/dk02qSJfJaIo3Geh.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.EO05HX7jql0g605A"); +let data = item.toObject(); +data.system.specification.value = this.actor.characteristics.ag.value +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/dkY7WRYjFVh8GB0m.js b/reference_scripts/dkY7WRYjFVh8GB0m.js new file mode 100644 index 0000000..76258d5 --- /dev/null +++ b/reference_scripts/dkY7WRYjFVh8GB0m.js @@ -0,0 +1 @@ +return ['ws', 'bs', 'ag'].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/dkiNmwFXztIVbuxg.js b/reference_scripts/dkiNmwFXztIVbuxg.js new file mode 100644 index 0000000..cfeb34b --- /dev/null +++ b/reference_scripts/dkiNmwFXztIVbuxg.js @@ -0,0 +1,8 @@ +let currentCareer = this.actor.system.currentCareer; + +if (!currentCareer || currentCareer.system.talents.includes(game.i18n.localize("NAME.Frenzy"))) +{ + return +} + +currentCareer.system.talents.push(game.i18n.localize("NAME.Frenzy")); \ No newline at end of file diff --git a/reference_scripts/dqvHDMlcitLx1pUx.js b/reference_scripts/dqvHDMlcitLx1pUx.js new file mode 100644 index 0000000..6f02b76 --- /dev/null +++ b/reference_scripts/dqvHDMlcitLx1pUx.js @@ -0,0 +1 @@ +this.actor.system.details.move.value /= 2; \ No newline at end of file diff --git a/reference_scripts/dt85W8pzZ09w1QLi.js b/reference_scripts/dt85W8pzZ09w1QLi.js new file mode 100644 index 0000000..bd82bf8 --- /dev/null +++ b/reference_scripts/dt85W8pzZ09w1QLi.js @@ -0,0 +1,4 @@ +if (this.actor.sameSideAs(this.effect.sourceActor)) + args.fields.slBonus += 2; +else + args.fields.slBonus -= 2; \ No newline at end of file diff --git a/reference_scripts/dtFvpY96RPzNnphq.js b/reference_scripts/dtFvpY96RPzNnphq.js new file mode 100644 index 0000000..6e1fb69 --- /dev/null +++ b/reference_scripts/dtFvpY96RPzNnphq.js @@ -0,0 +1 @@ +return !(args.skill?.name.includes("Melee (Basic)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic")) \ No newline at end of file diff --git a/reference_scripts/dwSgcFxKN3S0hLJL.js b/reference_scripts/dwSgcFxKN3S0hLJL.js new file mode 100644 index 0000000..334b361 --- /dev/null +++ b/reference_scripts/dwSgcFxKN3S0hLJL.js @@ -0,0 +1 @@ +return args.skill?.name != "Melee (Brawling)" && args.item?.weaponGroup?.value != "brawling" \ No newline at end of file diff --git a/reference_scripts/e0TuMgYuI7ZtGoQr.js b/reference_scripts/e0TuMgYuI7ZtGoQr.js new file mode 100644 index 0000000..ba81a9d --- /dev/null +++ b/reference_scripts/e0TuMgYuI7ZtGoQr.js @@ -0,0 +1,4 @@ +args.applyAP = false; + +await args.actor.addCondition("ablaze", 2); +await args.actor.addCondition("prone"); \ No newline at end of file diff --git a/reference_scripts/e34s1XxHckAWfwHt.js b/reference_scripts/e34s1XxHckAWfwHt.js new file mode 100644 index 0000000..bfcbd7c --- /dev/null +++ b/reference_scripts/e34s1XxHckAWfwHt.js @@ -0,0 +1,4 @@ +if (args.test.options.beatBlade && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) +{ + args.test.result.other.push(`${this.effect.name}: Opponent loses ${Number(args.test.result.SL) + 1} Advantage`) +} \ No newline at end of file diff --git a/reference_scripts/e7IxnxePdXSy6L4E.js b/reference_scripts/e7IxnxePdXSy6L4E.js new file mode 100644 index 0000000..59daaf1 --- /dev/null +++ b/reference_scripts/e7IxnxePdXSy6L4E.js @@ -0,0 +1,4 @@ +if (args.opposedTest.result.hitloc.value == "head") +{ + this.script.scriptMessage(`${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/reference_scripts/eAtqyBd1HsDWuBuI.js b/reference_scripts/eAtqyBd1HsDWuBuI.js new file mode 100644 index 0000000..dbd260b --- /dev/null +++ b/reference_scripts/eAtqyBd1HsDWuBuI.js @@ -0,0 +1 @@ +this.actor.system.characteristics.fel.modifier -= parseInt(this.item.system.location.value || 1) \ No newline at end of file diff --git a/reference_scripts/eHRv7f2BTtle6Y1K.js b/reference_scripts/eHRv7f2BTtle6Y1K.js new file mode 100644 index 0000000..280d921 --- /dev/null +++ b/reference_scripts/eHRv7f2BTtle6Y1K.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.sJ3yX1kvzu2hgNq5") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/eHgk3HZ6eyLFTZ9o.js b/reference_scripts/eHgk3HZ6eyLFTZ9o.js new file mode 100644 index 0000000..1e1c9d3 --- /dev/null +++ b/reference_scripts/eHgk3HZ6eyLFTZ9o.js @@ -0,0 +1 @@ +return !args.item?.system.magicMissile?.value && !args.item?.system.attackType \ No newline at end of file diff --git a/reference_scripts/ePPgxQOqL1Uhz2k9.js b/reference_scripts/ePPgxQOqL1Uhz2k9.js new file mode 100644 index 0000000..e0e5035 --- /dev/null +++ b/reference_scripts/ePPgxQOqL1Uhz2k9.js @@ -0,0 +1,90 @@ +let choice1 = [ + { + type : "skill", + name : "Ranged (Bow)", + diff : { + system : { + advances : { + value : 10 + } + } + } + }, + { + type : "weapon", + name : "Bow", + }, + { + type : "ammunition", + name : "Arrow", + } +] +let choice2 = [ +] + +let choice = await Dialog.wait({ + title : "Option", + content : + `

+ Add Option? +

+
    +
  1. Ranged (Bow) +10 and a Bow with 12 Arrows
  2. +
+ `, + buttons : { + 1 : { + label : "Yes", + callback : () => { + return choice1 + } + }, + 2 : { + label : "No", + callback : () => { + choice2 + } + } + } + }) + +let updateObj = this.actor.toObject(); +let items = [] +for (let c of choice) +{ + let existing + if (c.type == "skill") + { + existing = updateObj.items.find(i => i.name == c.name && i.type == c.type) + if (existing && c.diff?.system?.advances?.value) + { + existing.system.advances.value += c.diff.system.advances.value + } + } + + if (!existing) + { + let item = await game.wfrp4e.utility.find(c.name, c.type) + if (item) + { + item = item.toObject() + equip(item); + items.push(mergeObject(item, (c.diff || {}))) + } + else + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } + +} +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/eWWLmA2xINR321aK.js b/reference_scripts/eWWLmA2xINR321aK.js new file mode 100644 index 0000000..5d8bea6 --- /dev/null +++ b/reference_scripts/eWWLmA2xINR321aK.js @@ -0,0 +1 @@ +args.item.system.qualities.value.push({name : "magical"}) \ No newline at end of file diff --git a/reference_scripts/eb69QPmNQEJXtk4l.js b/reference_scripts/eb69QPmNQEJXtk4l.js new file mode 100644 index 0000000..5e52e15 --- /dev/null +++ b/reference_scripts/eb69QPmNQEJXtk4l.js @@ -0,0 +1 @@ + return args.characteristic != "bs" \ No newline at end of file diff --git a/reference_scripts/ebDQH0MdGAG02CHl.js b/reference_scripts/ebDQH0MdGAG02CHl.js new file mode 100644 index 0000000..94a3b0e --- /dev/null +++ b/reference_scripts/ebDQH0MdGAG02CHl.js @@ -0,0 +1,14 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.SYjWiKDzMS6CtROJ") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +if (this.item.system.location.key == "rArm") +{ + data.system.location.value = "Right Hand" + data.system.location.key = "rHand" +} +else if (this.item.system.location.key == "lArm") +{ + data.system.location.value = "Left Hand" + data.system.location.key = "lHand" +} +this.actor.createEmbeddedDocuments("Item", [data]) \ No newline at end of file diff --git a/reference_scripts/ed7Sud9HM3uB2j6b.js b/reference_scripts/ed7Sud9HM3uB2j6b.js new file mode 100644 index 0000000..c2a8e1a --- /dev/null +++ b/reference_scripts/ed7Sud9HM3uB2j6b.js @@ -0,0 +1,7 @@ +ChatMessage.create({content : "Yield or die!", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) +let item = await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn") +let data = item.toObject(); +data.system.specification.value = 2; +this.script.scriptNotification("Adding " + data.name); +await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}); +game.wfrp4e.utility.postFear(2, this.actor.prototypeToken.name) \ No newline at end of file diff --git a/reference_scripts/egDtqMxe3iekc6hv.js b/reference_scripts/egDtqMxe3iekc6hv.js new file mode 100644 index 0000000..d5db90a --- /dev/null +++ b/reference_scripts/egDtqMxe3iekc6hv.js @@ -0,0 +1,6 @@ +let trait = args.opposedTest.attackerTest.item +let woundLossEffect = this.item.effects.get("7Amhi75wLv0PvGjd") +if (trait && trait.name.includes("Bite") && woundLossEffect) +{ + args.actor.applyEffect({effectUuids : woundLossEffect.uuid}) +} \ No newline at end of file diff --git a/reference_scripts/eh1J3s0s4A2AxoFp.js b/reference_scripts/eh1J3s0s4A2AxoFp.js new file mode 100644 index 0000000..1ff8cb1 --- /dev/null +++ b/reference_scripts/eh1J3s0s4A2AxoFp.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG"); +let data = item.toObject(); +data.name += " (Enemy)"; +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/ekjJQHyMbZT2vqdc.js b/reference_scripts/ekjJQHyMbZT2vqdc.js new file mode 100644 index 0000000..064db13 --- /dev/null +++ b/reference_scripts/ekjJQHyMbZT2vqdc.js @@ -0,0 +1,9 @@ +let uses = this.item.getFlag("wfrp4e", "uses") || 0; +uses++; +this.script.scriptNotification(`Used ${uses} times`) +this.item.setFlag("wfrp4e", "uses", uses); +if (uses >= 3) +{ + this.effect.update({"flags.wfrp4e.applicationData.type" : "other"}) + this.script.scriptNotification(`Used up`); +} diff --git a/reference_scripts/eqxE7nBO13yJS7hc.js b/reference_scripts/eqxE7nBO13yJS7hc.js new file mode 100644 index 0000000..f1c6ed6 --- /dev/null +++ b/reference_scripts/eqxE7nBO13yJS7hc.js @@ -0,0 +1,6 @@ +let roll = (await new Roll("1d10").roll()) +roll.toMessage({flavor: "Wounds Healed", speaker : {alias : this.actor.name}}) + +this.actor.modifyWounds(roll.total) + +this.actor.hasCondition("bleeding")?.delete(); \ No newline at end of file diff --git a/reference_scripts/esuLwq4g5T8k1kLT.js b/reference_scripts/esuLwq4g5T8k1kLT.js new file mode 100644 index 0000000..c6ae85a --- /dev/null +++ b/reference_scripts/esuLwq4g5T8k1kLT.js @@ -0,0 +1 @@ +await args.actor.addCondition("ablaze"); await args.actor.addCondition("prone"); \ No newline at end of file diff --git a/reference_scripts/ezGqDoC9hNRBnFTB.js b/reference_scripts/ezGqDoC9hNRBnFTB.js new file mode 100644 index 0000000..9538a95 --- /dev/null +++ b/reference_scripts/ezGqDoC9hNRBnFTB.js @@ -0,0 +1,17 @@ + let choices = await Promise.all([game.wfrp4e.utility.findItemId("1zaqojk0Oq1m8vYv"), game.wfrp4e.utility.findItemId("zIuarD5mB0EF0ji0")]) + let items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, "Choose a Weapon") + items = items.map(i => i.toObject()) + + items.forEach(i => equip(i)) + + this.actor.createEmbeddedDocuments("Item", items); + + function equip(item) + { + if (item.type == "armour") + item.data.worn.value = true + else if (item.type == "weapon") + item.data.equipped = true + else if (item.type == "trapping" && item.data.trappingType.value == "clothingAccessories") + item.data.worn = true + } \ No newline at end of file diff --git a/reference_scripts/f062aa2BNClx08D6.js b/reference_scripts/f062aa2BNClx08D6.js new file mode 100644 index 0000000..c3cc2c8 --- /dev/null +++ b/reference_scripts/f062aa2BNClx08D6.js @@ -0,0 +1,16 @@ +let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) + await test.roll(); + if (test.failed) + { + let toughnessLost = parseInt(this.effect.sourceTest.result.SL) + + let currentModifier = this.actor.characteristics.t.modifier + + await this.actor.update({ "system.characteristics.t.modifier": currentModifier - toughnessLost }) + this.script.scriptMessage(`${this.actor.prototypeToken.name} lost ${toughnessLost} Toughness`) + if (this.actor.system.characteristics.t.value <= 0) + { + this.actor.addCondition("dead"); + } + + } \ No newline at end of file diff --git a/reference_scripts/f3rXusHh6VIpVPUl.js b/reference_scripts/f3rXusHh6VIpVPUl.js new file mode 100644 index 0000000..db182da --- /dev/null +++ b/reference_scripts/f3rXusHh6VIpVPUl.js @@ -0,0 +1 @@ +return !args.skill?.name?.includes(game.i18n.localize("NAME.Language")) && args.type != "cast" \ No newline at end of file diff --git a/reference_scripts/f4vvAGQ8OGoEbrgy.js b/reference_scripts/f4vvAGQ8OGoEbrgy.js new file mode 100644 index 0000000..c81bb32 --- /dev/null +++ b/reference_scripts/f4vvAGQ8OGoEbrgy.js @@ -0,0 +1,16 @@ +let SL = args.opposedTest.attackerTest.result.SL - args.opposedTest.attackerTest.item.cn.value +let difficulty = "challenging" +if (SL >= 1) + difficulty = "difficult" +if (SL >= 2) + difficulty = "hard" +if (SL >= 3) + difficulty = "vhard" + + +let test = await args.actor.setupCharacteristic("wp", {fields: {difficulty}, skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gain a Stunned Condition"}}) +await test.roll(); +if (test.failed) +{ + args.actor.addCondition("stunned"); +} \ No newline at end of file diff --git a/reference_scripts/f5Mp3kXwCFdPkW6N.js b/reference_scripts/f5Mp3kXwCFdPkW6N.js new file mode 100644 index 0000000..bd4edee --- /dev/null +++ b/reference_scripts/f5Mp3kXwCFdPkW6N.js @@ -0,0 +1 @@ +return args.skill?.name != "Entertain (Sing)" && args.skill?.name != "Entertain (Singing)" && !args.skill?.name.includes("Language"); \ No newline at end of file diff --git a/reference_scripts/f6WnrJvoNkfoNN9Y.js b/reference_scripts/f6WnrJvoNkfoNN9Y.js new file mode 100644 index 0000000..aa2860b --- /dev/null +++ b/reference_scripts/f6WnrJvoNkfoNN9Y.js @@ -0,0 +1 @@ +return args.item?.attackType != 'melee' \ No newline at end of file diff --git a/reference_scripts/f7WZvYle9iqefRsh.js b/reference_scripts/f7WZvYle9iqefRsh.js new file mode 100644 index 0000000..f3f618f --- /dev/null +++ b/reference_scripts/f7WZvYle9iqefRsh.js @@ -0,0 +1 @@ +return args.weapon?.system?.attackType != "melee" \ No newline at end of file diff --git a/reference_scripts/f8cnfvGKJH3bYVGN.js b/reference_scripts/f8cnfvGKJH3bYVGN.js new file mode 100644 index 0000000..399cbf0 --- /dev/null +++ b/reference_scripts/f8cnfvGKJH3bYVGN.js @@ -0,0 +1 @@ +return ["s", "t"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/fEFfHFeJxkR0aIJK.js b/reference_scripts/fEFfHFeJxkR0aIJK.js new file mode 100644 index 0000000..7d20696 --- /dev/null +++ b/reference_scripts/fEFfHFeJxkR0aIJK.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 3 && args.opposedTest.result.winner == "attacker") +{ + this.script.scriptMessage(`Everyone within 20 feet loses 1 Wound and makes a Difficult (-10) Endurance or gains @Condition[Deafened]`, {blind : true, whisper : ChatMessage.getWhisperRecipients("GM")}) +} + \ No newline at end of file diff --git a/reference_scripts/fEyKQqCjDwml3DXO.js b/reference_scripts/fEyKQqCjDwml3DXO.js new file mode 100644 index 0000000..e743110 --- /dev/null +++ b/reference_scripts/fEyKQqCjDwml3DXO.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.M8XyRs9DN12XsFTQ") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/fFGuTi0HLjwneMcJ.js b/reference_scripts/fFGuTi0HLjwneMcJ.js new file mode 100644 index 0000000..33216f3 --- /dev/null +++ b/reference_scripts/fFGuTi0HLjwneMcJ.js @@ -0,0 +1 @@ +return args.item?.system.isRanged \ No newline at end of file diff --git a/reference_scripts/fIUxKZMWJ8HMPmH9.js b/reference_scripts/fIUxKZMWJ8HMPmH9.js new file mode 100644 index 0000000..743c625 --- /dev/null +++ b/reference_scripts/fIUxKZMWJ8HMPmH9.js @@ -0,0 +1 @@ +return ["wp", "ag", "i", "int"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/fKzlu6fFE2th9uIJ.js b/reference_scripts/fKzlu6fFE2th9uIJ.js new file mode 100644 index 0000000..20bdbe3 --- /dev/null +++ b/reference_scripts/fKzlu6fFE2th9uIJ.js @@ -0,0 +1 @@ +return args.item?.name == game.i18n.localize("NAME.ConsumeAlcohol") \ No newline at end of file diff --git a/reference_scripts/fP2edYbj6QjPPAjL.js b/reference_scripts/fP2edYbj6QjPPAjL.js new file mode 100644 index 0000000..e1ac1b8 --- /dev/null +++ b/reference_scripts/fP2edYbj6QjPPAjL.js @@ -0,0 +1 @@ +return ["Charm Animal", "Endurance", "Outdoor Survival"].includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/fPKYkBllp7Et62lX.js b/reference_scripts/fPKYkBllp7Et62lX.js new file mode 100644 index 0000000..f1cdfaa --- /dev/null +++ b/reference_scripts/fPKYkBllp7Et62lX.js @@ -0,0 +1,4 @@ +if (args.test.spell.name == "Warp Lightning") +{ + args.test.preData.canReverse = true; +} \ No newline at end of file diff --git a/reference_scripts/fY0TsQwnU14fdPl2.js b/reference_scripts/fY0TsQwnU14fdPl2.js new file mode 100644 index 0000000..cd27330 --- /dev/null +++ b/reference_scripts/fY0TsQwnU14fdPl2.js @@ -0,0 +1 @@ +args.fields.modifier += 30; \ No newline at end of file diff --git a/reference_scripts/fYLSe6CrYciap5y8.js b/reference_scripts/fYLSe6CrYciap5y8.js new file mode 100644 index 0000000..14685bc --- /dev/null +++ b/reference_scripts/fYLSe6CrYciap5y8.js @@ -0,0 +1,84 @@ + let characteristics = { + "ws" : 0, + "bs" : 0, + "s" : 10, + "t" : 10, + "i" : 0, + "ag" : 10, + "dex" : 0, + "int" : 0, + "wp" : 0, + "fel" : 0 + } + let skills = ["Consume Alcohol", "Row", "Sail", "Swim"] + let skillAdvancements = [10, 10, 10, 10] + let talents = [] + let trappings = [] + let items = [] + + let updateObj = this.actor.toObject(); + + for (let ch in characteristics) + { + updateObj.system.characteristics[ch].modifier += characteristics[ch]; + } + + for (let index = 0; index < skills.length; index++) + { + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } + } + + for (let talent of talents) + { + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } + } + + for (let trapping of trappings) + { + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } + } + + + await this.actor.update(updateObj) + this.actor.createEmbeddedDocuments("Item", items); + + function equip(item) + { + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true + } \ No newline at end of file diff --git a/reference_scripts/faRFSsrQylQRZFLk.js b/reference_scripts/faRFSsrQylQRZFLk.js new file mode 100644 index 0000000..32b4920 --- /dev/null +++ b/reference_scripts/faRFSsrQylQRZFLk.js @@ -0,0 +1 @@ +return args.bleedingHand || !args.weapon || !this.actor.hasCondition("bleeding") \ No newline at end of file diff --git a/reference_scripts/fcY3pa72dELnOFXV.js b/reference_scripts/fcY3pa72dELnOFXV.js new file mode 100644 index 0000000..1cd4cc1 --- /dev/null +++ b/reference_scripts/fcY3pa72dELnOFXV.js @@ -0,0 +1 @@ +return !args.options.reload diff --git a/reference_scripts/feMPZhhFeXRtKdKY.js b/reference_scripts/feMPZhhFeXRtKdKY.js new file mode 100644 index 0000000..73f5d95 --- /dev/null +++ b/reference_scripts/feMPZhhFeXRtKdKY.js @@ -0,0 +1,10 @@ +if (this.item.system.quantity.value) +{ + this.item.system.reduceQuantity(); + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + actor.applyEffect({effectUuids : this.item.effects.contents[0]?.uuid}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/ffvcCEazZBinHlUX.js b/reference_scripts/ffvcCEazZBinHlUX.js new file mode 100644 index 0000000..d60add8 --- /dev/null +++ b/reference_scripts/ffvcCEazZBinHlUX.js @@ -0,0 +1 @@ +args.update({texture : {tint : "#FFD700"}}); diff --git a/reference_scripts/fiF9sM5UpcHMYa33.js b/reference_scripts/fiF9sM5UpcHMYa33.js new file mode 100644 index 0000000..554998a --- /dev/null +++ b/reference_scripts/fiF9sM5UpcHMYa33.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.vMYEkrWj0ip6ZOdv"); +let data = item.toObject(); +data.name += " (Poison, Disease, Chaos)" +this.actor.createEmbeddedDocuments("Item", Array(this.effect.sourceTest.result.overcast.usage.other.current).fill(data), {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/fkFmNcesqqNTMhVn.js b/reference_scripts/fkFmNcesqqNTMhVn.js new file mode 100644 index 0000000..65839e5 --- /dev/null +++ b/reference_scripts/fkFmNcesqqNTMhVn.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.2iult41Jehz0F1O8") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key; +await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/fl762icfKrt9ear2.js b/reference_scripts/fl762icfKrt9ear2.js new file mode 100644 index 0000000..8b3f7c5 --- /dev/null +++ b/reference_scripts/fl762icfKrt9ear2.js @@ -0,0 +1 @@ +this.actor.removeCondition("broken", parseInt(this.effect.sourceTest.result.SL)+1) \ No newline at end of file diff --git a/reference_scripts/ft0LaRWZT5WtnptP.js b/reference_scripts/ft0LaRWZT5WtnptP.js new file mode 100644 index 0000000..36ac1c9 --- /dev/null +++ b/reference_scripts/ft0LaRWZT5WtnptP.js @@ -0,0 +1,13 @@ +let advantage = this.actor.system.status.advantage.value; +if (advantage > 0) +{ + await this.actor.setAdvantage(0); + this.script.scriptNotification("Advantage Subtracted") +} +else +{ + return this.script.scriptNotification("Not enough Advantage!", "error") +} + +let test = await this.actor.setupTrait(this.item, {fields : {slBonus : advantage}}) +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/fve7tiyF5X9B7mHJ.js b/reference_scripts/fve7tiyF5X9B7mHJ.js new file mode 100644 index 0000000..6fb52a2 --- /dev/null +++ b/reference_scripts/fve7tiyF5X9B7mHJ.js @@ -0,0 +1 @@ +args.fields.slBonus -= 2; \ No newline at end of file diff --git a/reference_scripts/fzTB7t3x4bLmAXji.js b/reference_scripts/fzTB7t3x4bLmAXji.js new file mode 100644 index 0000000..e5d584e --- /dev/null +++ b/reference_scripts/fzTB7t3x4bLmAXji.js @@ -0,0 +1,5 @@ +let roll = await new Roll("1d10 + 1").roll() +await roll.toMessage(this.script.getChatData()); +this.script.scriptNotification(`Healed ${roll.total} Wounds`) +this.actor.corruptionDialog("moderate") +await this.actor.modifyWounds(roll.total) \ No newline at end of file diff --git a/reference_scripts/g07HI7vyqiFXPB0o.js b/reference_scripts/g07HI7vyqiFXPB0o.js new file mode 100644 index 0000000..480115f --- /dev/null +++ b/reference_scripts/g07HI7vyqiFXPB0o.js @@ -0,0 +1,29 @@ +// A Drinker must take a Difficult (-10) Endurance Test. +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "difficult"}}) +await test.roll() +// If they fail, they acquire 2 Poisoned Conditions. +if (test.failed) +{ + this.actor.addCondition("poisoned", 2) + this.script.scriptMessage(`

${this.actor.prototypeToken.name} has gained 2 @Condition[Poisoned] Conditions.

+

Any being with the Bestial Creature Trait that bites them and takes damage will not bite them again during a hostile encounter, though the creature may still attack them in other ways.

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

${this.actor.prototypeToken.name} gains the Corrosive Blood Trait for ${duration} rounds.

`, + { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) +} \ No newline at end of file diff --git a/reference_scripts/g0SzfsLyW7aD2F19.js b/reference_scripts/g0SzfsLyW7aD2F19.js new file mode 100644 index 0000000..e319818 --- /dev/null +++ b/reference_scripts/g0SzfsLyW7aD2F19.js @@ -0,0 +1,13 @@ +if (this.item.name.includes("(") && this.item.system.tests.value.includes("(Social Group)")) +{ + 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("(")) + { + let group = name.split("(")[1].split(")")[0] + tests = `${tests.split("(")[0].trim()} (${group})` + } + this.item.updateSource({name, "system.tests.value" : tests}) +} \ No newline at end of file diff --git a/reference_scripts/g1L8OYO9nCOhdKGL.js b/reference_scripts/g1L8OYO9nCOhdKGL.js new file mode 100644 index 0000000..94085c1 --- /dev/null +++ b/reference_scripts/g1L8OYO9nCOhdKGL.js @@ -0,0 +1,16 @@ +// Everything within Fellowship Bonus yards +// of the target point is splashed with mystic poison, +// suffering 1d10 + SL damage which ignores Armour Points + +let damage = (await new Roll(`1d10 + ${parseInt(this.effect.sourceTest.result.SL)}`).roll()) + +await damage.toMessage(this.script.getChatData()) + +this.script.scriptMessage(await args.actor.applyBasicDamage( + damage.total, + {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true} +)) + +// ... and gains the Poisoned Condition + +this.actor.addCondition("poisoned") \ No newline at end of file diff --git a/reference_scripts/g4t56A09yrpZaJQ2.js b/reference_scripts/g4t56A09yrpZaJQ2.js new file mode 100644 index 0000000..9d8a90b --- /dev/null +++ b/reference_scripts/g4t56A09yrpZaJQ2.js @@ -0,0 +1,23 @@ + let amberTalons = foundry.utils.deepClone(game.wfrp4e.config.systemItems.unarmed); + amberTalons.name = "Amber Talons"; + amberTalons.img = this.effect.img; + amberTalons.system.damage.value = "SB + WPB" + amberTalons.system.equipped = true; + amberTalons.system.qualities.value.push({name : "magical"}) + amberTalons.effects.push({ + label : "Amber Talons", + transfer: false, + icon : "modules/wfrp4e-core/icons/spells/amber-talons.png" , + flags : { + wfrp4e : { + applicationData : { + documentType : "Item" + }, + scriptData : [{ + trigger : "applyDamage", + script : "if (args.totalWoundLoss >= 1)\n{ \n args.actor.addCondition(\"bleeding\")\n}" + }] + } + } + }) + this.actor.createEmbeddedDocuments("Item", [amberTalons], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/gFUXBbTskQBKjxqm.js b/reference_scripts/gFUXBbTskQBKjxqm.js new file mode 100644 index 0000000..e8f675a --- /dev/null +++ b/reference_scripts/gFUXBbTskQBKjxqm.js @@ -0,0 +1,8 @@ +if (this.actor.hasCondition("entangled")) +{ + this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "average"}}).then(async test => { + await test.roll(); + if (test.failed) + this.actor.addCondition("fatigued") + }) +} \ No newline at end of file diff --git a/reference_scripts/gKIPujyuFSn0No9v.js b/reference_scripts/gKIPujyuFSn0No9v.js new file mode 100644 index 0000000..9359298 --- /dev/null +++ b/reference_scripts/gKIPujyuFSn0No9v.js @@ -0,0 +1,5 @@ +for(let e of this.item.effects.contents) +{ + e.update({disabled: false}) +} +this.script.scriptNotification("Reset Powers") \ No newline at end of file diff --git a/reference_scripts/gKPL3t4vlZAsvtGr.js b/reference_scripts/gKPL3t4vlZAsvtGr.js new file mode 100644 index 0000000..c2422ee --- /dev/null +++ b/reference_scripts/gKPL3t4vlZAsvtGr.js @@ -0,0 +1 @@ +return args.skill?.name == "Stealth (Underground)" \ No newline at end of file diff --git a/reference_scripts/gL0ftUnK5TNXBRRt.js b/reference_scripts/gL0ftUnK5TNXBRRt.js new file mode 100644 index 0000000..ccd81ab --- /dev/null +++ b/reference_scripts/gL0ftUnK5TNXBRRt.js @@ -0,0 +1 @@ +return this.effect.sourceActor.uuid == args.actor.uuid \ No newline at end of file diff --git a/reference_scripts/gPQrszvIgGlW9yM4.js b/reference_scripts/gPQrszvIgGlW9yM4.js new file mode 100644 index 0000000..61a3f69 --- /dev/null +++ b/reference_scripts/gPQrszvIgGlW9yM4.js @@ -0,0 +1,2 @@ +if (args.test.characteristicKey == "wp") + args.test.preData.canReverse = true \ No newline at end of file diff --git a/reference_scripts/gVpFUka7qfGiEC1v.js b/reference_scripts/gVpFUka7qfGiEC1v.js new file mode 100644 index 0000000..0306f05 --- /dev/null +++ b/reference_scripts/gVpFUka7qfGiEC1v.js @@ -0,0 +1 @@ + this.actor.getActiveTokens().forEach(t => t.document.update({texture : {tint : "#FFD700"}})); diff --git a/reference_scripts/ga6bQzPuoIiQQrKg.js b/reference_scripts/ga6bQzPuoIiQQrKg.js new file mode 100644 index 0000000..2d3c447 --- /dev/null +++ b/reference_scripts/ga6bQzPuoIiQQrKg.js @@ -0,0 +1,11 @@ +if (args.totalWoundLoss > 0) +{ + + let test = await args.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) + await test.roll() + if (test.failed) + { + args.totalWoundLoss += this.effect.sourceActor.system.characteristics.wp.bonus + args.modifiers.other.push({label : this.effect.name, value : this.effect.sourceActor.system.characteristics.wp.bonus}) + } +} \ No newline at end of file diff --git a/reference_scripts/gbhxWXboV9CytWNU.js b/reference_scripts/gbhxWXboV9CytWNU.js new file mode 100644 index 0000000..e186282 --- /dev/null +++ b/reference_scripts/gbhxWXboV9CytWNU.js @@ -0,0 +1 @@ +await this.actor.addCondition("blinded", 2) \ No newline at end of file diff --git a/reference_scripts/gh2KS1prBKcsSK6M.js b/reference_scripts/gh2KS1prBKcsSK6M.js new file mode 100644 index 0000000..9db9338 --- /dev/null +++ b/reference_scripts/gh2KS1prBKcsSK6M.js @@ -0,0 +1,2 @@ +if (args.opposedTest.attackerTest.result.critical) + args.actor.addCondition("ablaze") \ No newline at end of file diff --git a/reference_scripts/gnVpxOeBZpNF4HIF.js b/reference_scripts/gnVpxOeBZpNF4HIF.js new file mode 100644 index 0000000..ea6a793 --- /dev/null +++ b/reference_scripts/gnVpxOeBZpNF4HIF.js @@ -0,0 +1,4 @@ +if (args.test.result.roll.toString().includes("9") || args.test.result.roll.toString().includes("8")) +{ + args.test.result.fumble = game.i18n.localize("Fumble") +} \ No newline at end of file diff --git a/reference_scripts/gpPaCe6yER79l4u8.js b/reference_scripts/gpPaCe6yER79l4u8.js new file mode 100644 index 0000000..124a438 --- /dev/null +++ b/reference_scripts/gpPaCe6yER79l4u8.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/gpuBg3y9rocJL7yT.js b/reference_scripts/gpuBg3y9rocJL7yT.js new file mode 100644 index 0000000..908e09d --- /dev/null +++ b/reference_scripts/gpuBg3y9rocJL7yT.js @@ -0,0 +1 @@ +this.actor.status.addArmour(1, {locations: ["head"], source: this.effect}) \ No newline at end of file diff --git a/reference_scripts/gqZLfIr6svrtdwdC.js b/reference_scripts/gqZLfIr6svrtdwdC.js new file mode 100644 index 0000000..191bf9e --- /dev/null +++ b/reference_scripts/gqZLfIr6svrtdwdC.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.SleightOfHand") && args.skill?.name != game.i18n.localize("NAME.MeleeBrawling") && args.weapon?.system?.weaponGroup?.value != "brawling" \ No newline at end of file diff --git a/reference_scripts/gsCnd3mf1vXFU2ei.js b/reference_scripts/gsCnd3mf1vXFU2ei.js new file mode 100644 index 0000000..e3c7fe1 --- /dev/null +++ b/reference_scripts/gsCnd3mf1vXFU2ei.js @@ -0,0 +1 @@ +this.actor.system.status.ward.value = 4; \ No newline at end of file diff --git a/reference_scripts/gu72JaTs9GrSiVTd.js b/reference_scripts/gu72JaTs9GrSiVTd.js new file mode 100644 index 0000000..8d0ad0f --- /dev/null +++ b/reference_scripts/gu72JaTs9GrSiVTd.js @@ -0,0 +1 @@ +return !(args.skill?.name == game.i18n.localize("NAME.Haggle") || args.skill?.name == game.i18n.localize("NAME.Gossip")) \ No newline at end of file diff --git a/reference_scripts/h0DfPwUUOBjyAHMZ.js b/reference_scripts/h0DfPwUUOBjyAHMZ.js new file mode 100644 index 0000000..124ecc4 --- /dev/null +++ b/reference_scripts/h0DfPwUUOBjyAHMZ.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Perception"); \ No newline at end of file diff --git a/reference_scripts/h1XKoMuVnS0bagRO.js b/reference_scripts/h1XKoMuVnS0bagRO.js new file mode 100644 index 0000000..6b18992 --- /dev/null +++ b/reference_scripts/h1XKoMuVnS0bagRO.js @@ -0,0 +1 @@ +return args.item?.name != game.i18n.localize("NAME.Endurance"); \ No newline at end of file diff --git a/reference_scripts/h766UvswLCsxcMow.js b/reference_scripts/h766UvswLCsxcMow.js new file mode 100644 index 0000000..cc4d0c0 --- /dev/null +++ b/reference_scripts/h766UvswLCsxcMow.js @@ -0,0 +1,133 @@ +let characteristics = { + "ws" : 5, + "bs" : 0, + "s" : -15, + "t" : 0, + "i" : 20, + "ag" : 0, + "dex" : 0, + "int" : 5, + "wp" : 10, + "fel" : 10 +} +let skills = ["Charm", "Intimidate", "Melee (Basic)"] +let skillAdvancements = [7, 60, 7] +let talents = ["Menacing", "Shadow"] +let traits = ["Distracting"] +let trappings = [] +let items = []; +let spells = []; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +const traitRegex = /(?:,?(.+?)(\+?\d{1,2}\+?)?\s*?(?:\((.+?)\)\s*(\+?\d{1,2})?|,|$))/gm +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's a specialization + let traitSpec = traitMatches[3] + + let traitItem; + try { + traitItem = await WFRP_Utility.findItem(traitName, "trait") + } + catch { } + if (!traitItem) { + ui.notifications.warn(`Could not find ${trait}`, {permanent : true}) + } + traitItem = traitItem.toObject() + + if (Number.isNumeric(traitVal)) + { + traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal; + traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim() + } + else + traitItem.system.specification.value = traitSpec + + items.push(traitItem) + +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + 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 += " " + this.effect.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + + +function equip(item) +{ + if (item.type == "armour") + item.worn = true + else if (item.type == "weapon") + item.equipped = true + else if (item.type == "trapping" && item.trappingType?.value == "clothingAccessories") + item.worn = true +} \ No newline at end of file diff --git a/reference_scripts/hA8PzeiCsHqqlUZm.js b/reference_scripts/hA8PzeiCsHqqlUZm.js new file mode 100644 index 0000000..c8e212a --- /dev/null +++ b/reference_scripts/hA8PzeiCsHqqlUZm.js @@ -0,0 +1,2 @@ +this.actor.createEmbeddedDocuments("ActiveEffect", [game.wfrp4e.config.symptomEffects["nausea"]]) +this.script.scriptMessage(`Gains @Condition[Nausea] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients("GM")}) \ No newline at end of file diff --git a/reference_scripts/hCzxUyO6mjLNIpaM.js b/reference_scripts/hCzxUyO6mjLNIpaM.js new file mode 100644 index 0000000..1555cce --- /dev/null +++ b/reference_scripts/hCzxUyO6mjLNIpaM.js @@ -0,0 +1,7 @@ +let woundsGained = Math.min(args.totalWoundLoss, args.actor.status.wounds.value) + +woundsGained = Math.floor(woundsGained / 2) + +args.attacker.update({ "system.status.wounds.value": args.attacker.status.wounds.value + woundsGained }) + +this.script.scriptMessage(`Gains ${woundsGained} Wounds`) \ No newline at end of file diff --git a/reference_scripts/hDC6lroDEPVBituR.js b/reference_scripts/hDC6lroDEPVBituR.js new file mode 100644 index 0000000..02f66dc --- /dev/null +++ b/reference_scripts/hDC6lroDEPVBituR.js @@ -0,0 +1,12 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); + +if (test.failed) +{ + this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) + this.script.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) + if (test.result.roll % 11 == 0 || test.result.roll == 100) + { + this.script.scriptMessage(`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")}) + } +} \ No newline at end of file diff --git a/reference_scripts/hK0YMJfYbpbJZizO.js b/reference_scripts/hK0YMJfYbpbJZizO.js new file mode 100644 index 0000000..45b97af --- /dev/null +++ b/reference_scripts/hK0YMJfYbpbJZizO.js @@ -0,0 +1,12 @@ +this.actor.getActiveTokens().forEach(t => t.document.update({light : { + "dim": 0, + "bright": 0, + "angle": 360, + "alpha": 0.5, + "animation": { + "speed": 0, + "intensity": 0, + "type": "none", + }, + "color": "", + }})); \ No newline at end of file diff --git a/reference_scripts/hObTbWi4ZdwXimIW.js b/reference_scripts/hObTbWi4ZdwXimIW.js new file mode 100644 index 0000000..59c8d0c --- /dev/null +++ b/reference_scripts/hObTbWi4ZdwXimIW.js @@ -0,0 +1,4 @@ +if (args.item.type == "spell") +{ + args.item.system.cn.value = Math.floor(args.item.system.cn.value / 2); +} \ No newline at end of file diff --git a/reference_scripts/hR1qD2kpFHF8JT8h.js b/reference_scripts/hR1qD2kpFHF8JT8h.js new file mode 100644 index 0000000..1ee0b50 --- /dev/null +++ b/reference_scripts/hR1qD2kpFHF8JT8h.js @@ -0,0 +1 @@ +return args.skill?.name == "Language (Magick)" \ No newline at end of file diff --git a/reference_scripts/hSlEY2oh8quVmdXR.js b/reference_scripts/hSlEY2oh8quVmdXR.js new file mode 100644 index 0000000..f535336 --- /dev/null +++ b/reference_scripts/hSlEY2oh8quVmdXR.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn") +let data = item.toObject(); +data.system.specification.value = 2 +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/hZAax4emLahEEqcZ.js b/reference_scripts/hZAax4emLahEEqcZ.js new file mode 100644 index 0000000..4cf471f --- /dev/null +++ b/reference_scripts/hZAax4emLahEEqcZ.js @@ -0,0 +1,5 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW") +let data = item.toObject(); +data.system.specification.value = 7 - this.actor.characteristics.s.bonus +data.name = item.name.replace("(Feature)", "(Tusks)") +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/hfO4INH3EeETDTFt.js b/reference_scripts/hfO4INH3EeETDTFt.js new file mode 100644 index 0000000..5bb82c4 --- /dev/null +++ b/reference_scripts/hfO4INH3EeETDTFt.js @@ -0,0 +1 @@ +this.actor.status.addArmour(1, {locations: this.effect.flags.wfrp4e.locations, source: this.effect}) \ No newline at end of file diff --git a/reference_scripts/hhCs5VBKx50S5IsY.js b/reference_scripts/hhCs5VBKx50S5IsY.js new file mode 100644 index 0000000..d3aa69e --- /dev/null +++ b/reference_scripts/hhCs5VBKx50S5IsY.js @@ -0,0 +1 @@ +return !args.options.mutate \ No newline at end of file diff --git a/reference_scripts/hhv7PrRdlf9sfC82.js b/reference_scripts/hhv7PrRdlf9sfC82.js new file mode 100644 index 0000000..1941c02 --- /dev/null +++ b/reference_scripts/hhv7PrRdlf9sfC82.js @@ -0,0 +1,84 @@ +let characteristics = { + "ws" : 5, + "bs" : 0, + "s" : 5, + "t" : 5, + "i" : 10, + "ag" : 0, + "dex" : 0, + "int" : 0, + "wp" : 0, + "fel" : 0 + } + let skills = ["Cool", "Dodge"] + let skillAdvancements = [10, 10] + let talents = ["Combat Reflexes"] + let trappings = ["Leather Jack", "Leather Skullcap", "Leather Leggings", "Shield"] + let items = [] + + let updateObj = this.actor.toObject(); + + for (let ch in characteristics) + { + updateObj.system.characteristics[ch].modifier += characteristics[ch]; + } + + for (let index = 0; index < skills.length; index++) + { + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } + } + + for (let talent of talents) + { + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } + } + + for (let trapping of trappings) + { + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } + } + + + await this.actor.update(updateObj) + this.actor.createEmbeddedDocuments("Item", items); + + function equip(item) + { + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true + } \ No newline at end of file diff --git a/reference_scripts/hlHKeFWrOA8CsLr9.js b/reference_scripts/hlHKeFWrOA8CsLr9.js new file mode 100644 index 0000000..25e12e8 --- /dev/null +++ b/reference_scripts/hlHKeFWrOA8CsLr9.js @@ -0,0 +1,2 @@ +args.data.canReverse = true; +args.options.pilot = true; \ No newline at end of file diff --git a/reference_scripts/hluehsCuBZYc1Ejt.js b/reference_scripts/hluehsCuBZYc1Ejt.js new file mode 100644 index 0000000..73d83dc --- /dev/null +++ b/reference_scripts/hluehsCuBZYc1Ejt.js @@ -0,0 +1 @@ +return args.characterisic != "fel" \ No newline at end of file diff --git a/reference_scripts/hmk8zV1LTElHUI8A.js b/reference_scripts/hmk8zV1LTElHUI8A.js new file mode 100644 index 0000000..00780d6 --- /dev/null +++ b/reference_scripts/hmk8zV1LTElHUI8A.js @@ -0,0 +1,8 @@ +let msg = `${this.actor.prototypeToken.name} loses 1 Wound.
` + if (this.actor.status.wounds.value <= 1) + { + msg += `${this.actor.prototypeToken.name} goes unconscious.
` + await this.actor.addCondition("unconscious") + } + this.script.scriptMessage(msg) + this.actor.modifyWounds(-1) \ No newline at end of file diff --git a/reference_scripts/hnsmzvcuiUYB065I.js b/reference_scripts/hnsmzvcuiUYB065I.js new file mode 100644 index 0000000..e0d3818 --- /dev/null +++ b/reference_scripts/hnsmzvcuiUYB065I.js @@ -0,0 +1 @@ +this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {appendTitle: ` - ${this.effect.name}`, context: { failure : "May not flee Combat"}}).then(test => test.roll()) \ No newline at end of file diff --git a/reference_scripts/hpwJRAhCsXTp9bd9.js b/reference_scripts/hpwJRAhCsXTp9bd9.js new file mode 100644 index 0000000..5a39770 --- /dev/null +++ b/reference_scripts/hpwJRAhCsXTp9bd9.js @@ -0,0 +1,115 @@ +let choice1 = [ + { + type : "skill", + name : "Melee (Basic)", + diff : { + system : { + advances : { + value : 20 + } + } + } + } +] +let choice2 = [ + { + type : "skill", + name : "Melee (Polearm)", + diff : { + system : { + advances : { + value : 20 + } + } + } + } +] + +let choice3 = [ + { + type : "skill", + name : "Melee (Two-Handed)", + diff : { + system : { + advances : { + value : 20 + } + } + } + } +] + +let choice = await Dialog.wait({ + title : "Choice", + content : + `

+ Select your choice +

+
    +
  1. Melee (Basic)
  2. +
  3. Melee (Polearm)
  4. +
  5. Melee (Two-Handed)
  6. +
+ `, + buttons : { + 1 : { + label : "Basic", + callback : () => { + return choice1 + } + }, + 2 : { + label : "Polearm", + callback : () => { + return choice2 + } + }, + 3 : { + label : "Two-Handed", + callback : () => { + return choice3 + } + } + } +}) + +let updateObj = this.actor.toObject(); +let items = [] +for (let c of choice) +{ + let existing + if (c.type == "skill") + { + existing = updateObj.items.find(i => i.name == c.name && i.type == c.type) + if (existing && c.diff?.system?.advances?.value) + { + existing.system.advances.value += c.diff.system.advances.value + } + } + + if (!existing) + { + let item = await game.wfrp4e.utility.find(c.name, c.type) + if (item) + { + item = item.toObject() + equip(item); + items.push(mergeObject(item, (c.diff || {}))) + } + else + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } + +} +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/hwHpIunCq3ifk2QU.js b/reference_scripts/hwHpIunCq3ifk2QU.js new file mode 100644 index 0000000..d2073d7 --- /dev/null +++ b/reference_scripts/hwHpIunCq3ifk2QU.js @@ -0,0 +1,8 @@ +if (args.item.type == "spell") +{ + let range = parseInt(args.item.Duration) + if (Number.isNumeric(range)) + { + args.item.system.duration.value = "2 * " + args.item.system.duration.value + } +} \ No newline at end of file diff --git a/reference_scripts/hwOZxgt7e65iWvYz.js b/reference_scripts/hwOZxgt7e65iWvYz.js new file mode 100644 index 0000000..b127c0e --- /dev/null +++ b/reference_scripts/hwOZxgt7e65iWvYz.js @@ -0,0 +1,8 @@ +let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) +{ + let damage = this.effect.sourceTest.result.damage + + this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})) +} \ No newline at end of file diff --git a/reference_scripts/hxmwtw5zAHyS2upG.js b/reference_scripts/hxmwtw5zAHyS2upG.js new file mode 100644 index 0000000..49a56fd --- /dev/null +++ b/reference_scripts/hxmwtw5zAHyS2upG.js @@ -0,0 +1 @@ +this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("giftofthebeast")) \ No newline at end of file diff --git a/reference_scripts/i59IpmZNLJEPWZ3L.js b/reference_scripts/i59IpmZNLJEPWZ3L.js new file mode 100644 index 0000000..60db120 --- /dev/null +++ b/reference_scripts/i59IpmZNLJEPWZ3L.js @@ -0,0 +1 @@ +return args.spell \ No newline at end of file diff --git a/reference_scripts/i5AN97A7IOeygEFA.js b/reference_scripts/i5AN97A7IOeygEFA.js new file mode 100644 index 0000000..e128fbe --- /dev/null +++ b/reference_scripts/i5AN97A7IOeygEFA.js @@ -0,0 +1,7 @@ +if (args.applyAP && args.modifiers.ap.metal) +{ + args.modifiers.ap.ignored += args.modifiers.ap.metal + args.modifiers.other.push({value : args.modifiers.ap.metal, label : this.effect.name, details : "Add Metal AP to Damage" }) + args.modifiers.ap.details.push("" + this.effect.name + ": Ignore Metal (" + args.modifiers.ap.metal + ")"); + args.modifiers.ap.metal = 0 +} \ No newline at end of file diff --git a/reference_scripts/i7xl0jNpLnBT2h2l.js b/reference_scripts/i7xl0jNpLnBT2h2l.js new file mode 100644 index 0000000..183f84b --- /dev/null +++ b/reference_scripts/i7xl0jNpLnBT2h2l.js @@ -0,0 +1 @@ +args.actor.characteristics.dex.value = 0 \ No newline at end of file diff --git a/reference_scripts/iAo3wxMLA64rsKjj.js b/reference_scripts/iAo3wxMLA64rsKjj.js new file mode 100644 index 0000000..1388122 --- /dev/null +++ b/reference_scripts/iAo3wxMLA64rsKjj.js @@ -0,0 +1 @@ +this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("skavenbrew")) \ No newline at end of file diff --git a/reference_scripts/iBEPQ3NwtI9DfkEy.js b/reference_scripts/iBEPQ3NwtI9DfkEy.js new file mode 100644 index 0000000..6863a6b --- /dev/null +++ b/reference_scripts/iBEPQ3NwtI9DfkEy.js @@ -0,0 +1,14 @@ +let locations = []; + +while (locations.length < 2) +{ + let loc = await game.wfrp4e.tables.rollTable("hitloc", {hideDSN : true}) + if (!locations.includes(loc.result)) + { + locations.push(loc.result); + } +} + +locationText = locations.map(i => game.wfrp4e.config.locations[i]).join(", ") + +this.item.updateSource({name : this.item.name += ` (${locationText})`}) \ No newline at end of file diff --git a/reference_scripts/iHn3YzvqNfbwzjZz.js b/reference_scripts/iHn3YzvqNfbwzjZz.js new file mode 100644 index 0000000..bd9a8eb --- /dev/null +++ b/reference_scripts/iHn3YzvqNfbwzjZz.js @@ -0,0 +1,6 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM") +let data = item.toObject(); +data.system.specification.value = this.actor.characteristics.s.bonus +data.system.description.value = "" +data.name = this.effect.name; +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/iLpq4yCFN6YACrYA.js b/reference_scripts/iLpq4yCFN6YACrYA.js new file mode 100644 index 0000000..2410b6e --- /dev/null +++ b/reference_scripts/iLpq4yCFN6YACrYA.js @@ -0,0 +1,4 @@ +if (args.test.result.castOutcome == "success") +{ + this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("demonic-mien")) +} \ No newline at end of file diff --git a/reference_scripts/iM4B3IZ4VtpZsl09.js b/reference_scripts/iM4B3IZ4VtpZsl09.js new file mode 100644 index 0000000..497e8eb --- /dev/null +++ b/reference_scripts/iM4B3IZ4VtpZsl09.js @@ -0,0 +1 @@ +args.size = "sml" \ No newline at end of file diff --git a/reference_scripts/iM6JLF8jDXMViReZ.js b/reference_scripts/iM6JLF8jDXMViReZ.js new file mode 100644 index 0000000..34e9ba4 --- /dev/null +++ b/reference_scripts/iM6JLF8jDXMViReZ.js @@ -0,0 +1 @@ +return !["Pick Lock", "Sleight of Hand", "Channelling (Ulgu)"].includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/iMDZLr7ueJWBnilj.js b/reference_scripts/iMDZLr7ueJWBnilj.js new file mode 100644 index 0000000..d950702 --- /dev/null +++ b/reference_scripts/iMDZLr7ueJWBnilj.js @@ -0,0 +1 @@ +args.actor.flags.rangedDamageIncrease += 1 \ No newline at end of file diff --git a/reference_scripts/iMu8BZ7eHMAbPEO1.js b/reference_scripts/iMu8BZ7eHMAbPEO1.js new file mode 100644 index 0000000..46b2e56 --- /dev/null +++ b/reference_scripts/iMu8BZ7eHMAbPEO1.js @@ -0,0 +1,5 @@ +let healed = args.totalWoundLoss + +this.script.scriptMessage(`this.actor.prototypeToken.name healed ${healed} Wounds`); + +this.actor.modifyWounds(healed) \ No newline at end of file diff --git a/reference_scripts/iNAQJa5HyaEckknX.js b/reference_scripts/iNAQJa5HyaEckknX.js new file mode 100644 index 0000000..517797d --- /dev/null +++ b/reference_scripts/iNAQJa5HyaEckknX.js @@ -0,0 +1,18 @@ +let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); + + +let opposedResult = test.opposedMessages[0]?.getOppose()?.resultMessage?.getOpposedTest()?.result + +if (opposedResult?.winner == "attacker") +{ + let spells = this.actor.itemTypes.spell; + if (spells.length) + { + let chosen = spells[Math.floor(CONFIG.Dice.randomUniform() * spells.length)] + this.script.scriptMessage(`Loses access to ${chosen.name}`) + chosen.update({name : chosen.name += " (LOST)"}) + } +} + + diff --git a/reference_scripts/iT0h3VZLEBQnn5Bx.js b/reference_scripts/iT0h3VZLEBQnn5Bx.js new file mode 100644 index 0000000..eda68c1 --- /dev/null +++ b/reference_scripts/iT0h3VZLEBQnn5Bx.js @@ -0,0 +1 @@ +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"); \ No newline at end of file diff --git a/reference_scripts/iT3C15fMyQrj1RmG.js b/reference_scripts/iT3C15fMyQrj1RmG.js new file mode 100644 index 0000000..5264fd2 --- /dev/null +++ b/reference_scripts/iT3C15fMyQrj1RmG.js @@ -0,0 +1,8 @@ +if (this.actor.has("Undead") && this.actor.has("Ethereal")) +{ + this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name}).then(async test => { + await test.roll(); + if(test.failed) + this.actor.addCondition("stunned") + }) +} \ No newline at end of file diff --git a/reference_scripts/iVhi3Z6zPaf1bf8g.js b/reference_scripts/iVhi3Z6zPaf1bf8g.js new file mode 100644 index 0000000..3fce244 --- /dev/null +++ b/reference_scripts/iVhi3Z6zPaf1bf8g.js @@ -0,0 +1 @@ +return ["t", "i", "ag", "dex", "int", "wp"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/iX0ctHYHg12pjaCU.js b/reference_scripts/iX0ctHYHg12pjaCU.js new file mode 100644 index 0000000..6e71555 --- /dev/null +++ b/reference_scripts/iX0ctHYHg12pjaCU.js @@ -0,0 +1,15 @@ +let result = await game.wfrp4e.tables.rollTable("gift-of-slaanesh") + +if (result.object.documentId && result.object.documentCollection) +{ + let item = await fromUuid(`Compendium.${result.object.documentCollection}.${result.object.documentId}`); + if (item) + { + let data = item.toObject(); + // Some items need sourceTest for their effects + setProperty(data, "flags.wfrp4e.sourceTest", this.effect.sourceTest); + await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}); + } +} + +this.script.scriptMessage(game.wfrp4e.tables.formatChatRoll("gift-of-slaanesh", {lookup : result.roll, hideDSN: true})); \ No newline at end of file diff --git a/reference_scripts/id9ZdkERMZnZTWXt.js b/reference_scripts/id9ZdkERMZnZTWXt.js new file mode 100644 index 0000000..633bb00 --- /dev/null +++ b/reference_scripts/id9ZdkERMZnZTWXt.js @@ -0,0 +1,7 @@ +if (args.extendedTest?.getFlag("wfrp4e", "fear")) +{ + this.script.scriptNotification("Immune to Fear"); + args.extendedTest.delete(); + args.abort = true; +} +return args.options.terror || args.extendedTest?.getFlag("wfrp4e", "fear") \ No newline at end of file diff --git a/reference_scripts/igVAVU7DOuzhNG14.js b/reference_scripts/igVAVU7DOuzhNG14.js new file mode 100644 index 0000000..ca781a1 --- /dev/null +++ b/reference_scripts/igVAVU7DOuzhNG14.js @@ -0,0 +1 @@ +return args.item?.system.isMelee \ No newline at end of file diff --git a/reference_scripts/imKVsCy8rya2gkwO.js b/reference_scripts/imKVsCy8rya2gkwO.js new file mode 100644 index 0000000..cfdc4ba --- /dev/null +++ b/reference_scripts/imKVsCy8rya2gkwO.js @@ -0,0 +1,18 @@ +// Any Characteristic penalties due to failed Consume Alcohol Tests +// or the state of being Stinking Drunk are eliminated. +await this.actor.removeSystemEffect("consumealcohol1") +await this.actor.removeSystemEffect("consumealcohol2") +await this.actor.removeSystemEffect("consumealcohol3") +await this.actor.removeSystemEffect("stinkingdrunk1") + +// The drinker is thereafter Fatigued +// for a number of hours equal to 10 minus their Toughness Bonus — +// nothing but time and rest can eliminate this penalty. +await this.actor.addCondition("fatigued") +const duration = 10 - parseInt(this.actor.system.characteristics.t.bonus) +this.effect.updateSource({"duration.rounds" : duration}); +this.script.scriptMessage(`

${this.actor.prototypeToken.name} has lost all alcohol related penalties and gains the Fatigued Condition for ${duration} hours.

`, +{ + whisper: ChatMessage.getWhisperRecipients("GM"), + blind: true +}) \ No newline at end of file diff --git a/reference_scripts/inPxRSx0CDj1nwAm.js b/reference_scripts/inPxRSx0CDj1nwAm.js new file mode 100644 index 0000000..6fda683 --- /dev/null +++ b/reference_scripts/inPxRSx0CDj1nwAm.js @@ -0,0 +1,4 @@ +if (args.test.result.fumble && !this.actor.itemTypes.talent.find(i => i.name == "Arcane Magic (Fire)")) +{ + this.actor.addCondition("ablaze"); +} \ No newline at end of file diff --git a/reference_scripts/ioeTj5mx8jlA5EX5.js b/reference_scripts/ioeTj5mx8jlA5EX5.js new file mode 100644 index 0000000..9605807 --- /dev/null +++ b/reference_scripts/ioeTj5mx8jlA5EX5.js @@ -0,0 +1 @@ +args.actor.addCondition("stunned") \ No newline at end of file diff --git a/reference_scripts/ipkkRffJh61WE7zR.js b/reference_scripts/ipkkRffJh61WE7zR.js new file mode 100644 index 0000000..fe706ac --- /dev/null +++ b/reference_scripts/ipkkRffJh61WE7zR.js @@ -0,0 +1,5 @@ +if (!args.flags.amputatedFootOrLeg) +{ + args.flags.amputatedFootOrLeg= true; + args.fields.modifier -= 20; +} \ No newline at end of file diff --git a/reference_scripts/iuSoKntfJ4eAPafQ.js b/reference_scripts/iuSoKntfJ4eAPafQ.js new file mode 100644 index 0000000..6f1b6d7 --- /dev/null +++ b/reference_scripts/iuSoKntfJ4eAPafQ.js @@ -0,0 +1,8 @@ +let spells = await game.wfrp4e.utility.findAll("spell", "Loading Spells"); +spells = 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) + +let choice = await ItemDialog.create(spells, 1, "Choose Spell"); +if (choice[0]) +{ + this.actor.createEmbeddedDocuments("Item", choice, {fromEffect: this.effect.id}) +} diff --git a/reference_scripts/iuYuf05BNuZ5fllI.js b/reference_scripts/iuYuf05BNuZ5fllI.js new file mode 100644 index 0000000..2e17e76 --- /dev/null +++ b/reference_scripts/iuYuf05BNuZ5fllI.js @@ -0,0 +1,4 @@ +if (args.test.isFumble) +{ + args.test.result.other.push("@Table[poisoned-wind-globe]") +} \ No newline at end of file diff --git a/reference_scripts/j1AmrY1SxFJQyapo.js b/reference_scripts/j1AmrY1SxFJQyapo.js new file mode 100644 index 0000000..843d5b1 --- /dev/null +++ b/reference_scripts/j1AmrY1SxFJQyapo.js @@ -0,0 +1,4 @@ +if (this.actor.status.advantage.value > 0 && args.item.system.attackType) +{ + args.item.system.qualities.value.push({name : "penetrating"}) +} \ No newline at end of file diff --git a/reference_scripts/j3zDMWkns32Yrxn3.js b/reference_scripts/j3zDMWkns32Yrxn3.js new file mode 100644 index 0000000..2e60b32 --- /dev/null +++ b/reference_scripts/j3zDMWkns32Yrxn3.js @@ -0,0 +1 @@ +this.effect.updateSource({"flags.wfrp4e.ward" : 9}) \ No newline at end of file diff --git a/reference_scripts/j6Bf1iivH8cqSnnK.js b/reference_scripts/j6Bf1iivH8cqSnnK.js new file mode 100644 index 0000000..f972bb4 --- /dev/null +++ b/reference_scripts/j6Bf1iivH8cqSnnK.js @@ -0,0 +1,2 @@ +let target = args.data.targets[0] +return target?.actor.hasCondition("prone") || target.hasCondition("surprised") \ No newline at end of file diff --git a/reference_scripts/j98hvy6r9G2Vjmid.js b/reference_scripts/j98hvy6r9G2Vjmid.js new file mode 100644 index 0000000..e02fdd6 --- /dev/null +++ b/reference_scripts/j98hvy6r9G2Vjmid.js @@ -0,0 +1,12 @@ +if (args.totalWoundLoss > 0) +{ + args.opposedTest.result.other.push( + `@Corruption[minor]{Minor Exposure to Corruption}` + ) + this.script.scriptMessage( + `${this.effect.name}: + @Corruption[minor]{Minor Exposure to Corruption}
+ ${args.actor.prototypeToken.name} must take an + Average (+20%) Corruption (Minor) Test`, + {whisper: ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/reference_scripts/jC8o5PbnqEvOoZ9N.js b/reference_scripts/jC8o5PbnqEvOoZ9N.js new file mode 100644 index 0000000..2f4b579 --- /dev/null +++ b/reference_scripts/jC8o5PbnqEvOoZ9N.js @@ -0,0 +1 @@ +this.actor.addCondition("poisoned", 2) \ No newline at end of file diff --git a/reference_scripts/jFwema0iwzBphxie.js b/reference_scripts/jFwema0iwzBphxie.js new file mode 100644 index 0000000..adb34c2 --- /dev/null +++ b/reference_scripts/jFwema0iwzBphxie.js @@ -0,0 +1,9 @@ +let woundsGained = Math.min(args.actor.status.wounds.value, args.totalWoundLoss) +woundsGained = Math.ceil(woundsGained / 2) + +args.attacker.update({"system.status.wounds.value" : args.attacker.system.status.wounds.value + woundsGained}) + +args.actor.addCondition("fatigued") +args.attacker.hasCondition("fatigued")?.delete(); + +this.script.scriptMessage(`${args.attacker.prototypeToken.name} gains ${woundsGained} Wounds`); \ No newline at end of file diff --git a/reference_scripts/jGDk7avWFSnyFoql.js b/reference_scripts/jGDk7avWFSnyFoql.js new file mode 100644 index 0000000..a76c522 --- /dev/null +++ b/reference_scripts/jGDk7avWFSnyFoql.js @@ -0,0 +1,9 @@ +let broken = this.actor.hasCondition("broken"); +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.IAWyzDfC286a9MPz"); + +if (broken && !broken.getFlag("wfrp4e", "blasted-mind") && !this.actor.has(item.name)) +{ + await broken.delete(); + this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id}) + this.script.scriptNotification(`Removed ${broken.name}, added ${item.name} (${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds)`) +} \ No newline at end of file diff --git a/reference_scripts/jHgxpe6TJDlP3oTn.js b/reference_scripts/jHgxpe6TJDlP3oTn.js new file mode 100644 index 0000000..0a1b29a --- /dev/null +++ b/reference_scripts/jHgxpe6TJDlP3oTn.js @@ -0,0 +1,9 @@ +let spells = await game.wfrp4e.utility.findAll("spell", "Loading Spells"); +spells = spells.filter(s => ["slaanesh"].includes(s.system.lore.value)) + +let choice = await ItemDialog.create(spells, 1, "Choose Spell"); +if (choice[0]) +{ + this.item.updateSource({name : this.item.name + ` (${choice[0].name})`}) + this.actor.createEmbeddedDocuments("Item", choice, {fromEffect: this.effect.id}) +} diff --git a/reference_scripts/jLsL4KRI6LEG9Ii2.js b/reference_scripts/jLsL4KRI6LEG9Ii2.js new file mode 100644 index 0000000..315d608 --- /dev/null +++ b/reference_scripts/jLsL4KRI6LEG9Ii2.js @@ -0,0 +1,5 @@ +if (args.test.result.critical && ['rLeg', 'lLeg'].includes(args.test.result.hitloc.result)) +{ + args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 20 : 20 + args.test.result.critical += ` (+${args.test.result.critModifier})` +} \ No newline at end of file diff --git a/reference_scripts/jObJanFoev4N6ZRv.js b/reference_scripts/jObJanFoev4N6ZRv.js new file mode 100644 index 0000000..4580414 --- /dev/null +++ b/reference_scripts/jObJanFoev4N6ZRv.js @@ -0,0 +1,2 @@ +if (!args.opposedTest.attackerTest.item?.system?.isMagical) + args.abort = `${this.effect.name}: Ignored` \ No newline at end of file diff --git a/reference_scripts/jRSgPhpfN7MH7TTp.js b/reference_scripts/jRSgPhpfN7MH7TTp.js new file mode 100644 index 0000000..8614c9c --- /dev/null +++ b/reference_scripts/jRSgPhpfN7MH7TTp.js @@ -0,0 +1,16 @@ +if (args.totalWoundLoss > 0) +{ + 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" } }) + await test.roll(); + if (test.failed) + { + args.actor.addCondition("poisoned"); + if (args.actor.system.status.wounds.value - args.totalWoundLoss <= 0) + { + args.actor.addCondition("unconscious") + } + } +} + + // else + // this.actor.setupCharacteristic("t", { context: { failure: "1 @Condition[Poisoned] Condition Gained", success: "Resisted @Condition[Poisoned] Condition" } }).then(testCallback) diff --git a/reference_scripts/jW87rmQLtROdVEhW.js b/reference_scripts/jW87rmQLtROdVEhW.js new file mode 100644 index 0000000..6c5e3ca --- /dev/null +++ b/reference_scripts/jW87rmQLtROdVEhW.js @@ -0,0 +1,5 @@ + if (["orc", "ork", "goblin", "hobgoblin", "snotling", "greenskin"].includes(args.opposedTest.defender.details.species.value.toLowerCase())) + { + args.addImpact = true + args.opposedTest.result.other.push("Rune of Goblin Bane: Impact Added") + } \ No newline at end of file diff --git a/reference_scripts/jWkfoVpHLiRaHTza.js b/reference_scripts/jWkfoVpHLiRaHTza.js new file mode 100644 index 0000000..eb8a1cf --- /dev/null +++ b/reference_scripts/jWkfoVpHLiRaHTza.js @@ -0,0 +1,4 @@ +if (args.test.succeeded) +{ + args.test.result.other.push(`${this.effect.name}: @Terror[1,${this.actor.prototypeToken.name}]`) +} \ No newline at end of file diff --git a/reference_scripts/jYJRO5XPyG7y6fih.js b/reference_scripts/jYJRO5XPyG7y6fih.js new file mode 100644 index 0000000..6473155 --- /dev/null +++ b/reference_scripts/jYJRO5XPyG7y6fih.js @@ -0,0 +1,3 @@ +await this.actor.addCondition("blinded") +await this.actor.addCondition("deafened") +await this.actor.addCondition("fatigued") \ No newline at end of file diff --git a/reference_scripts/jbZPLb4wuqJpHLUx.js b/reference_scripts/jbZPLb4wuqJpHLUx.js new file mode 100644 index 0000000..0aa879a --- /dev/null +++ b/reference_scripts/jbZPLb4wuqJpHLUx.js @@ -0,0 +1 @@ +this.item.system.flaws.value.push({name : "dangerous"}) \ No newline at end of file diff --git a/reference_scripts/jdS2u1tQPYeO55WI.js b/reference_scripts/jdS2u1tQPYeO55WI.js new file mode 100644 index 0000000..a274d28 --- /dev/null +++ b/reference_scripts/jdS2u1tQPYeO55WI.js @@ -0,0 +1,61 @@ +let type = this.item.getFlag("wfrp4e", "breath"); + +if (type == "cold") +{ + let stunned = Math.max(1, Math.trunc(args.totalWoundLoss / 5)) + await args.actor.addCondition("stunned", stunned); +} + +if (type == "corrosion") +{ + let damageItems = await Dialog.confirm({title : this.item.name, content : `

Damage all Items carried?

`}) + if (damageItems) + { + let msg = `` + let weapons = args.actor.itemTypes.weapon.filter(i => i.isEquipped); + let armour = args.actor.itemTypes.armour.filter(i => i.isEquipped); + let trappings = args.actor.itemTypes.trapping.filter(i => i.isEquipped); + for(let item of weapons) + { + if (item.system.properties.qualities.shield) + { + await item.system.damageItem(1, "shield"); + } + else + { + await item.system.damageItem(1); + } + msg += `

${item.name} damage by 1

` + } + for(let item of armour) + { + await item.system.damageItem(1); + msg += `

${item.name} damage by 1

` + } + for(let item of trappings) + { + await item.system.damageItem(1); + msg += `

${item.name} damage by 1

` + } + if (msg) + { + this.script.scriptMessage(msg, {speaker : {alias : args.actor.name}}); + } + } +} + +if (type == "fire") +{ + await args.actor.addCondition("ablaze"); +} + +if (type == "electricity") +{ + await args.actor.addCondition("stunned"); +} + +if (type == "poison") +{ + await args.actor.addCondition("poisoned"); +} + diff --git a/reference_scripts/jfk5VDKMTIf4ee0v.js b/reference_scripts/jfk5VDKMTIf4ee0v.js new file mode 100644 index 0000000..bf86bc6 --- /dev/null +++ b/reference_scripts/jfk5VDKMTIf4ee0v.js @@ -0,0 +1,2 @@ +if (args.totalWoundLoss > 0) + args.actor.addCondition("poisoned") \ No newline at end of file diff --git a/reference_scripts/jgO1Kf60Ctt6R0qO.js b/reference_scripts/jgO1Kf60Ctt6R0qO.js new file mode 100644 index 0000000..5fb4283 --- /dev/null +++ b/reference_scripts/jgO1Kf60Ctt6R0qO.js @@ -0,0 +1 @@ +return args.item?.name != game.i18n.localize("NAME.Leadership") \ No newline at end of file diff --git a/reference_scripts/jmxlpyLrIuoxQtvU.js b/reference_scripts/jmxlpyLrIuoxQtvU.js new file mode 100644 index 0000000..097d4e0 --- /dev/null +++ b/reference_scripts/jmxlpyLrIuoxQtvU.js @@ -0,0 +1 @@ + this.actor.getActiveTokens().forEach(t => t.document.update({texture : {scaleX : 2, scaleY: 2, src: "modules/wfrp4e-core/tokens/popout/gor.webp"}})); diff --git a/reference_scripts/jpcU8FFWSlQ3gD0L.js b/reference_scripts/jpcU8FFWSlQ3gD0L.js new file mode 100644 index 0000000..dfb5b37 --- /dev/null +++ b/reference_scripts/jpcU8FFWSlQ3gD0L.js @@ -0,0 +1 @@ +return !args.skill?.name?.includes(game.i18n.localize("NAME.Trade")) \ No newline at end of file diff --git a/reference_scripts/jrvj7bRyMBB9LixP.js b/reference_scripts/jrvj7bRyMBB9LixP.js new file mode 100644 index 0000000..8c8d940 --- /dev/null +++ b/reference_scripts/jrvj7bRyMBB9LixP.js @@ -0,0 +1 @@ +this.actor.addCondition("fatigued", 3) \ No newline at end of file diff --git a/reference_scripts/jsgLEVYvMieyYT6L.js b/reference_scripts/jsgLEVYvMieyYT6L.js new file mode 100644 index 0000000..bfcf625 --- /dev/null +++ b/reference_scripts/jsgLEVYvMieyYT6L.js @@ -0,0 +1,18 @@ +let tokenImg = ""; // Put path to token image here, inbetween the quotation marks +if (tokenImg) +{ + if (this.effect.getFlag("wfrp4e", "transformed")) + { + await this.effect.setFlag("wfrp4e", "transformed", false); + this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: this.actor.prototypeToken.texture.src}})); + } + else + { + await this.effect.setFlag("wfrp4e", "transformed", true); + this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: tokenImg}})); + } +} +else +{ + this.script.scriptNotification("No Token Image path configured. The image path should be set in the first line of this script.", "error"); +} \ No newline at end of file diff --git a/reference_scripts/k3FqFgsF6a3TkxAD.js b/reference_scripts/k3FqFgsF6a3TkxAD.js new file mode 100644 index 0000000..b78e571 --- /dev/null +++ b/reference_scripts/k3FqFgsF6a3TkxAD.js @@ -0,0 +1,3 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +test.roll(); +return true; \ No newline at end of file diff --git a/reference_scripts/k8TC0yzp4xfOXD2n.js b/reference_scripts/k8TC0yzp4xfOXD2n.js new file mode 100644 index 0000000..26e00ae --- /dev/null +++ b/reference_scripts/k8TC0yzp4xfOXD2n.js @@ -0,0 +1,10 @@ +if (args.totalWoundLoss > 0) +{ + let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); + await test.roll(); + if (test.failed) + { + args.actor.addCondition("stunned"); + } + args.actor.hasCondition("bleeding")?.delete() +} \ No newline at end of file diff --git a/reference_scripts/k9SvH4Lm3ZuI8S1N.js b/reference_scripts/k9SvH4Lm3ZuI8S1N.js new file mode 100644 index 0000000..8315c45 --- /dev/null +++ b/reference_scripts/k9SvH4Lm3ZuI8S1N.js @@ -0,0 +1 @@ +return !["wp", "ag", "i", "int"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/kBXVEnSWzaQZLkJH.js b/reference_scripts/kBXVEnSWzaQZLkJH.js new file mode 100644 index 0000000..f8484c9 --- /dev/null +++ b/reference_scripts/kBXVEnSWzaQZLkJH.js @@ -0,0 +1,5 @@ +if(args.test.result.critical) +{ + args.test.result.damage +=1 + args.test.result.additionalDamage += 1 +} \ No newline at end of file diff --git a/reference_scripts/kIM4Fs1lFVV7TSnj.js b/reference_scripts/kIM4Fs1lFVV7TSnj.js new file mode 100644 index 0000000..176adc4 --- /dev/null +++ b/reference_scripts/kIM4Fs1lFVV7TSnj.js @@ -0,0 +1 @@ +this.actor.modifyAdvantage(1); \ No newline at end of file diff --git a/reference_scripts/kMSdRskYDI2J1gnp.js b/reference_scripts/kMSdRskYDI2J1gnp.js new file mode 100644 index 0000000..c06e3bc --- /dev/null +++ b/reference_scripts/kMSdRskYDI2J1gnp.js @@ -0,0 +1,7 @@ +let 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("prone"); +} + \ No newline at end of file diff --git a/reference_scripts/kWynO1lQzjiSs8RK.js b/reference_scripts/kWynO1lQzjiSs8RK.js new file mode 100644 index 0000000..0b3b7e8 --- /dev/null +++ b/reference_scripts/kWynO1lQzjiSs8RK.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Haggle"); \ No newline at end of file diff --git a/reference_scripts/kYiDBPRKIokFkr4Z.js b/reference_scripts/kYiDBPRKIokFkr4Z.js new file mode 100644 index 0000000..10222a8 --- /dev/null +++ b/reference_scripts/kYiDBPRKIokFkr4Z.js @@ -0,0 +1,4 @@ +if (args.item.type == "skill" && args.item.name == "Ranged (Bow)") +{ + args.item.system.modifier.value += 20; +} \ No newline at end of file diff --git a/reference_scripts/kYmscP2HuXjDovBD.js b/reference_scripts/kYmscP2HuXjDovBD.js new file mode 100644 index 0000000..2e53be1 --- /dev/null +++ b/reference_scripts/kYmscP2HuXjDovBD.js @@ -0,0 +1 @@ +return args.skill?.name.includes(game.i18n.localize("NAME.Stealth")) diff --git a/reference_scripts/kiJ6AiaYVUjt6aV6.js b/reference_scripts/kiJ6AiaYVUjt6aV6.js new file mode 100644 index 0000000..2998e2c --- /dev/null +++ b/reference_scripts/kiJ6AiaYVUjt6aV6.js @@ -0,0 +1,7 @@ +teeth = await fromUuid("Compendium.wfrp4e-core.items.fBcZhOBn8IpoVqQ1") +teeth = teeth.toObject(); + +let roll = await new Roll("1d10").roll(); +roll.toMessage(this.script.getChatData({flavor : "Teeth Lost"})) +teeth.system.location.value = `${roll.total} ${teeth.system.location.value}` +this.actor.createEmbeddedDocuments("Item", [teeth]) \ No newline at end of file diff --git a/reference_scripts/kkC5EhqA05U6U0gU.js b/reference_scripts/kkC5EhqA05U6U0gU.js new file mode 100644 index 0000000..4116109 --- /dev/null +++ b/reference_scripts/kkC5EhqA05U6U0gU.js @@ -0,0 +1,17 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); + +// Kind of insane but whatever +let opposedResult = test.opposedMessages[0]?.getOppose()?.resultMessage?.getOpposedTest()?.result + +if (opposedResult?.winner == "attacker") +{ + if (opposedResult.differenceSL < 6) + { + this.actor.addCondition("fatigued", Math.floor(opposedResult.differenceSL / 2)) + } + else if (opposedResult.differenceSL >= 6) + { + this.actor.addCondition("broken"); + } +} \ No newline at end of file diff --git a/reference_scripts/kmsGLWGxCY8Z8jVG.js b/reference_scripts/kmsGLWGxCY8Z8jVG.js new file mode 100644 index 0000000..3077f61 --- /dev/null +++ b/reference_scripts/kmsGLWGxCY8Z8jVG.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Intuition"); \ No newline at end of file diff --git a/reference_scripts/kvaN100w0nBUlLbj.js b/reference_scripts/kvaN100w0nBUlLbj.js new file mode 100644 index 0000000..cc524fa --- /dev/null +++ b/reference_scripts/kvaN100w0nBUlLbj.js @@ -0,0 +1,6 @@ +let poisoned = this.actor.hasCondition("poisoned") +if (poisoned) +{ + this.script.scriptMessage("Immune to Poisoned") + poisoned.delete() +} \ No newline at end of file diff --git a/reference_scripts/l8qFKSnMpy4P7XQR.js b/reference_scripts/l8qFKSnMpy4P7XQR.js new file mode 100644 index 0000000..523491c --- /dev/null +++ b/reference_scripts/l8qFKSnMpy4P7XQR.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Stealth")); \ No newline at end of file diff --git a/reference_scripts/lCOdnKz8XpnkDs6Q.js b/reference_scripts/lCOdnKz8XpnkDs6Q.js new file mode 100644 index 0000000..51d5386 --- /dev/null +++ b/reference_scripts/lCOdnKz8XpnkDs6Q.js @@ -0,0 +1,2 @@ +let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/lFO6XdfUODmFArqx.js b/reference_scripts/lFO6XdfUODmFArqx.js new file mode 100644 index 0000000..083ec87 --- /dev/null +++ b/reference_scripts/lFO6XdfUODmFArqx.js @@ -0,0 +1 @@ +args.actor.addCondition("bleeding") \ No newline at end of file diff --git a/reference_scripts/lII4KMRblqwFBlsV.js b/reference_scripts/lII4KMRblqwFBlsV.js new file mode 100644 index 0000000..49bd3a7 --- /dev/null +++ b/reference_scripts/lII4KMRblqwFBlsV.js @@ -0,0 +1,133 @@ +let characteristics = { + "ws" : 10, + "bs" : 0, + "s" : 0, + "t" : 0, + "i" : 10, + "ag" : 0, + "dex" : 0, + "int" : 20, + "wp" : 10, + "fel" : 15 +} +let skills = ["Channelling", "Charm", "Perform (Dancing)"] +let skillAdvancements = [0, 6, 3] +let talents = ["Attractive", "Distract", "Mimic"] +let traits = ["Distracting", "Flight (6)", "Spellcaster (Petty)"] +let trappings = [] +let items = []; +let spells = ["Marsh Lights", "Sleep"]; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +const traitRegex = /(?:,?(.+?)(\+?\d{1,2}\+?)?\s*?(?:\((.+?)\)\s*(\+?\d{1,2})?|,|$))/gm +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's a specialization + let traitSpec = traitMatches[3] + + let traitItem; + try { + traitItem = await WFRP_Utility.findItem(traitName, "trait") + } + catch { } + if (!traitItem) { + ui.notifications.warn(`Could not find ${trait}`, {permanent : true}) + } + traitItem = traitItem.toObject() + + if (Number.isNumeric(traitVal)) + { + traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal; + traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim() + } + else + traitItem.system.specification.value = traitSpec + + items.push(traitItem) + +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + 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 += " " + this.effect.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + + +function equip(item) +{ + if (item.type == "armour") + item.worn = true + else if (item.type == "weapon") + item.equipped = true + else if (item.type == "trapping" && item.trappingType?.value == "clothingAccessories") + item.worn = true +} \ No newline at end of file diff --git a/reference_scripts/lOzkngzye4RmvALp.js b/reference_scripts/lOzkngzye4RmvALp.js new file mode 100644 index 0000000..4f261d3 --- /dev/null +++ b/reference_scripts/lOzkngzye4RmvALp.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}); +this.script.scriptNotification("Added " + item.name) \ No newline at end of file diff --git a/reference_scripts/lPudo1grrVp05i7a.js b/reference_scripts/lPudo1grrVp05i7a.js new file mode 100644 index 0000000..b96114f --- /dev/null +++ b/reference_scripts/lPudo1grrVp05i7a.js @@ -0,0 +1,11 @@ +let loc = Math.floor(CONFIG.Dice.randomUniform() * 2) == 0 ? "head" : "body" +let damage = this.actor.system.characteristics.s.bonus + 6 + + this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name}).then(async test => { + await test.roll(); + if(test.failed) + { + await this.actor.addCondition("stunned") + this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {loc, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true})) + } + }) \ No newline at end of file diff --git a/reference_scripts/lQJ68n3y1xDyNicE.js b/reference_scripts/lQJ68n3y1xDyNicE.js new file mode 100644 index 0000000..0d61d6e --- /dev/null +++ b/reference_scripts/lQJ68n3y1xDyNicE.js @@ -0,0 +1 @@ +return !args.options.sizeModifier && args.item?.system?.attackType != "ranged" \ No newline at end of file diff --git a/reference_scripts/lSOAZ4FG44bT4jh1.js b/reference_scripts/lSOAZ4FG44bT4jh1.js new file mode 100644 index 0000000..fd544d6 --- /dev/null +++ b/reference_scripts/lSOAZ4FG44bT4jh1.js @@ -0,0 +1,7 @@ +let infected = await fromUuid("Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW") +let fear = await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn") + +let infectedData = infected.toObject(); +let fearData = fear.toObject(); +fearData.system.specification.value = 2; +this.actor.createEmbeddedDocuments("Item", [fearData, infectedData], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/lU4s3UTtBkU38djI.js b/reference_scripts/lU4s3UTtBkU38djI.js new file mode 100644 index 0000000..ba1cf91 --- /dev/null +++ b/reference_scripts/lU4s3UTtBkU38djI.js @@ -0,0 +1,4 @@ +this.actor.addCondition("entangled") +let msg = `${this.actor.prototypeToken.name} loses 1 Wound and gains 1 Entangled Condition.` +this.script.scriptMessage(msg) +this.actor.modifyWounds(-1) \ No newline at end of file diff --git a/reference_scripts/lYYkGzqNshiYc7WI.js b/reference_scripts/lYYkGzqNshiYc7WI.js new file mode 100644 index 0000000..d17b4c6 --- /dev/null +++ b/reference_scripts/lYYkGzqNshiYc7WI.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("poisoned") +} \ No newline at end of file diff --git a/reference_scripts/laptAldsT0Fm1rDt.js b/reference_scripts/laptAldsT0Fm1rDt.js new file mode 100644 index 0000000..861ea5e --- /dev/null +++ b/reference_scripts/laptAldsT0Fm1rDt.js @@ -0,0 +1,6 @@ +let blunt = await Dialog.confirm({label : "test", content :`

Apply blunt damage reduction? (-3)

`}) + +if (blunt) +{ + args.modifiers.other.push({label : this.effect.name, details : "Blunt Damage Reduction", value : -3}) +} \ No newline at end of file diff --git a/reference_scripts/lhemR8EP5tGNKout.js b/reference_scripts/lhemR8EP5tGNKout.js new file mode 100644 index 0000000..a9d9356 --- /dev/null +++ b/reference_scripts/lhemR8EP5tGNKout.js @@ -0,0 +1,14 @@ +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"}}) +await test.roll(); +if (test.failed) +{ + msg = `

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

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

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

` + let newCorruption = Number(this.actor.status.corruption.value) + 1 + this.actor.update({"system.status.corruption.value" : newCorruption}) + } + + this.script.scriptMessage(msg); +} diff --git a/reference_scripts/ljpM7muMyxGD04EX.js b/reference_scripts/ljpM7muMyxGD04EX.js new file mode 100644 index 0000000..50ba967 --- /dev/null +++ b/reference_scripts/ljpM7muMyxGD04EX.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/lol5J6h0pErzM71s.js b/reference_scripts/lol5J6h0pErzM71s.js new file mode 100644 index 0000000..cc986ba --- /dev/null +++ b/reference_scripts/lol5J6h0pErzM71s.js @@ -0,0 +1 @@ +return args.weapon?.system.properties.flaws.crewed \ No newline at end of file diff --git a/reference_scripts/lvjcddwRiN9iGruy.js b/reference_scripts/lvjcddwRiN9iGruy.js new file mode 100644 index 0000000..1f4ca7b --- /dev/null +++ b/reference_scripts/lvjcddwRiN9iGruy.js @@ -0,0 +1,38 @@ +let test = await this.actor.setupCharacteristic("t", { appendTitle: ` - ${this.effect.name}`, fields: { difficulty: "challenging" } }) +await test.roll(); + +if (test.failed) +{ + let ageAdded = Math.ceil(CONFIG.Dice.randomUniform() * 10) + Math.ceil(CONFIG.Dice.randomUniform() * 10) + let ws = Math.ceil(CONFIG.Dice.randomUniform() * 10) + let bs = Math.ceil(CONFIG.Dice.randomUniform() * 10) + let s = Math.ceil(CONFIG.Dice.randomUniform() * 10) + let t = Math.ceil(CONFIG.Dice.randomUniform() * 10) + let ag = Math.ceil(CONFIG.Dice.randomUniform() * 10) + let dex = Math.ceil(CONFIG.Dice.randomUniform() * 10) + + let currentAge = parseInt(this.actor.system.details.age.value) + + let inline = `@ROLL` + let msg = + `

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

+

${inline.replace("@ROLL", ws).replace("@TT", "1d10")} Weapon Skill

+

${inline.replace("@ROLL", bs).replace("@TT", "1d10")} Ballistic Skill

+

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

+

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

+

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

+

${inline.replace("@ROLL", dex).replace("@TT", "1d10")} Dexterity

+ ` + this.script.scriptMessage(msg); + + let characteristics = duplicate(this.actor.system.characteristics) + + characteristics.ws.initial -= ws + characteristics.bs.initial -= bs + characteristics.s.initial -= s + characteristics.t.initial -= t + characteristics.ag.initial -= ag + characteristics.dex.initial -= dex + + this.actor.update({ "system.characteristics": characteristics, "data.details.age.value": ageAdded + currentAge }) +} \ No newline at end of file diff --git a/reference_scripts/lwVhn4bSXJ3eoT9q.js b/reference_scripts/lwVhn4bSXJ3eoT9q.js new file mode 100644 index 0000000..3a19740 --- /dev/null +++ b/reference_scripts/lwVhn4bSXJ3eoT9q.js @@ -0,0 +1,8 @@ +if (this.item.system.weaponGroup.value == "basic") +{ + let slash = this.item.system.qualities.value.find(i => i.name == "slash") + if (slash) + { + slash.value = "2A" + } +} \ No newline at end of file diff --git a/reference_scripts/m3qEVO5fseV6KHXa.js b/reference_scripts/m3qEVO5fseV6KHXa.js new file mode 100644 index 0000000..ebc6391 --- /dev/null +++ b/reference_scripts/m3qEVO5fseV6KHXa.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.qn4ZpvTQIX4rcJDl") +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/m58MpMZBblpq5LJu.js b/reference_scripts/m58MpMZBblpq5LJu.js new file mode 100644 index 0000000..6f85774 --- /dev/null +++ b/reference_scripts/m58MpMZBblpq5LJu.js @@ -0,0 +1,2 @@ +args.prefillModifiers.slBonus++; +args.prefillModifiers.successBonus++; diff --git a/reference_scripts/m8qBlbH7ROoqa22o.js b/reference_scripts/m8qBlbH7ROoqa22o.js new file mode 100644 index 0000000..17577b3 --- /dev/null +++ b/reference_scripts/m8qBlbH7ROoqa22o.js @@ -0,0 +1 @@ +return args.options.reload \ No newline at end of file diff --git a/reference_scripts/mBcLf11upaHS8AQq.js b/reference_scripts/mBcLf11upaHS8AQq.js new file mode 100644 index 0000000..4234181 --- /dev/null +++ b/reference_scripts/mBcLf11upaHS8AQq.js @@ -0,0 +1 @@ +this.actor.status.addArmour(1, {source: this.effect}) \ No newline at end of file diff --git a/reference_scripts/mJ9eMPub4epJSf00.js b/reference_scripts/mJ9eMPub4epJSf00.js new file mode 100644 index 0000000..4144fbb --- /dev/null +++ b/reference_scripts/mJ9eMPub4epJSf00.js @@ -0,0 +1 @@ +return args.weapon?.system.qualities.value.find(i => i.name == "shield") && this.actor.attacker \ No newline at end of file diff --git a/reference_scripts/mPxmCsXYirAIT913.js b/reference_scripts/mPxmCsXYirAIT913.js new file mode 100644 index 0000000..84284a1 --- /dev/null +++ b/reference_scripts/mPxmCsXYirAIT913.js @@ -0,0 +1,3 @@ +let key = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.characteristics, this.effect.img), 1, "Choose Characteristic"); + +this.effect.updateSource({changes : [{key : `system.characteristics.${key[0].id}.modifier`, mode : 2, value : 10}]}) \ No newline at end of file diff --git a/reference_scripts/mRvLsSVxNyt8LVZb.js b/reference_scripts/mRvLsSVxNyt8LVZb.js new file mode 100644 index 0000000..f68402d --- /dev/null +++ b/reference_scripts/mRvLsSVxNyt8LVZb.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.GRRN3XAKIpEVCY7z") +let data = item.toObject(); +data.name += " (To Be Determined)" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/mTnmPcjWmvScIBWY.js b/reference_scripts/mTnmPcjWmvScIBWY.js new file mode 100644 index 0000000..14c7aaf --- /dev/null +++ b/reference_scripts/mTnmPcjWmvScIBWY.js @@ -0,0 +1 @@ +return args.skill?.name.includes("Channelling") || args.type == "channelling" \ No newline at end of file diff --git a/reference_scripts/mV4Tmc0yfpL09KV7.js b/reference_scripts/mV4Tmc0yfpL09KV7.js new file mode 100644 index 0000000..3b9f40b --- /dev/null +++ b/reference_scripts/mV4Tmc0yfpL09KV7.js @@ -0,0 +1 @@ +args.actor.addCondition("entangled") \ No newline at end of file diff --git a/reference_scripts/mYL4i1vNlMl4vFYy.js b/reference_scripts/mYL4i1vNlMl4vFYy.js new file mode 100644 index 0000000..a5211a8 --- /dev/null +++ b/reference_scripts/mYL4i1vNlMl4vFYy.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Perception") && args.skill?.name != game.i18n.localize("NAME.Track"); \ No newline at end of file diff --git a/reference_scripts/ma0sWhebqwdRHWvY.js b/reference_scripts/ma0sWhebqwdRHWvY.js new file mode 100644 index 0000000..c1779e5 --- /dev/null +++ b/reference_scripts/ma0sWhebqwdRHWvY.js @@ -0,0 +1,5 @@ +if (!args.flags.trained) +{ + args.flags.trained = true; + args.fields.modifier += 10; +} \ No newline at end of file diff --git a/reference_scripts/maKr58mvvyKxFyC3.js b/reference_scripts/maKr58mvvyKxFyC3.js new file mode 100644 index 0000000..f941ab6 --- /dev/null +++ b/reference_scripts/maKr58mvvyKxFyC3.js @@ -0,0 +1,2 @@ +if (args.item.type == "prayer" && (args.item.damage.value || args.item.damage.dice)) + args.item.damage.value += "+1" \ No newline at end of file diff --git a/reference_scripts/masOBNgSi5HYkf3m.js b/reference_scripts/masOBNgSi5HYkf3m.js new file mode 100644 index 0000000..ed60b79 --- /dev/null +++ b/reference_scripts/masOBNgSi5HYkf3m.js @@ -0,0 +1 @@ +return args.type != "cast" && args.type != "channelling" \ No newline at end of file diff --git a/reference_scripts/mgLGN1XPzPE4dReN.js b/reference_scripts/mgLGN1XPzPE4dReN.js new file mode 100644 index 0000000..0433903 --- /dev/null +++ b/reference_scripts/mgLGN1XPzPE4dReN.js @@ -0,0 +1 @@ +args.fields.slBonus--; \ No newline at end of file diff --git a/reference_scripts/mr8qm5Bg6k1idZ6Q.js b/reference_scripts/mr8qm5Bg6k1idZ6Q.js new file mode 100644 index 0000000..c28b926 --- /dev/null +++ b/reference_scripts/mr8qm5Bg6k1idZ6Q.js @@ -0,0 +1 @@ +return args.item?.name == "Play (Lute)" \ No newline at end of file diff --git a/reference_scripts/mziJBUYcsrhkdcCJ.js b/reference_scripts/mziJBUYcsrhkdcCJ.js new file mode 100644 index 0000000..0308dbf --- /dev/null +++ b/reference_scripts/mziJBUYcsrhkdcCJ.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {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/reference_scripts/n5RJqJL9fdRIxkuN.js b/reference_scripts/n5RJqJL9fdRIxkuN.js new file mode 100644 index 0000000..5fa0e06 --- /dev/null +++ b/reference_scripts/n5RJqJL9fdRIxkuN.js @@ -0,0 +1,12 @@ +if (this.actor.system.status.advantage.value > 0) +{ + await this.actor.modifyAdvantage(-1); + this.script.scriptNotification("Advantage Subtracted") +} +else +{ + return this.script.scriptNotification("Not enough Advantage!", "error") +} + +let test = await this.actor.setupTrait(this.item) +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/nCWAflBj7Si2BI1Q.js b/reference_scripts/nCWAflBj7Si2BI1Q.js new file mode 100644 index 0000000..af67a69 --- /dev/null +++ b/reference_scripts/nCWAflBj7Si2BI1Q.js @@ -0,0 +1,4 @@ +if (args.item.type == "spell" && args.item.system.lore.value != "petty") +{ + args.item.cn.value = Math.max(4, args.item.cn.value * 2) +} \ No newline at end of file diff --git a/reference_scripts/nD2QVg3DrPK3foMf.js b/reference_scripts/nD2QVg3DrPK3foMf.js new file mode 100644 index 0000000..0101c82 --- /dev/null +++ b/reference_scripts/nD2QVg3DrPK3foMf.js @@ -0,0 +1,7 @@ +args.actor.setupSkill("Dodge", { fields: { difficulty: "average" } }).then(async test => { + await test.roll(); + if (test.failed) { + await args.actor.addCondition("bleeding") + await args.actor.addCondition("entangled") + } + }) \ No newline at end of file diff --git a/reference_scripts/nEaF3jbCiVYD8jia.js b/reference_scripts/nEaF3jbCiVYD8jia.js new file mode 100644 index 0000000..c39fb2f --- /dev/null +++ b/reference_scripts/nEaF3jbCiVYD8jia.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Charm") && !args.skill?.name.includes(game.i18n.localize("NAME.Lore")); \ No newline at end of file diff --git a/reference_scripts/nGTxNWBUBgTr87wU.js b/reference_scripts/nGTxNWBUBgTr87wU.js new file mode 100644 index 0000000..c078cd8 --- /dev/null +++ b/reference_scripts/nGTxNWBUBgTr87wU.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == "attacker") +{ + this.script.scriptMessage(`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")}) +} + \ No newline at end of file diff --git a/reference_scripts/nHJdlqbOP0ECgywb.js b/reference_scripts/nHJdlqbOP0ECgywb.js new file mode 100644 index 0000000..6bf5cf6 --- /dev/null +++ b/reference_scripts/nHJdlqbOP0ECgywb.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.CnydL8p3PVAuF98w") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/nSXzktHyNjGUXjaw.js b/reference_scripts/nSXzktHyNjGUXjaw.js new file mode 100644 index 0000000..33216f3 --- /dev/null +++ b/reference_scripts/nSXzktHyNjGUXjaw.js @@ -0,0 +1 @@ +return args.item?.system.isRanged \ No newline at end of file diff --git a/reference_scripts/nYtAjSArsNbrU2ob.js b/reference_scripts/nYtAjSArsNbrU2ob.js new file mode 100644 index 0000000..f092926 --- /dev/null +++ b/reference_scripts/nYtAjSArsNbrU2ob.js @@ -0,0 +1,8 @@ +if (["ag", "i", "int"].includes(args.characteristic)) +{ + args.fields.modifier -= 10; +} +else if (["wp"].includes(args.characteristic)) +{ + args.fields.modifier += 10; +} \ No newline at end of file diff --git a/reference_scripts/naF5EWr1CBkYRZTK.js b/reference_scripts/naF5EWr1CBkYRZTK.js new file mode 100644 index 0000000..ecdafaa --- /dev/null +++ b/reference_scripts/naF5EWr1CBkYRZTK.js @@ -0,0 +1,26 @@ +if (args.opposedTest?.attackerTest?.item?.system?.isRanged) +{ + let choice = await Dialog.wait({ + title: this.effect.name, + content: `

Abort damage with ${this.effect.name}?`, + buttons: { + yes: { + label: "Yes", + callback: () => { + return true; + } + }, + no: { + label: "No", + callback: () => { + return false; + } + } + } + }) + + if (choice) + { + args.abort = `${this.effect.name}: Damage cancelled` + } +} \ No newline at end of file diff --git a/reference_scripts/ncIjDE6TFx88IQA1.js b/reference_scripts/ncIjDE6TFx88IQA1.js new file mode 100644 index 0000000..223a1a3 --- /dev/null +++ b/reference_scripts/ncIjDE6TFx88IQA1.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Climb") || args.skill?.name == game.i18n.localize("NAME.Athletics"); \ No newline at end of file diff --git a/reference_scripts/neaaVy6D6tfcst5P.js b/reference_scripts/neaaVy6D6tfcst5P.js new file mode 100644 index 0000000..123137f --- /dev/null +++ b/reference_scripts/neaaVy6D6tfcst5P.js @@ -0,0 +1 @@ +args.fields.slBonus += this.actor.characteristics.i.bonus; diff --git a/reference_scripts/ngMm7SgtVqVovFJG.js b/reference_scripts/ngMm7SgtVqVovFJG.js new file mode 100644 index 0000000..8d5af65 --- /dev/null +++ b/reference_scripts/ngMm7SgtVqVovFJG.js @@ -0,0 +1,4 @@ +if (args.test.result.critical && args.test.result.critical != "Total Power") +{ + args.test.result.other.push(` Bonecrusher Critical (+20) (only if Critical Cast selected)`) +} \ No newline at end of file diff --git a/reference_scripts/njPP9wDAsdh4WHIj.js b/reference_scripts/njPP9wDAsdh4WHIj.js new file mode 100644 index 0000000..be455e6 --- /dev/null +++ b/reference_scripts/njPP9wDAsdh4WHIj.js @@ -0,0 +1,4 @@ +if (args.totalWoundLoss > 0 && ["trait", "weapon"].includes(args.opposedTest.attackerTest.item?.type)) +{ + this.script.scriptMessage(`Infected: ${args.actor.name} must pass an Easy (+40) Endurance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/reference_scripts/nkbTnaeBpthyhw4J.js b/reference_scripts/nkbTnaeBpthyhw4J.js new file mode 100644 index 0000000..da73508 --- /dev/null +++ b/reference_scripts/nkbTnaeBpthyhw4J.js @@ -0,0 +1,6 @@ +let fortunePoints = this.effect.sourceTest.result.overcast.usage.other.current +let current = this.actor.status.fortune.value + +this.actor.update({"system.status.fortune.value" : fortunePoints + current}) + +this.script.scriptMessage(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${fortunePoints + current}`) \ No newline at end of file diff --git a/reference_scripts/nkdKBJ8ItqWiRAWL.js b/reference_scripts/nkdKBJ8ItqWiRAWL.js new file mode 100644 index 0000000..da8ed4c --- /dev/null +++ b/reference_scripts/nkdKBJ8ItqWiRAWL.js @@ -0,0 +1,21 @@ +// Apply changes when the mask is worn + +if (args.equipped) { + this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) + this.script.scriptMessage(`${this.actor.name} dons the ${this.item.name}.
+ They gain +50 to Swim Tests and can breathe underwater.
+ If they wear the mask for more than an hour or benefit from any of its effects, they are exposed to @Corruption[moderate]{Moderate Corruption}. + `, + {whisper: ChatMessage.getWhisperRecipients("GM")}) +} + +// Notify of lingering effects when mask is removed +else if (!args.equipped) +{ + await this.item.effects.contents[0].delete(); + await this.item.update({name : this.item.name += " (Used)"}) + this.script.scriptMessage(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`, + {whisper: ChatMessage.getWhisperRecipients("GM")} + ) + +} diff --git a/reference_scripts/nuIpPD4uaZRuJni8.js b/reference_scripts/nuIpPD4uaZRuJni8.js new file mode 100644 index 0000000..43c5bf3 --- /dev/null +++ b/reference_scripts/nuIpPD4uaZRuJni8.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.qdMbxW09FUoYBzmB") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/nvrFhHHVq3KzirlR.js b/reference_scripts/nvrFhHHVq3KzirlR.js new file mode 100644 index 0000000..ba0fdde --- /dev/null +++ b/reference_scripts/nvrFhHHVq3KzirlR.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Stealth")) diff --git a/reference_scripts/nxNqWmmF6mJTnrLo.js b/reference_scripts/nxNqWmmF6mJTnrLo.js new file mode 100644 index 0000000..142e606 --- /dev/null +++ b/reference_scripts/nxNqWmmF6mJTnrLo.js @@ -0,0 +1 @@ +return args.weapon?.system.usesHands.includes(this.item.system.location.key); \ No newline at end of file diff --git a/reference_scripts/nzh8d46l1ikhkz8Q.js b/reference_scripts/nzh8d46l1ikhkz8Q.js new file mode 100644 index 0000000..a11f1bf --- /dev/null +++ b/reference_scripts/nzh8d46l1ikhkz8Q.js @@ -0,0 +1 @@ +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") \ No newline at end of file diff --git a/reference_scripts/o1zD8mej9TWKNxUq.js b/reference_scripts/o1zD8mej9TWKNxUq.js new file mode 100644 index 0000000..9cc92e5 --- /dev/null +++ b/reference_scripts/o1zD8mej9TWKNxUq.js @@ -0,0 +1 @@ +args.fields.slBonus -= 1; \ No newline at end of file diff --git a/reference_scripts/o3JUBKLvE6bBxK2n.js b/reference_scripts/o3JUBKLvE6bBxK2n.js new file mode 100644 index 0000000..9ccae0a --- /dev/null +++ b/reference_scripts/o3JUBKLvE6bBxK2n.js @@ -0,0 +1,20 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { fields: { difficulty: "average" } }) +await test.roll(); +if (test.failed) +{ + await this.actor.addCondition("prone") + let injury = await fromUuid("Compendium.wfrp4e-core.items.ZhMADOqoo0y8Q9bx"); + injury = injury.toObject() + let toes = Math.clamped(Math.abs(test.result.SL) + 1, 1, 5) + injury.system.location.key = this.item.system.location.key[0] + injury.system.location.value + if (injury.system.location.key[0] == "r") + { + injury.system.location.value = `${toes} Right ${injury.system.location.value}s` + } + else if (injury.system.location.key[0] == "l") + { + injury.system.location.value = `${toes} Left ${injury.system.location.value}s` + } + setProperty(injury, "system.wfrp4e.count", toes) + this.actor.createEmbeddedDocuments("Item", [injury]) +} \ No newline at end of file diff --git a/reference_scripts/o88xuUConwt0vFLw.js b/reference_scripts/o88xuUConwt0vFLw.js new file mode 100644 index 0000000..ae9e06f --- /dev/null +++ b/reference_scripts/o88xuUConwt0vFLw.js @@ -0,0 +1,5 @@ +let points = this.effect.sourceTest.result.overcast.usage.other.current; + +this.actor.update({"system.status.fortune.value" : this.actor.system.status.fortune.value + points}); + +this.script.scriptMessage(`Gained ${points} Fortune Points`) \ No newline at end of file diff --git a/reference_scripts/oDNfCNyt5KaUYmg2.js b/reference_scripts/oDNfCNyt5KaUYmg2.js new file mode 100644 index 0000000..7efcdf8 --- /dev/null +++ b/reference_scripts/oDNfCNyt5KaUYmg2.js @@ -0,0 +1,10 @@ +if(args.opposedTest.result.winner == "defender") +{ + let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10) + let msg = `Rolled ${roll}.` + if (roll >= 7) + { + msg = `Attack hits with an SL of ${roll - 6}.` + } + this.script.scriptMessage(msg, {blind: true, whisper : ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/reference_scripts/oEsUsI74yGTZ9CwU.js b/reference_scripts/oEsUsI74yGTZ9CwU.js new file mode 100644 index 0000000..c57ed37 --- /dev/null +++ b/reference_scripts/oEsUsI74yGTZ9CwU.js @@ -0,0 +1 @@ +return args.item?.name == game.i18n.localize("NAME.CharmAnimal") \ No newline at end of file diff --git a/reference_scripts/oGdsGPgJWcyWkiWl.js b/reference_scripts/oGdsGPgJWcyWkiWl.js new file mode 100644 index 0000000..b6511a1 --- /dev/null +++ b/reference_scripts/oGdsGPgJWcyWkiWl.js @@ -0,0 +1,6 @@ +this.actor.addCondition("broken") + +if (this.actor.has(game.i18n.localize("NAME.Undead"))) +{ + this.script.scriptMessage(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true})) +} \ No newline at end of file diff --git a/reference_scripts/oHenUKtaS3jT5xQn.js b/reference_scripts/oHenUKtaS3jT5xQn.js new file mode 100644 index 0000000..c399b90 --- /dev/null +++ b/reference_scripts/oHenUKtaS3jT5xQn.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.4xF7M6ylIiGntekh") +item = item.toObject() +item.name = this.effect.name +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) diff --git a/reference_scripts/oPg4se8iQRD14kmB.js b/reference_scripts/oPg4se8iQRD14kmB.js new file mode 100644 index 0000000..a61008d --- /dev/null +++ b/reference_scripts/oPg4se8iQRD14kmB.js @@ -0,0 +1,27 @@ +let filters = [ + { + property : "type", + value : "weapon" + }, + { + property : "system.weaponGroup.value", + value : ["twohanded", "polearm"] + } +] + +let items = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 1, "Choose an appropriate Polearm or Two-Handed Weapon") +items = items.map(i => i.toObject()) + +items.forEach(i => equip(i)) + +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/oV81zgbZsuTFG6L2.js b/reference_scripts/oV81zgbZsuTFG6L2.js new file mode 100644 index 0000000..c49d598 --- /dev/null +++ b/reference_scripts/oV81zgbZsuTFG6L2.js @@ -0,0 +1,5 @@ +let caster = this.effect.sourceActor; + +this.actor.modifyWounds(caster.system.characteristics.fel.bonus); + +this.script.scriptMessage(`Healed ${caster.system.characteristics.fel.bonus} Wounds`); \ No newline at end of file diff --git a/reference_scripts/oW1gtYVT5nrxDjM7.js b/reference_scripts/oW1gtYVT5nrxDjM7.js new file mode 100644 index 0000000..0f97f92 --- /dev/null +++ b/reference_scripts/oW1gtYVT5nrxDjM7.js @@ -0,0 +1 @@ +return args.characteristic != "ag" \ No newline at end of file diff --git a/reference_scripts/oWM43EdUiyHgUlfW.js b/reference_scripts/oWM43EdUiyHgUlfW.js new file mode 100644 index 0000000..2c1af1d --- /dev/null +++ b/reference_scripts/oWM43EdUiyHgUlfW.js @@ -0,0 +1,2 @@ +if (args.test.item && args.test.item.name == game.i18n.localize("NAME.ConsumeAlcohol")) + args.test.preData.canReverse = true \ No newline at end of file diff --git a/reference_scripts/oWa7RkScnl6lR5vd.js b/reference_scripts/oWa7RkScnl6lR5vd.js new file mode 100644 index 0000000..cba5818 --- /dev/null +++ b/reference_scripts/oWa7RkScnl6lR5vd.js @@ -0,0 +1,11 @@ +if (args.test.characteristicKey == "wp") +{ + if (args.test.failed) + { + let item = await fromUuid("Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP") + let data = item.toObject(); + this.actor.createEmbeddedDocuments("Item", [data]) + + this.script.scriptMessage(`Willpower Test failed, ${this.actor.prototypeToken.name} gains @UUID[Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP] for [[1d10]] hours`) + } +} \ No newline at end of file diff --git a/reference_scripts/obIXhQXKFyyQoNNV.js b/reference_scripts/obIXhQXKFyyQoNNV.js new file mode 100644 index 0000000..2df4ad3 --- /dev/null +++ b/reference_scripts/obIXhQXKFyyQoNNV.js @@ -0,0 +1,7 @@ +this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {appendTitle: ` - ${this.effect.name}`, fields: { difficulty: "average" } }).then(async test => { + await test.roll() + if (test.failed) { + this.actor.modifyWounds(-1); + this.script.scriptMessage("Takes 1 Damage") + } +}) \ No newline at end of file diff --git a/reference_scripts/ocBW3osTFnb5JCfe.js b/reference_scripts/ocBW3osTFnb5JCfe.js new file mode 100644 index 0000000..59d46c5 --- /dev/null +++ b/reference_scripts/ocBW3osTFnb5JCfe.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF") +let data = item.toObject() +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) diff --git a/reference_scripts/ofddAHvzn1xUueSG.js b/reference_scripts/ofddAHvzn1xUueSG.js new file mode 100644 index 0000000..1b43518 --- /dev/null +++ b/reference_scripts/ofddAHvzn1xUueSG.js @@ -0,0 +1,15 @@ +args.AP.head.value -= tinDifference(args.AP.head.layers) +args.AP.body.value -= tinDifference(args.AP.body.layers) +args.AP.lArm.value -= tinDifference(args.AP.lArm.layers) +args.AP.rArm.value -= tinDifference(args.AP.rArm.layers) +args.AP.rLeg.value -= tinDifference(args.AP.rLeg.layers) +args.AP.lLeg.value -= tinDifference(args.AP.lLeg.layers) + +function tinDifference(layers) +{ + let metalAP = layers.filter(i => i.metal).reduce((prev, current) => prev + current.value, 0) + + let tinAP = layers.filter(i => i.metal).reduce((prev, current) => prev + Math.max(0, current.value - 2), 0) + + return metalAP - tinAP; +} \ No newline at end of file diff --git a/reference_scripts/ogJBAXTXyhTqACPO.js b/reference_scripts/ogJBAXTXyhTqACPO.js new file mode 100644 index 0000000..2b4b34e --- /dev/null +++ b/reference_scripts/ogJBAXTXyhTqACPO.js @@ -0,0 +1 @@ +return args.item?.system.attackType != "melee" \ No newline at end of file diff --git a/reference_scripts/ohl803m0tUwNfKAk.js b/reference_scripts/ohl803m0tUwNfKAk.js new file mode 100644 index 0000000..c503b57 --- /dev/null +++ b/reference_scripts/ohl803m0tUwNfKAk.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") +let data = item.toObject(); +data.system.specification.value = 5 - this.actor.characteristics.s.bonus +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/okW06V9UiPC4Vcrn.js b/reference_scripts/okW06V9UiPC4Vcrn.js new file mode 100644 index 0000000..f8d4264 --- /dev/null +++ b/reference_scripts/okW06V9UiPC4Vcrn.js @@ -0,0 +1,86 @@ +let characteristics = { + "ws" : 5, + "bs" : 0, + "s" : 5, + "t" : 5, + "i" : 10, + "ag" : 0, + "dex" : 0, + "int" : 0, + "wp" : 5, + "fel" : 5 +} +let skills = ["Cool", "Dodge"] +let skillAdvancements = [10, 10] +let talents = ["Combat Reflexes", "Resolute"] +let trappings = ["Leather Jack", "Leather Leggings", "Leather Skullcap", "Hand Weapon", "Spear", "Shield"] +let items = []; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } +} + +updateObj.name = updateObj.name += " " + this.effect.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/okr3TtzpFoefUuJS.js b/reference_scripts/okr3TtzpFoefUuJS.js new file mode 100644 index 0000000..ef551e2 --- /dev/null +++ b/reference_scripts/okr3TtzpFoefUuJS.js @@ -0,0 +1,4 @@ +let item = await fromUuid('Compendium.wfrp4e-core.items.EaqlLRQigwnsEAXX') +let data = item.toObject(); +data.system.location.value = "Collar Bone" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/oqgd9G6oI1ncPYLw.js b/reference_scripts/oqgd9G6oI1ncPYLw.js new file mode 100644 index 0000000..067d1ec --- /dev/null +++ b/reference_scripts/oqgd9G6oI1ncPYLw.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.CV9btQn09S9Fn8Jk"); +this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/p222EiR8RRtlPm31.js b/reference_scripts/p222EiR8RRtlPm31.js new file mode 100644 index 0000000..f757919 --- /dev/null +++ b/reference_scripts/p222EiR8RRtlPm31.js @@ -0,0 +1,3 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) +await test.roll(); +return test.failed; \ No newline at end of file diff --git a/reference_scripts/pAgiAGyaLJY10894.js b/reference_scripts/pAgiAGyaLJY10894.js new file mode 100644 index 0000000..13da9da --- /dev/null +++ b/reference_scripts/pAgiAGyaLJY10894.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Charm"); \ No newline at end of file diff --git a/reference_scripts/pBMioPUtDn1mk9f5.js b/reference_scripts/pBMioPUtDn1mk9f5.js new file mode 100644 index 0000000..a13d279 --- /dev/null +++ b/reference_scripts/pBMioPUtDn1mk9f5.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.5KP9sOoLSGvj9EXp") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/pG5OVokZzCRHIrwz.js b/reference_scripts/pG5OVokZzCRHIrwz.js new file mode 100644 index 0000000..cf36c5e --- /dev/null +++ b/reference_scripts/pG5OVokZzCRHIrwz.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.mgeiaDZXei7JBEgo") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/pHyXdPnWwoFrUA5n.js b/reference_scripts/pHyXdPnWwoFrUA5n.js new file mode 100644 index 0000000..954e03e --- /dev/null +++ b/reference_scripts/pHyXdPnWwoFrUA5n.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Entertain")); \ No newline at end of file diff --git a/reference_scripts/pLKv4moua6XhNdmA.js b/reference_scripts/pLKv4moua6XhNdmA.js new file mode 100644 index 0000000..edd666b --- /dev/null +++ b/reference_scripts/pLKv4moua6XhNdmA.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.1dUizIgLBgn4jICC"); +let data = item.toObject(); +data.name += " (Woodlands)"; +this.actor.createEmbeddedDocuments("Item", Array(this.effect.sourceTest.result.overcast.usage.other.current).fill(data), {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/pNPjXEoQGHLKzq0r.js b/reference_scripts/pNPjXEoQGHLKzq0r.js new file mode 100644 index 0000000..26641f9 --- /dev/null +++ b/reference_scripts/pNPjXEoQGHLKzq0r.js @@ -0,0 +1,12 @@ +let talent = this.actor.has("Arcane Magic (Light)", "talent") +let demon = this.actor.has(game.i18n.localize("NAME.Daemonic")) + +if (!talent) +{ + await this.actor.addCondition("blinded") +} + +if (demon) +{ + await this.actor.addCondition("stunned") +} \ No newline at end of file diff --git a/reference_scripts/pPV9oEydXb7oi6jX.js b/reference_scripts/pPV9oEydXb7oi6jX.js new file mode 100644 index 0000000..fe3715e --- /dev/null +++ b/reference_scripts/pPV9oEydXb7oi6jX.js @@ -0,0 +1,4 @@ + if (args.totalWoundLoss > 0) + { + args.actor.addCondition('ablaze') + } \ No newline at end of file diff --git a/reference_scripts/pR4Q2OnPxXtwRVli.js b/reference_scripts/pR4Q2OnPxXtwRVli.js new file mode 100644 index 0000000..31251d6 --- /dev/null +++ b/reference_scripts/pR4Q2OnPxXtwRVli.js @@ -0,0 +1,12 @@ +let criticals = this.actor.itemTypes.critical; + +if (criticals.length) +{ + this.script.scriptNotification("Cannot suffer Critical Wounds"); + this.actor.deleteEmbeddedDocuments("Item", criticals.map(i => i.id)) +} + +if (getProperty(args.data, "system.status.wounds.value") == 0) +{ + this.script.scriptNotification(`Dormant for ${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds`) +} \ No newline at end of file diff --git a/reference_scripts/pnB9TzSEytkxk3Rb.js b/reference_scripts/pnB9TzSEytkxk3Rb.js new file mode 100644 index 0000000..33f3dcc --- /dev/null +++ b/reference_scripts/pnB9TzSEytkxk3Rb.js @@ -0,0 +1 @@ +return this.actor.hasSystemEffect("infighting") \ No newline at end of file diff --git a/reference_scripts/pq1YQffxtOcqCRTn.js b/reference_scripts/pq1YQffxtOcqCRTn.js new file mode 100644 index 0000000..b6f09a8 --- /dev/null +++ b/reference_scripts/pq1YQffxtOcqCRTn.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {appendTitle: ` - ${this.effect.name}`}) +await test.roll(); +if (!test.succeeded) +{ + this.actor.addCondition("prone") +} \ No newline at end of file diff --git a/reference_scripts/px7eEdhOEt7zOTrq.js b/reference_scripts/px7eEdhOEt7zOTrq.js new file mode 100644 index 0000000..0e4b4f9 --- /dev/null +++ b/reference_scripts/px7eEdhOEt7zOTrq.js @@ -0,0 +1 @@ +return ["int", "t", "wp", "i"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/pzimrxrqpv282Oqb.js b/reference_scripts/pzimrxrqpv282Oqb.js new file mode 100644 index 0000000..6c30f0d --- /dev/null +++ b/reference_scripts/pzimrxrqpv282Oqb.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.TaYriYcJkFuIdBKp") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}); diff --git a/reference_scripts/pzknBcJtZWeliE27.js b/reference_scripts/pzknBcJtZWeliE27.js new file mode 100644 index 0000000..1fcf80e --- /dev/null +++ b/reference_scripts/pzknBcJtZWeliE27.js @@ -0,0 +1 @@ +return args.item?.name == game.i18n.localize("NAME.Leadership") || args.item?.name == game.i18n.localize("NAME.Cool") \ No newline at end of file diff --git a/reference_scripts/q0LvphC8RDSyR0oY.js b/reference_scripts/q0LvphC8RDSyR0oY.js new file mode 100644 index 0000000..3e6ac9e --- /dev/null +++ b/reference_scripts/q0LvphC8RDSyR0oY.js @@ -0,0 +1,8 @@ +let choice = await ItemDialog.create(ItemDialog.objectToArray({ + ws : game.wfrp4e.config.characteristics.ws, + t : game.wfrp4e.config.characteristics.t, + ag : game.wfrp4e.config.characteristics.ag, + wp : game.wfrp4e.config.characteristics.wp +}, this.effect.img), 1, "Choose Characteristic"); + +this.effect.updateSource({"flags.wfrp4e.characteristic" : choice[0].id}) \ No newline at end of file diff --git a/reference_scripts/q3nRyXaxksdCiLFM.js b/reference_scripts/q3nRyXaxksdCiLFM.js new file mode 100644 index 0000000..49cee4f --- /dev/null +++ b/reference_scripts/q3nRyXaxksdCiLFM.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.j6v78dnOOdCB6c3d") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/qAEZgtu5CrfUkxhx.js b/reference_scripts/qAEZgtu5CrfUkxhx.js new file mode 100644 index 0000000..c5c12b1 --- /dev/null +++ b/reference_scripts/qAEZgtu5CrfUkxhx.js @@ -0,0 +1,16 @@ +if (args.test.options.staunchBleeding) +{ + if (args.test.succeeded) + { + let staunch = Number(args.test.result.SL) + 1 + if (args.test.options.fieldDressing && args.test.result.reversed) + { + staunch = Math.min(1, Number(args.test.result.SL)) + 1 + } + args.test.result.other.push(`${this.actor.name} removed ${staunch} Bleeding conditions from the patient.`) + } + else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0) + { + args.test.result.other.push(`The patient contracts a @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Minor Infection}.`) + } +} \ No newline at end of file diff --git a/reference_scripts/qK4q4o6cQhcGzFX3.js b/reference_scripts/qK4q4o6cQhcGzFX3.js new file mode 100644 index 0000000..e7c6e3b --- /dev/null +++ b/reference_scripts/qK4q4o6cQhcGzFX3.js @@ -0,0 +1,7 @@ +let fear = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn") +let leader = await fromUuid("Compendium.wfrp4e-core.items.Item.vCgEAetBMngR53aT") +let fearData = fear.toObject(); +let leaderData = leader.toObject(); +fearData.system.specification.value = this.effect.sourceTest.result.overcast.usage.other.current; +talents = new Array(1 + this.effect.sourceTest.result.overcast.available).fill(leaderData); // Assume any unused overcast is for war leader +this.actor.createEmbeddedDocuments("Item", [fearData].concat(talents), {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/qSwCYMMiIHmSV1X5.js b/reference_scripts/qSwCYMMiIHmSV1X5.js new file mode 100644 index 0000000..1379278 --- /dev/null +++ b/reference_scripts/qSwCYMMiIHmSV1X5.js @@ -0,0 +1,13 @@ +if (this.item.system.quantity.value) +{ + this.item.system.reduceQuantity(); + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + let effectData = this.item.effects.contents[0].convertToApplied(); + effectData.flags.wfrp4e.sourceItem = this.item.uuid + effectData.duration.seconds = 10800 + actor.applyEffect({effectData : [effectData]}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/qT0WBPxLMMO9gvCd.js b/reference_scripts/qT0WBPxLMMO9gvCd.js new file mode 100644 index 0000000..fd89c3b --- /dev/null +++ b/reference_scripts/qT0WBPxLMMO9gvCd.js @@ -0,0 +1,4 @@ +if (!this.actor.has("Night Vision") && !this.actor.has("Night Vision", "talent") && !this.actor.hasCondition("blinded")) +{ + this.actor.addCondition("blinded", 1, {"flags.wfrp4e.nightshroud" : true}) +} \ No newline at end of file diff --git a/reference_scripts/qUwnVlWpsmDom3RK.js b/reference_scripts/qUwnVlWpsmDom3RK.js new file mode 100644 index 0000000..e82109e --- /dev/null +++ b/reference_scripts/qUwnVlWpsmDom3RK.js @@ -0,0 +1 @@ +args.fields.modifier -= 5; \ No newline at end of file diff --git a/reference_scripts/qZschZU0nee0kJlk.js b/reference_scripts/qZschZU0nee0kJlk.js new file mode 100644 index 0000000..0064f3f --- /dev/null +++ b/reference_scripts/qZschZU0nee0kJlk.js @@ -0,0 +1 @@ +args.fields.modifier -= 30; \ No newline at end of file diff --git a/reference_scripts/qaVde0sTuMBRi2nl.js b/reference_scripts/qaVde0sTuMBRi2nl.js new file mode 100644 index 0000000..2bd32fd --- /dev/null +++ b/reference_scripts/qaVde0sTuMBRi2nl.js @@ -0,0 +1 @@ +return ["NAME.Evaluate", "NAME.Gamble"].map(i => game.i18n.localize(i)).includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/qcyl98GYD55BkJsD.js b/reference_scripts/qcyl98GYD55BkJsD.js new file mode 100644 index 0000000..510b62f --- /dev/null +++ b/reference_scripts/qcyl98GYD55BkJsD.js @@ -0,0 +1,2 @@ +this.actor.status.encumbrance.state = 0; +this.actor.status.encumbrance.pct = 0; \ No newline at end of file diff --git a/reference_scripts/qijgjcOBCDmhglRX.js b/reference_scripts/qijgjcOBCDmhglRX.js new file mode 100644 index 0000000..49dfaeb --- /dev/null +++ b/reference_scripts/qijgjcOBCDmhglRX.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.SleightOfHand"); \ No newline at end of file diff --git a/reference_scripts/qjli5evn8UA9uTeZ.js b/reference_scripts/qjli5evn8UA9uTeZ.js new file mode 100644 index 0000000..4f6fabe --- /dev/null +++ b/reference_scripts/qjli5evn8UA9uTeZ.js @@ -0,0 +1 @@ +return args.actor.uuid == this.effect.sourceActor.uuid; \ No newline at end of file diff --git a/reference_scripts/qmOt7h17hGAKqQe0.js b/reference_scripts/qmOt7h17hGAKqQe0.js new file mode 100644 index 0000000..cd2dd07 --- /dev/null +++ b/reference_scripts/qmOt7h17hGAKqQe0.js @@ -0,0 +1,24 @@ + +let choice = await Dialog.wait({ + title: this.effect.name, + content: `

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

`, + buttons: { + yes: { + label: "Yes", + callback: () => { + return true; + } + }, + no: { + label: "No", + callback: () => { + return false; + } + } + } +}) + +if (choice) +{ + args.ward = 6; +} \ No newline at end of file diff --git a/reference_scripts/qu194dVXm9Vx1TGk.js b/reference_scripts/qu194dVXm9Vx1TGk.js new file mode 100644 index 0000000..c99393f --- /dev/null +++ b/reference_scripts/qu194dVXm9Vx1TGk.js @@ -0,0 +1,10 @@ +if (args.test.options.useOnesSupportive && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) +{ + +let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) +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.result.other.push(`${this.effect.name}: Used unit dice as SL`) +} \ No newline at end of file diff --git a/reference_scripts/quPcuKsq2fcild4a.js b/reference_scripts/quPcuKsq2fcild4a.js new file mode 100644 index 0000000..3ebda0b --- /dev/null +++ b/reference_scripts/quPcuKsq2fcild4a.js @@ -0,0 +1,6 @@ +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!`} }) +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("prone") +} \ No newline at end of file diff --git a/reference_scripts/qxzhPtysAjPWspKf.js b/reference_scripts/qxzhPtysAjPWspKf.js new file mode 100644 index 0000000..934561e --- /dev/null +++ b/reference_scripts/qxzhPtysAjPWspKf.js @@ -0,0 +1,4 @@ +if (this.actor.has("Undead") || this.actor.has("Daemonic")) +{ + this.script.scriptNotification(`Cannot enter ${this.effect.name}!`); +} \ No newline at end of file diff --git a/reference_scripts/r6hi5vMdLhTaaPfb.js b/reference_scripts/r6hi5vMdLhTaaPfb.js new file mode 100644 index 0000000..c37780d --- /dev/null +++ b/reference_scripts/r6hi5vMdLhTaaPfb.js @@ -0,0 +1 @@ +args.actor.details.move.value += this.effect.sourceTest.result.overcast.usage.other.current \ No newline at end of file diff --git a/reference_scripts/rCh3ltUrUMovd2Kc.js b/reference_scripts/rCh3ltUrUMovd2Kc.js new file mode 100644 index 0000000..4b1b1b1 --- /dev/null +++ b/reference_scripts/rCh3ltUrUMovd2Kc.js @@ -0,0 +1,5 @@ +if (this.actor.hasCondition("surprised")) +{ + this.script.scriptNotification("Cannot be surprised"); + this.actor.removeCondition("surprised"); +} \ No newline at end of file diff --git a/reference_scripts/rF0Z3hTUUnSxL3Mq.js b/reference_scripts/rF0Z3hTUUnSxL3Mq.js new file mode 100644 index 0000000..93d9ab0 --- /dev/null +++ b/reference_scripts/rF0Z3hTUUnSxL3Mq.js @@ -0,0 +1,37 @@ +let armour = (await fromUuid("Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj")).toObject() +let bite = (await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv")).toObject() +let fear = (await fromUuid("Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn")).toObject() +let nightVision = (await fromUuid("Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm")).toObject() +let tracker = (await fromUuid("Compendium.wfrp4e-core.items.ClOlztW6hH8rslbp")).toObject() +let weapon = (await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM")).toObject() + +armour.name = "Armour (Hide)" +armour.system.specification.value = 2 +bite.system.specification.value = 3 +fear.system.specification.value = 2 +weapon.system.specification.value = 4 +let items = [armour, bite, fear, nightVision, tracker, weapon] + + +let belligerent = (await fromUuid("Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj")).toObject()//{Belligerent} +let bestial = (await fromUuid("Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP")).toObject()//{Bestial} +let big = (await fromUuid("Compendium.wfrp4e-core.items.a8MC97PLzl10WocT")).toObject()//{Big} +let blessed = (await fromUuid("Compendium.wfrp4e-core.items.5muSFXd6oc760uVj")).toObject()//{Blessed (Ulric)} +let champion = (await fromUuid("Compendium.wfrp4e-core.items.4mF5Sp3t09kZhBYc")).toObject()//{Champion} +let die = (await fromUuid("Compendium.wfrp4e-core.items.UsJ2uIOOtHA7JqD5")).toObject()//{Die Hard} +let fast = (await fromUuid("Compendium.wfrp4e-core.items.9MjH4xyVrd3Inzak")).toObject()//{Fast} +let frenzy = (await fromUuid("Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q")).toObject()//{Frenzy} +let immunity = (await fromUuid("Compendium.wfrp4e-core.items.IAWyzDfC286a9MPz")).toObject()//{Immunity to Psychology} +let regenerate = (await fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR")).toObject()//{Regenerate} +let size = (await fromUuid("Compendium.wfrp4e-core.items.8slW8CJ2oVTxeQ6q")).toObject()//{Size (Large)} + +blessed.system.specification.value = "Ulric" +size.system.specification.value = "Large" + +let optional = [belligerent, bestial, big, blessed, champion, die, fast, frenzy, immunity, regenerate, size]; + +let chosen = await ItemDialog.create(optional, "unlimited", "Choose Optional Traits"); + +items = items.concat(chosen || []) +this.script.scriptNotification(`Adding ${items.map(i => i.name).join(", ")}`); +this.actor.createEmbeddedDocuments("Item", items, {fromEffect : this.effect.id}) diff --git a/reference_scripts/rIISfbCShejmJNKw.js b/reference_scripts/rIISfbCShejmJNKw.js new file mode 100644 index 0000000..d2d5e54 --- /dev/null +++ b/reference_scripts/rIISfbCShejmJNKw.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.oRx92ByVNEBN6YkK") +let data = item.toObject() +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) diff --git a/reference_scripts/rLMaVNEGdZ6xj5Au.js b/reference_scripts/rLMaVNEGdZ6xj5Au.js new file mode 100644 index 0000000..bf2dfbe --- /dev/null +++ b/reference_scripts/rLMaVNEGdZ6xj5Au.js @@ -0,0 +1 @@ +return !["i", "int", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/rRfff55c7elyvbCb.js b/reference_scripts/rRfff55c7elyvbCb.js new file mode 100644 index 0000000..9756192 --- /dev/null +++ b/reference_scripts/rRfff55c7elyvbCb.js @@ -0,0 +1 @@ +return this.actor.flags.useless[this.item.system.location.key] && args.weapon?.system.usesHands.includes(this.item.system.location.key[0] + "Arm") \ No newline at end of file diff --git a/reference_scripts/rUGSx06BuBvX9kgf.js b/reference_scripts/rUGSx06BuBvX9kgf.js new file mode 100644 index 0000000..8c3a76f --- /dev/null +++ b/reference_scripts/rUGSx06BuBvX9kgf.js @@ -0,0 +1,9 @@ +if (args.test.result.charging) +{ + args.test.result.damage += 1 + args.test.result.additionalDamage += 1 + if (!args.test.result.resolute) { + args.test.result.breakdown.damage.other.push({label : this.effect.name, value : this.item.Advances}); + args.test.result.resolute = true // Prevent duplicate messages + } +} diff --git a/reference_scripts/rVpPNILEzWL9lj6b.js b/reference_scripts/rVpPNILEzWL9lj6b.js new file mode 100644 index 0000000..6007696 --- /dev/null +++ b/reference_scripts/rVpPNILEzWL9lj6b.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.kJNAY1YRaCy9IgmT") +let terrorTraitItem = item.toObject() +terrorTraitItem.system.specification.value = Number(this.effect.item.system.specification.value) +this.actor.createEmbeddedDocuments("Item", [terrorTraitItem]); \ No newline at end of file diff --git a/reference_scripts/rXMylpnEtZpwou6x.js b/reference_scripts/rXMylpnEtZpwou6x.js new file mode 100644 index 0000000..d0c2d7f --- /dev/null +++ b/reference_scripts/rXMylpnEtZpwou6x.js @@ -0,0 +1,8 @@ +this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : "average"}}).then(async test => +{ + await test.roll() + if (test.failed) + { + this.actor.addCondition("fatigued") + } +}) \ No newline at end of file diff --git a/reference_scripts/ramav4ymrDDkPKK4.js b/reference_scripts/ramav4ymrDDkPKK4.js new file mode 100644 index 0000000..639558d --- /dev/null +++ b/reference_scripts/ramav4ymrDDkPKK4.js @@ -0,0 +1,9 @@ +if (this.actor.hasCondition("bleeding")) +{ + this.actor.removeCondition("bleeding"); + this.script.scriptNotification("Removed 1 Bleeding Condition") +} +else +{ + this.script.scriptNotification("No Bleeding Conditions"); +} \ No newline at end of file diff --git a/reference_scripts/ratP9ByLjQPiLlFK.js b/reference_scripts/ratP9ByLjQPiLlFK.js new file mode 100644 index 0000000..5e33cd1 --- /dev/null +++ b/reference_scripts/ratP9ByLjQPiLlFK.js @@ -0,0 +1 @@ +args.data.canReverse = true \ No newline at end of file diff --git a/reference_scripts/rdaMhMyHrJjQ6vVC.js b/reference_scripts/rdaMhMyHrJjQ6vVC.js new file mode 100644 index 0000000..f5d1678 --- /dev/null +++ b/reference_scripts/rdaMhMyHrJjQ6vVC.js @@ -0,0 +1 @@ +game.wfrp4e.utility.postFear(this.item.Advances, this.actor.name) \ No newline at end of file diff --git a/reference_scripts/re1UFtxvRRjpPB7Z.js b/reference_scripts/re1UFtxvRRjpPB7Z.js new file mode 100644 index 0000000..332391e --- /dev/null +++ b/reference_scripts/re1UFtxvRRjpPB7Z.js @@ -0,0 +1,13 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.nF5z1OEhpi4t6a6S"); +let data = item.toObject(); +data.system.location.key = this.item.system.location.key +if (data.system.location.key[0] == "r") +{ + data.system.location.value = "Right Ankle" +} +else if (data.system.location.key[0] == "l") +{ + data.system.location.value = "Left Ankle" +} + +this.actor.createEmbeddedDocuments("Item", [data], {skipLocationValue : true, fromEffect: this.effect.id}) diff --git a/reference_scripts/red2bt4PGgIWAdTR.js b/reference_scripts/red2bt4PGgIWAdTR.js new file mode 100644 index 0000000..c4ba998 --- /dev/null +++ b/reference_scripts/red2bt4PGgIWAdTR.js @@ -0,0 +1,14 @@ +if (this.item.system.quantity.value) +{ + this.item.system.reduceQuantity(); + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + let effectData = this.item.effects.contents[0].convertToApplied(); + let minutes = Math.ceil(CONFIG.Dice.randomUniform() * 10) * 10; + effectData.duration.seconds = 60 * minutes + this.script.scriptMessage(`Duration: ${minutes} minutes`, {whisper : ChatMessage.getWhisperRecipients("GM")}) + actor.applyEffect({effectData : [effectData]}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/rgSwSeB3shIMVMb6.js b/reference_scripts/rgSwSeB3shIMVMb6.js new file mode 100644 index 0000000..2532014 --- /dev/null +++ b/reference_scripts/rgSwSeB3shIMVMb6.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.x0WMGwuQzReXcQrs") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}); \ No newline at end of file diff --git a/reference_scripts/rnioLwiJP7ps5Jwy.js b/reference_scripts/rnioLwiJP7ps5Jwy.js new file mode 100644 index 0000000..7163d7f --- /dev/null +++ b/reference_scripts/rnioLwiJP7ps5Jwy.js @@ -0,0 +1,4 @@ +if (args.item.type == "skill" && args.item.name == "Melee (Basic)") +{ + args.item.system.modifier.value += 30; +} \ No newline at end of file diff --git a/reference_scripts/roKvPHDSpX4IV11C.js b/reference_scripts/roKvPHDSpX4IV11C.js new file mode 100644 index 0000000..2210782 --- /dev/null +++ b/reference_scripts/roKvPHDSpX4IV11C.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Perform")) && args.characteristic != "ag" \ No newline at end of file diff --git a/reference_scripts/rpxQU26BU7nwjtqY.js b/reference_scripts/rpxQU26BU7nwjtqY.js new file mode 100644 index 0000000..85e811c --- /dev/null +++ b/reference_scripts/rpxQU26BU7nwjtqY.js @@ -0,0 +1,20 @@ +let location = this.item.system.location.key +let test = await this.actor.setupCharacteristic("dex", {context : {failure : `${this.effect.name}: Drop the item!`}, skipTargets: true, appendTitle : " - " + this.effect.name, fields : {difficulty : "average"}}) +await test.roll(); + + +if (location && test.failed) +{ + let dropped = this.item.system.weaponsAtLocation; + + if (dropped.length) + { + this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + for(let weapon of dropped) + { + await weapon.system.toggleEquip(); + } + } +} + +return test.succeeded \ No newline at end of file diff --git a/reference_scripts/rr4htuVq45onXdRG.js b/reference_scripts/rr4htuVq45onXdRG.js new file mode 100644 index 0000000..e494852 --- /dev/null +++ b/reference_scripts/rr4htuVq45onXdRG.js @@ -0,0 +1,2 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {appendTitle: ` - ${this.effect.name}`, fields : {difficulty : "average"}}) +test.roll(); \ No newline at end of file diff --git a/reference_scripts/rxB1AqfVMDqTRieE.js b/reference_scripts/rxB1AqfVMDqTRieE.js new file mode 100644 index 0000000..132e672 --- /dev/null +++ b/reference_scripts/rxB1AqfVMDqTRieE.js @@ -0,0 +1 @@ +return !["ws", "bs", "ag"].includes(args.characteristic) && args.skill?.name != game.i18n.localize("NAME.Perception") \ No newline at end of file diff --git a/reference_scripts/s0kTuDE0qv68V2KI.js b/reference_scripts/s0kTuDE0qv68V2KI.js new file mode 100644 index 0000000..3f54ebc --- /dev/null +++ b/reference_scripts/s0kTuDE0qv68V2KI.js @@ -0,0 +1 @@ + this.actor.getActiveTokens().forEach(t => t.document.update({texture : {tint : "#FFBF00"}})); diff --git a/reference_scripts/s5bO0Sf0qpS27Tve.js b/reference_scripts/s5bO0Sf0qpS27Tve.js new file mode 100644 index 0000000..81a8160 --- /dev/null +++ b/reference_scripts/s5bO0Sf0qpS27Tve.js @@ -0,0 +1,2 @@ +await args.actor.addCondition("ablaze", 3) +await args.actor.addCondition("prone"); \ No newline at end of file diff --git a/reference_scripts/s6eZXfZkC1My6EXl.js b/reference_scripts/s6eZXfZkC1My6EXl.js new file mode 100644 index 0000000..79d1abc --- /dev/null +++ b/reference_scripts/s6eZXfZkC1My6EXl.js @@ -0,0 +1,5 @@ +let lore = this.effect.name.split(" ")[2].toLowerCase(); +if (args.item.type == "spell" && args.item.system.lore.value == lore) +{ + args.item.system.cn.value -= 1 +} diff --git a/reference_scripts/s7gJQdzuM3fz2zQK.js b/reference_scripts/s7gJQdzuM3fz2zQK.js new file mode 100644 index 0000000..86e431a --- /dev/null +++ b/reference_scripts/s7gJQdzuM3fz2zQK.js @@ -0,0 +1,11 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.QluSTTTq3viHJJUh") +let data = item.toObject(); +data.system.location.value = "Hip" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {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/reference_scripts/s8idWt9YdMTRfnjV.js b/reference_scripts/s8idWt9YdMTRfnjV.js new file mode 100644 index 0000000..ffe18b2 --- /dev/null +++ b/reference_scripts/s8idWt9YdMTRfnjV.js @@ -0,0 +1,5 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW") +let data = item.toObject(); +data.system.specification.value = 4 - this.actor.characteristics.s.bonus +data.name = item.name.replace("(Feature)", ""); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/s8xU6OOZbbfo6VIw.js b/reference_scripts/s8xU6OOZbbfo6VIw.js new file mode 100644 index 0000000..4574772 --- /dev/null +++ b/reference_scripts/s8xU6OOZbbfo6VIw.js @@ -0,0 +1 @@ +args.fields.slBonus += this.actor.system.characteristics.ag.bonus diff --git a/reference_scripts/s94yKZ4o5XN4JWM1.js b/reference_scripts/s94yKZ4o5XN4JWM1.js new file mode 100644 index 0000000..28925d7 --- /dev/null +++ b/reference_scripts/s94yKZ4o5XN4JWM1.js @@ -0,0 +1,6 @@ +// Any attack with such ammunition which inflicts at least one Wound, +// also inflicts one Bleeding Condition. + +if (args.totalWoundLoss > 0) { + args.actor.addCondition("bleeding") +} diff --git a/reference_scripts/sAVpm7hFRHpbCLXm.js b/reference_scripts/sAVpm7hFRHpbCLXm.js new file mode 100644 index 0000000..88f9ad9 --- /dev/null +++ b/reference_scripts/sAVpm7hFRHpbCLXm.js @@ -0,0 +1 @@ +return ["ws", "bs", "s", "t", "ag", "i"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/sB4KB9bT3nQhAoqG.js b/reference_scripts/sB4KB9bT3nQhAoqG.js new file mode 100644 index 0000000..4401b71 --- /dev/null +++ b/reference_scripts/sB4KB9bT3nQhAoqG.js @@ -0,0 +1,14 @@ +// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor + +let mainEffect = this.item.effects.contents[0]; +if (mainEffect.name.includes("")) +{ + let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choose Lore"); + if (choice.length) + { + mainEffect.update({name : mainEffect.name.replace("", choice[0].name)}) + this.item.update({name : this.item.name += ` (${choice[0].name})`}) + } +} + +this.effect.delete(); \ No newline at end of file diff --git a/reference_scripts/sHfkTRqTWPg2JAGN.js b/reference_scripts/sHfkTRqTWPg2JAGN.js new file mode 100644 index 0000000..30a46f7 --- /dev/null +++ b/reference_scripts/sHfkTRqTWPg2JAGN.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/sKO8TcLIkCTnFvXu.js b/reference_scripts/sKO8TcLIkCTnFvXu.js new file mode 100644 index 0000000..d3d0cb5 --- /dev/null +++ b/reference_scripts/sKO8TcLIkCTnFvXu.js @@ -0,0 +1,2 @@ +args.abort = true; +this.script.scriptNotification(`Cannot use ${this.item.system.location.value}!`, "error") \ No newline at end of file diff --git a/reference_scripts/sNSfDBIA2k17hPYI.js b/reference_scripts/sNSfDBIA2k17hPYI.js new file mode 100644 index 0000000..fd7fc3e --- /dev/null +++ b/reference_scripts/sNSfDBIA2k17hPYI.js @@ -0,0 +1,6 @@ +let ablaze = this.actor.hasCondition("ablaze"); +if (ablaze) +{ + ablaze?.delete(); + this.script.scriptNotification("Ignore Ablaze"); +} diff --git a/reference_scripts/sSMg43ZjnNmpytfj.js b/reference_scripts/sSMg43ZjnNmpytfj.js new file mode 100644 index 0000000..a18fd9b --- /dev/null +++ b/reference_scripts/sSMg43ZjnNmpytfj.js @@ -0,0 +1,2 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name}); +await test.roll(); diff --git a/reference_scripts/sUHuj00IpoZ7Gd03.js b/reference_scripts/sUHuj00IpoZ7Gd03.js new file mode 100644 index 0000000..f8f4072 --- /dev/null +++ b/reference_scripts/sUHuj00IpoZ7Gd03.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Swim"); \ No newline at end of file diff --git a/reference_scripts/sWyO1DNaqb2EdHoW.js b/reference_scripts/sWyO1DNaqb2EdHoW.js new file mode 100644 index 0000000..295c7b5 --- /dev/null +++ b/reference_scripts/sWyO1DNaqb2EdHoW.js @@ -0,0 +1,11 @@ +if (!this.actor.items.getName(game.i18n.localize("NAME.Frenzy"))) // Either frenzy trait or psychology +{ + // Add Frenzy psychology + let item = await fromUuid("Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT") + let data = item.toObject(); + data.effects[0].disabled = false; + this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) +} + +this.script.scriptMessage(`

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

`, + {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) \ No newline at end of file diff --git a/reference_scripts/sYlGRLApZ3Ub24ea.js b/reference_scripts/sYlGRLApZ3Ub24ea.js new file mode 100644 index 0000000..ee66235 --- /dev/null +++ b/reference_scripts/sYlGRLApZ3Ub24ea.js @@ -0,0 +1 @@ +this.actor.system.status.addArmour(3, {source: this.effect.name, magical: true}) \ No newline at end of file diff --git a/reference_scripts/sZwLitzwKBTaFca3.js b/reference_scripts/sZwLitzwKBTaFca3.js new file mode 100644 index 0000000..4d00d6e --- /dev/null +++ b/reference_scripts/sZwLitzwKBTaFca3.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN") +let data = item.toObject(); +data.name = data.name.replace("Target", "Greenskins, Undead, Chaos") +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/sagKJM6oDFlw4ED2.js b/reference_scripts/sagKJM6oDFlw4ED2.js new file mode 100644 index 0000000..4392e3b --- /dev/null +++ b/reference_scripts/sagKJM6oDFlw4ED2.js @@ -0,0 +1,3 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); +await test.roll(); +return test.failed; \ No newline at end of file diff --git a/reference_scripts/sbK1a7txpSoXFzyB.js b/reference_scripts/sbK1a7txpSoXFzyB.js new file mode 100644 index 0000000..079b4dc --- /dev/null +++ b/reference_scripts/sbK1a7txpSoXFzyB.js @@ -0,0 +1,10 @@ +if (args.test.options.useOnesArgumentative && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) +{ + +let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) +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.result.other.push(`${this.effect.name}: Used unit dice as SL`) +} \ No newline at end of file diff --git a/reference_scripts/scfm5iWWBxWI6QaK.js b/reference_scripts/scfm5iWWBxWI6QaK.js new file mode 100644 index 0000000..117c336 --- /dev/null +++ b/reference_scripts/scfm5iWWBxWI6QaK.js @@ -0,0 +1,6 @@ +let darkvision = await fromUuid("Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc") +let fear = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn") +let acutesense = await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS") +fear = fear.toObject(); +fear.system.specification.value = 1; +this.actor.createEmbeddedDocuments("Item", [darkvision, fear, acutesense], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/sgS9rblPkQB36C8S.js b/reference_scripts/sgS9rblPkQB36C8S.js new file mode 100644 index 0000000..49348b1 --- /dev/null +++ b/reference_scripts/sgS9rblPkQB36C8S.js @@ -0,0 +1,29 @@ +if (this.item.name.includes("(")) +{ + let trade = this.item.parenthesesText; + if (trade?.toLowerCase() != "any") + return this.item.updateSource({"system.tests.value" : this.item.system.tests.value.replace("any one", trade)}) +} + +let index = game.packs +.filter(i => i.metadata.type == "Item") +.reduce((acc, pack) => acc.concat(pack.index.contents), []) +.filter(i => i.type == "skill" && i.name.includes(game.i18n.localize("NAME.Trade"))) +.map(i => { + i.id = i._id + return i +}) + +let choice = await ItemDialog.create(index, 1, "Choose a Trade Skill") +let text; +if (!choice[0]) +{ + let custom = await ValueDialog.create("Enter Custom Trade Skill", "Custom Trade"); + text = custom || "" +} +else +{ + text = game.wfrp4e.utility.extractParenthesesText(choice[0].name) +} + +await 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)}); \ No newline at end of file diff --git a/reference_scripts/shkBUtUuMPDKvFm7.js b/reference_scripts/shkBUtUuMPDKvFm7.js new file mode 100644 index 0000000..641a6b6 --- /dev/null +++ b/reference_scripts/shkBUtUuMPDKvFm7.js @@ -0,0 +1,10 @@ +let test = await this.actor.setupSkill("Dodge", {fields : {difficulty : "average"}}) +let caster = this.effect.sourceActor + +let fallen = this.effect.sourceTest.result.SL + caster.characteristics.wp.bonus +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("prone") + this.script.scriptMessage(`${this.actor.prototypeToken.name} falls ${fallen} yards`) +} \ No newline at end of file diff --git a/reference_scripts/skVq3eDEYKFF2iZp.js b/reference_scripts/skVq3eDEYKFF2iZp.js new file mode 100644 index 0000000..312dc79 --- /dev/null +++ b/reference_scripts/skVq3eDEYKFF2iZp.js @@ -0,0 +1,2 @@ +// I'm assuming the endurance test specified is for the end-round check +await this.actor.addCondition("poisoned", 4); diff --git a/reference_scripts/sm9d5lk6cM0OuUkf.js b/reference_scripts/sm9d5lk6cM0OuUkf.js new file mode 100644 index 0000000..97c8f33 --- /dev/null +++ b/reference_scripts/sm9d5lk6cM0OuUkf.js @@ -0,0 +1 @@ +this.actor.applyFear(Math.min(4, this.effect.sourceTest.result.overcast.usage.other.current)) \ No newline at end of file diff --git a/reference_scripts/sx7Ikn8WW00gBFb4.js b/reference_scripts/sx7Ikn8WW00gBFb4.js new file mode 100644 index 0000000..d413850 --- /dev/null +++ b/reference_scripts/sx7Ikn8WW00gBFb4.js @@ -0,0 +1,32 @@ +let location = (Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? "r" : "l") + "Arm" + +if (location == "lArm") +{ + this.script.scriptNotification("Rolled Left") +} +else if (location == "rArm") +{ + this.script.scriptNotification("Rolled Right") +} + +this.effect.updateSource({"flags.wfrp4e.location" : location}); + +if (location) +{ + let dropped = this.actor.itemTypes.weapon.filter(i => i.isEquipped & i.system.usesHands.includes(location)); + + if (dropped.length) + { + this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + for(let weapon of dropped) + { + await weapon.system.toggleEquip(); + } + } +} + +let roll = await new Roll("1d10").roll() + +roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Duration)`})); + +this.effect.updateSource({"duration.rounds" : roll.total}) \ No newline at end of file diff --git a/reference_scripts/syBgPp7rOymCZejX.js b/reference_scripts/syBgPp7rOymCZejX.js new file mode 100644 index 0000000..3007947 --- /dev/null +++ b/reference_scripts/syBgPp7rOymCZejX.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {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/reference_scripts/syqqBkyP5tGqZ78t.js b/reference_scripts/syqqBkyP5tGqZ78t.js new file mode 100644 index 0000000..265c5fd --- /dev/null +++ b/reference_scripts/syqqBkyP5tGqZ78t.js @@ -0,0 +1,8 @@ +this.actor.has("Immunity to Psychology")?.delete(); + +let roll = await new Roll("1d10").roll(); + +roll.toMessage(this.script.getChatData()); + +this.script.scriptNotification(`Removed Immunity to Psychology, Adding ${roll.total} Broken Conditions`) +this.actor.addCondition("broken", roll.total, {"flags.wfrp4e.blasted-mind" : true}) \ No newline at end of file diff --git a/reference_scripts/t48hkacYdOpzWvK9.js b/reference_scripts/t48hkacYdOpzWvK9.js new file mode 100644 index 0000000..6e8c53a --- /dev/null +++ b/reference_scripts/t48hkacYdOpzWvK9.js @@ -0,0 +1 @@ +args.options.beatBlade = true; \ No newline at end of file diff --git a/reference_scripts/t56mnblo1kv3gM1M.js b/reference_scripts/t56mnblo1kv3gM1M.js new file mode 100644 index 0000000..ce5fba9 --- /dev/null +++ b/reference_scripts/t56mnblo1kv3gM1M.js @@ -0,0 +1 @@ +return args.skill?.name.includes("Melee (Basic)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic"); \ No newline at end of file diff --git a/reference_scripts/t8LYOuN5peEdWeXP.js b/reference_scripts/t8LYOuN5peEdWeXP.js new file mode 100644 index 0000000..4aeed96 --- /dev/null +++ b/reference_scripts/t8LYOuN5peEdWeXP.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.mNoCuaVbFBflfO6X") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/tCIT1a12Gt6k2ohA.js b/reference_scripts/tCIT1a12Gt6k2ohA.js new file mode 100644 index 0000000..e054b71 --- /dev/null +++ b/reference_scripts/tCIT1a12Gt6k2ohA.js @@ -0,0 +1,21 @@ +let resistance +if (this.item.name.includes("(")) +{ + resistance = this.item.parenthesesText +} +else +{ + resistance = await ValueDialog.create("Enter Resistance", "Resistance") + + if (resistance) + { + this.item.updateSource({name : this.item.name + ` (${resistance})`}) + this.effect.updateSource({name : this.effect.name + ` (${resistance})`}) + } +} +this.item.updateSource({"system.tests.value" : this.item.system.tests.value.replace("the associated Threat", resistance)}) + +if (resistance && !this.effect.name.includes("(")) +{ + this.effect.updateSource({name : this.effect.name += ` (${resistance})`}) +} \ No newline at end of file diff --git a/reference_scripts/tDrs0aNIYmZPsOoS.js b/reference_scripts/tDrs0aNIYmZPsOoS.js new file mode 100644 index 0000000..51bdf06 --- /dev/null +++ b/reference_scripts/tDrs0aNIYmZPsOoS.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("prone") +} diff --git a/reference_scripts/tFAKRRRfTjQfdQz3.js b/reference_scripts/tFAKRRRfTjQfdQz3.js new file mode 100644 index 0000000..566dcbb --- /dev/null +++ b/reference_scripts/tFAKRRRfTjQfdQz3.js @@ -0,0 +1 @@ +this.actor.getActiveTokens().forEach(t => t.document.update({"texture.tint" : ""})); \ No newline at end of file diff --git a/reference_scripts/tG1qGqzBLmAR3WHm.js b/reference_scripts/tG1qGqzBLmAR3WHm.js new file mode 100644 index 0000000..64fa199 --- /dev/null +++ b/reference_scripts/tG1qGqzBLmAR3WHm.js @@ -0,0 +1,15 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) +{ + let add = 0 + + if (test.result.roll % 11 == 0 || test.result.roll == 100) + { + add = 1 // can't use isFumble if no hit location + } + + await this.actor.addCondition("stunned", Math.max(1, Math.abs(test.result.SL)) + add) + await this.actor.addCondition("blinded", Math.max(1, Math.abs(test.result.SL))) + +} \ No newline at end of file diff --git a/reference_scripts/tGVEV6TLl310mFLP.js b/reference_scripts/tGVEV6TLl310mFLP.js new file mode 100644 index 0000000..686b84a --- /dev/null +++ b/reference_scripts/tGVEV6TLl310mFLP.js @@ -0,0 +1,7 @@ +let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical +if (args.applyAP && nonmagical) +{ + 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/reference_scripts/tKBq1nGZo8t6vvQ6.js b/reference_scripts/tKBq1nGZo8t6vvQ6.js new file mode 100644 index 0000000..acbf367 --- /dev/null +++ b/reference_scripts/tKBq1nGZo8t6vvQ6.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.5hH73j2NgPdsLCZN"); +this.actor.createEmbeddedDocuments("Item", [item.toObject()], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/tNTO1LVN7JqHf4YN.js b/reference_scripts/tNTO1LVN7JqHf4YN.js new file mode 100644 index 0000000..f35b126 --- /dev/null +++ b/reference_scripts/tNTO1LVN7JqHf4YN.js @@ -0,0 +1,8 @@ +if (args.test.characteristicKey == "wp") +{ + if (args.test.failed) + { + this.actor.createEmbeddedDocuments("ActiveEffect", [game.wfrp4e.config.symptomEffects["malaise"]]) + this.script.scriptMessage(`Willpower Test failed, ${this.actor.prototypeToken.name} gains @Condition[Malaise] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients("GM")}) + } +} \ No newline at end of file diff --git a/reference_scripts/tUwP7TjrOOOnaCYJ.js b/reference_scripts/tUwP7TjrOOOnaCYJ.js new file mode 100644 index 0000000..c502cf0 --- /dev/null +++ b/reference_scripts/tUwP7TjrOOOnaCYJ.js @@ -0,0 +1,10 @@ +let fatigued = this.actor.hasCondition("fatigued") +if (fatigued) +{ + this.script.scriptNotification(`Cleared ${fatigued.conditionValue} Fatigued Conditions`) + fatigued.delete(); +} +else +{ + this.script.scriptNotification(`No Fatigued Conditions`) +} \ No newline at end of file diff --git a/reference_scripts/tcZug8ehU6lyYBd9.js b/reference_scripts/tcZug8ehU6lyYBd9.js new file mode 100644 index 0000000..3ac13c4 --- /dev/null +++ b/reference_scripts/tcZug8ehU6lyYBd9.js @@ -0,0 +1 @@ +return args.skill?.name != "Ranged (Blackpowder)" \ No newline at end of file diff --git a/reference_scripts/tdICiJ26rJrDbxT6.js b/reference_scripts/tdICiJ26rJrDbxT6.js new file mode 100644 index 0000000..233b805 --- /dev/null +++ b/reference_scripts/tdICiJ26rJrDbxT6.js @@ -0,0 +1 @@ +return args.characteristic != "i" \ No newline at end of file diff --git a/reference_scripts/tn6SwmjAuNzqE6dx.js b/reference_scripts/tn6SwmjAuNzqE6dx.js new file mode 100644 index 0000000..a7bacb4 --- /dev/null +++ b/reference_scripts/tn6SwmjAuNzqE6dx.js @@ -0,0 +1,14 @@ +let damage = 0 +let test = await this.actor.setupSkill("Dodge", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); +await test.roll(); + +if (test.succeeded) +{ + damage = 10; +} +else if (test.failed) +{ + damage = 20; +} + +this.script.scriptMessage(await this.actor.applyBasicDamage(damage, {loc : "roll", hideDSN: true, suppressMsg : true})) \ No newline at end of file diff --git a/reference_scripts/tnE8LF6E3svIlLca.js b/reference_scripts/tnE8LF6E3svIlLca.js new file mode 100644 index 0000000..4058efe --- /dev/null +++ b/reference_scripts/tnE8LF6E3svIlLca.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.Research"); \ No newline at end of file diff --git a/reference_scripts/tnilBagajWM8UGQt.js b/reference_scripts/tnilBagajWM8UGQt.js new file mode 100644 index 0000000..1b8e882 --- /dev/null +++ b/reference_scripts/tnilBagajWM8UGQt.js @@ -0,0 +1 @@ +return args.item?.name != game.i18n.localize("NAME.ConsumeAlcohol") \ No newline at end of file diff --git a/reference_scripts/toSrgcvWq9b5eN0K.js b/reference_scripts/toSrgcvWq9b5eN0K.js new file mode 100644 index 0000000..f3fabed --- /dev/null +++ b/reference_scripts/toSrgcvWq9b5eN0K.js @@ -0,0 +1,4 @@ +let location = await game.wfrp4e.tables.rollTable("hitloc", {hideDSN: true}) + +this.item.updateSource({name : `${this.item.name} (${location.description})`}) +this.script.scriptMessage(`Location: ${location.description}`, { whisper: ChatMessage.getWhisperRecipients("GM") }) \ No newline at end of file diff --git a/reference_scripts/tolkNN5P7oOC8GKZ.js b/reference_scripts/tolkNN5P7oOC8GKZ.js new file mode 100644 index 0000000..e030d9d --- /dev/null +++ b/reference_scripts/tolkNN5P7oOC8GKZ.js @@ -0,0 +1,11 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "difficult"}}) +await test.roll(); + +if (test.failed) +{ + let sourceActor = this.effect.sourceActor; + if (sourceActor) + { + this.script.scriptMessage(await this.actor.applyBasicDamage(sourceActor.system.characteristics.wp.bonus, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL})) + } +} \ No newline at end of file diff --git a/reference_scripts/u3olS2p7Ls1JXfAH.js b/reference_scripts/u3olS2p7Ls1JXfAH.js new file mode 100644 index 0000000..5ee90b2 --- /dev/null +++ b/reference_scripts/u3olS2p7Ls1JXfAH.js @@ -0,0 +1 @@ +this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("mutatephys", {}, "Tzeentch")); \ No newline at end of file diff --git a/reference_scripts/u5dNZ0s3lWfL8KFb.js b/reference_scripts/u5dNZ0s3lWfL8KFb.js new file mode 100644 index 0000000..3d18bb7 --- /dev/null +++ b/reference_scripts/u5dNZ0s3lWfL8KFb.js @@ -0,0 +1 @@ +return args.fields.charging \ No newline at end of file diff --git a/reference_scripts/u6CYMSZADrfXd48Q.js b/reference_scripts/u6CYMSZADrfXd48Q.js new file mode 100644 index 0000000..ad9447a --- /dev/null +++ b/reference_scripts/u6CYMSZADrfXd48Q.js @@ -0,0 +1 @@ +args.fields.modifier += 20; \ No newline at end of file diff --git a/reference_scripts/uACa6u4JLNMRgFlr.js b/reference_scripts/uACa6u4JLNMRgFlr.js new file mode 100644 index 0000000..b4b0244 --- /dev/null +++ b/reference_scripts/uACa6u4JLNMRgFlr.js @@ -0,0 +1,2 @@ +const talents = await Promise.all(["Furious Assault", "Sea Legs"].map(game.wfrp4e.utility.findTalent)) +this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/uAy4w7y8Uu9POF8C.js b/reference_scripts/uAy4w7y8Uu9POF8C.js new file mode 100644 index 0000000..c07db00 --- /dev/null +++ b/reference_scripts/uAy4w7y8Uu9POF8C.js @@ -0,0 +1 @@ +args.item.system.qualities.value.push({name : "impact"}) \ No newline at end of file diff --git a/reference_scripts/uLBDnWC3S0lRitbj.js b/reference_scripts/uLBDnWC3S0lRitbj.js new file mode 100644 index 0000000..e858a83 --- /dev/null +++ b/reference_scripts/uLBDnWC3S0lRitbj.js @@ -0,0 +1,22 @@ +let test = await this.actor.setupCharacteristic("int", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); + +let opposedResult = test.opposedMessages[0]?.getOppose()?.resultMessage?.getOpposedTest()?.result + +if (opposedResult?.winner == "attacker") +{ + if (test.failed && (test.result.roll % 11 == 0 || test.result.roll == 100)) + { + this.actor.addCondition("unconscious") + await this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) + this.script.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) + } + else + { + await this.actor.addCondition("stunned", 1 + opposedResult.differenceSL); + } +} +else +{ + return false; +} \ No newline at end of file diff --git a/reference_scripts/uNYstk3eXmWamhzs.js b/reference_scripts/uNYstk3eXmWamhzs.js new file mode 100644 index 0000000..4a76cd7 --- /dev/null +++ b/reference_scripts/uNYstk3eXmWamhzs.js @@ -0,0 +1 @@ +args.actor.addCondition("blinded") \ No newline at end of file diff --git a/reference_scripts/uOHAsKlkFuIaAmjb.js b/reference_scripts/uOHAsKlkFuIaAmjb.js new file mode 100644 index 0000000..85f570c --- /dev/null +++ b/reference_scripts/uOHAsKlkFuIaAmjb.js @@ -0,0 +1 @@ +args.actor.modifyWounds(1) \ No newline at end of file diff --git a/reference_scripts/uSwkYENTOcnfRrqA.js b/reference_scripts/uSwkYENTOcnfRrqA.js new file mode 100644 index 0000000..05d9ada --- /dev/null +++ b/reference_scripts/uSwkYENTOcnfRrqA.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Melee")) && args.weapon?.system?.attackType != "melee" \ No newline at end of file diff --git a/reference_scripts/ucF4aiJ1gpDB333G.js b/reference_scripts/ucF4aiJ1gpDB333G.js new file mode 100644 index 0000000..7d00add --- /dev/null +++ b/reference_scripts/ucF4aiJ1gpDB333G.js @@ -0,0 +1,5 @@ +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) +{ + args.test.result.other.push(`${this.effect.name}: Fall distance damage reduced by ${Number(args.test.result.SL) + 1} yards`) + args.test.result.catfall = true; // Prevent duplicate messages +} \ No newline at end of file diff --git a/reference_scripts/ugL5IBB6R2yWyMWd.js b/reference_scripts/ugL5IBB6R2yWyMWd.js new file mode 100644 index 0000000..1616e69 --- /dev/null +++ b/reference_scripts/ugL5IBB6R2yWyMWd.js @@ -0,0 +1,23 @@ +if (args.totalWoundLoss > 0) +{ + let apply = await Dialog.confirm({title : this.effect.name, content : `

Appy ${this.effect.name} Damage? Attacker must have used bare hands or a melee weapon made of metal.`}) + if (apply) + { + + let damage = 5 + this.actor.characteristics.wp.bonus; + + let loc = args.opposedTest.attackerTest.weapon?.system.usesHands[0] || "rArm"; + + let APatLoc = args.opposedTest.attacker.system.status.armour[loc]; + + let metalAP = APatLoc.layers.reduce((metal, layer) => metal += (layer.metal ? layer.value : 0), 0) + + let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location; + + damage -= (APused + args.opposedTest.attacker.system.characteristics.t.bonus) + + let msg = await args.opposedTest.attacker.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL}); + msg += ` (ignored ${metalAP} metal AP on ${game.wfrp4e.config.locations[loc]})` + this.script.scriptMessage(msg) + } +} \ No newline at end of file diff --git a/reference_scripts/upfK6GM33qZCZjll.js b/reference_scripts/upfK6GM33qZCZjll.js new file mode 100644 index 0000000..91935c0 --- /dev/null +++ b/reference_scripts/upfK6GM33qZCZjll.js @@ -0,0 +1 @@ +return args.item?.name != "Play (Lute)" \ No newline at end of file diff --git a/reference_scripts/uwdQvZtzy2HVeEzx.js b/reference_scripts/uwdQvZtzy2HVeEzx.js new file mode 100644 index 0000000..685fa84 --- /dev/null +++ b/reference_scripts/uwdQvZtzy2HVeEzx.js @@ -0,0 +1,14 @@ +if (args.totalWoundLoss > 0) +{ + let roll = await new Roll("1d10").roll(); + roll.toMessage(this.script.getChatData()); + args.modifiers.other.push({label : this.effect.name, value : roll.total}) + + args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, skipTargets: true, appendTitle : " - " + this.effect.name}).then(async test => { + await test.roll(); + if (test.failed) + { + this.script.scriptMessage("" + args.actor.name + " takes a @Table[critbody]{Critical Hit} to the torse", {whisper: ChatMessage.getWhisperRecipients("GM")}) + } + }) +} diff --git a/reference_scripts/ux3jaLpAUhZ5YqA6.js b/reference_scripts/ux3jaLpAUhZ5YqA6.js new file mode 100644 index 0000000..66cae1b --- /dev/null +++ b/reference_scripts/ux3jaLpAUhZ5YqA6.js @@ -0,0 +1 @@ +return args.item?.name != game.i18n.localize("NAME.Leadership") && args.item?.name != game.i18n.localize("NAME.Cool") \ No newline at end of file diff --git a/reference_scripts/v00nVCRKqqRvY28t.js b/reference_scripts/v00nVCRKqqRvY28t.js new file mode 100644 index 0000000..7d632a2 --- /dev/null +++ b/reference_scripts/v00nVCRKqqRvY28t.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "hard"}}); +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("stunned", 3) +} diff --git a/reference_scripts/v4CCxVaVGf9i8U7X.js b/reference_scripts/v4CCxVaVGf9i8U7X.js new file mode 100644 index 0000000..abab0d3 --- /dev/null +++ b/reference_scripts/v4CCxVaVGf9i8U7X.js @@ -0,0 +1,24 @@ +let cured = await Dialog.wait({ + title : this.effect.name, + content : "

Enter the number of diseases/poisons cured

", + buttons : { + confirm : { + label : "Confirm", + callback : (dlg) => { + let input = dlg.find("input"); + value = parseInt(input[0].value); + return value; + } + } + } +}) + + +let damage = 0; + +let rolls = new Array(cured).fill("").map(i => `max(0, 1d10 - ${this.actor.system.characteristics.fel.bonus})`) + +let test = new Roll(`${rolls.join(" + ")}`); +await test.roll(); +test.toMessage({speaker : {alias : this.actor.name}, flavor : this.effect.name}); +this.script.scriptMessage(await this.actor.applyBasicDamage(test.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true })) \ No newline at end of file diff --git a/reference_scripts/v4ITTsSY9EvCbhZP.js b/reference_scripts/v4ITTsSY9EvCbhZP.js new file mode 100644 index 0000000..b42194c --- /dev/null +++ b/reference_scripts/v4ITTsSY9EvCbhZP.js @@ -0,0 +1,2 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS") +this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/v5xrDWcrTNFJkyQB.js b/reference_scripts/v5xrDWcrTNFJkyQB.js new file mode 100644 index 0000000..da60300 --- /dev/null +++ b/reference_scripts/v5xrDWcrTNFJkyQB.js @@ -0,0 +1,90 @@ +let choice1 = [ + { + type : "skill", + name : "Ranged (Bow)", + diff : { + system : { + advances : { + value : 10 + } + } + } + }, + { + type : "weapon", + name : "Longbow", + }, + { + type : "ammunition", + name : "Arrow", + } +] +let choice2 = [ +] + +let choice = await Dialog.wait({ + title : "Option", + content : + `

+ Add Option? +

+
    +
  1. Ranged (Bow) +10 and a Longbow with 12 Arrows
  2. +
+ `, + buttons : { + 1 : { + label : "Yes", + callback : () => { + return choice1; + } + }, + 2 : { + label : "No", + callback : () => { + return choice2; + } + } + } +}) + +let updateObj = this.actor.toObject(); +let items = [] +for (let c of choice) +{ + let existing + if (c.type == "skill") + { + existing = updateObj.items.find(i => i.name == c.name && i.type == c.type) + if (existing && c.diff?.system?.advances?.value) + { + existing.system.advances.value += c.diff.system.advances.value + } + } + + if (!existing) + { + let item = await game.wfrp4e.utility.find(c.name, c.type) + if (item) + { + item = item.toObject() + equip(item); + items.push(mergeObject(item, (c.diff || {}))) + } + else + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } + +} +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + +function equip(item) +{ + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true +} \ No newline at end of file diff --git a/reference_scripts/v6LIG7EwWYALxCpP.js b/reference_scripts/v6LIG7EwWYALxCpP.js new file mode 100644 index 0000000..9bdb16a --- /dev/null +++ b/reference_scripts/v6LIG7EwWYALxCpP.js @@ -0,0 +1 @@ +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"))) \ No newline at end of file diff --git a/reference_scripts/vFUVWZ1l8wpTjLcx.js b/reference_scripts/vFUVWZ1l8wpTjLcx.js new file mode 100644 index 0000000..b33c270 --- /dev/null +++ b/reference_scripts/vFUVWZ1l8wpTjLcx.js @@ -0,0 +1,14 @@ +if (!this.actor.has(game.i18n.localize("NAME.Daemonic"))) + return + +let caster = this.effect.sourceActor; +if (caster) +{ + let wp = caster.system.characteristics.wp + if (this.actor.system.characteristics.wp.value >= wp.value) + { + this.script.scriptNotification("Target has higher Willpower, no effect") + return + } + this.actor.applyBasicDamage(wp.bonus, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL }) +} \ No newline at end of file diff --git a/reference_scripts/vJQRBxDfPwHens0a.js b/reference_scripts/vJQRBxDfPwHens0a.js new file mode 100644 index 0000000..ace2cb2 --- /dev/null +++ b/reference_scripts/vJQRBxDfPwHens0a.js @@ -0,0 +1,11 @@ +if (args.totalWoundLoss > 0) +{ + args.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: { difficulty: "difficult" } }).then(async test => { + await test.roll(); + if (test.failed) + { + await args.actor.addCondition("poisoned") + this.script.scriptMessage(await args.actor.applyBasicDamage(3, {suppressMsg : true, damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL })) + } + }) +} \ No newline at end of file diff --git a/reference_scripts/vM2BPwYhHQaBAt2C.js b/reference_scripts/vM2BPwYhHQaBAt2C.js new file mode 100644 index 0000000..a463b45 --- /dev/null +++ b/reference_scripts/vM2BPwYhHQaBAt2C.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.KII1gWnxIZ8HzmU5"); +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/vNp9wgdSvnNEjZyS.js b/reference_scripts/vNp9wgdSvnNEjZyS.js new file mode 100644 index 0000000..b3ed272 --- /dev/null +++ b/reference_scripts/vNp9wgdSvnNEjZyS.js @@ -0,0 +1 @@ +args.fields.slBonus -= 2; \ No newline at end of file diff --git a/reference_scripts/vPG4rV640aSzKzxe.js b/reference_scripts/vPG4rV640aSzKzxe.js new file mode 100644 index 0000000..9c6656e --- /dev/null +++ b/reference_scripts/vPG4rV640aSzKzxe.js @@ -0,0 +1 @@ +return !this.actor.flags.useless[this.item.system.location.key[0] + "Arm"] || ["fel", "wp", "int", "t"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/vS2D9QUslR7ZtXXm.js b/reference_scripts/vS2D9QUslR7ZtXXm.js new file mode 100644 index 0000000..49c45c1 --- /dev/null +++ b/reference_scripts/vS2D9QUslR7ZtXXm.js @@ -0,0 +1,9 @@ +let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) +await test.roll(); +if (test.failed) +{ + let roll = await new Roll("1d10").roll(); + roll.toMessage(this.script.getChatData()) + + this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})) +} \ No newline at end of file diff --git a/reference_scripts/vSDMygIT9nNvEGWG.js b/reference_scripts/vSDMygIT9nNvEGWG.js new file mode 100644 index 0000000..88b2106 --- /dev/null +++ b/reference_scripts/vSDMygIT9nNvEGWG.js @@ -0,0 +1,13 @@ +// Each time the blade is used, the GM should secretly roll a d10. +// On a 1, its poison has run dry, +// and the next time it is employed it will shatter. + +if (Math.ceil(CONFIG.Dice.randomUniform() * 10) == 1) { + this.item.setFlag("wfrp4e", "brittle", true) + ChatMessage.create({ + content: ` + ${this.item.name} has run out of poison. It will shatter the next time it is used.`, + whisper: ChatMessage.getWhisperRecipients("GM"), + blind: true + }) +} diff --git a/reference_scripts/vY3xeTTL3ghPrJpN.js b/reference_scripts/vY3xeTTL3ghPrJpN.js new file mode 100644 index 0000000..13f39e5 --- /dev/null +++ b/reference_scripts/vY3xeTTL3ghPrJpN.js @@ -0,0 +1 @@ +this.actor.addCondition("entangled"); \ No newline at end of file diff --git a/reference_scripts/vZ5HCrhY8e4R1TrG.js b/reference_scripts/vZ5HCrhY8e4R1TrG.js new file mode 100644 index 0000000..abad24e --- /dev/null +++ b/reference_scripts/vZ5HCrhY8e4R1TrG.js @@ -0,0 +1,3 @@ +let eye = await fromUuid("Compendium.wfrp4e-core.items.weczkAMPlTjX7lqU") +let nose = await fromUuid("Compendium.wfrp4e-core.items.SpPRZZRHxly7uo2G") +this.actor.createEmbeddedDocuments("Item", [eye, nose]); \ No newline at end of file diff --git a/reference_scripts/vc4bELo0cWYoILfB.js b/reference_scripts/vc4bELo0cWYoILfB.js new file mode 100644 index 0000000..c8a93da --- /dev/null +++ b/reference_scripts/vc4bELo0cWYoILfB.js @@ -0,0 +1,4 @@ +let choice = await ItemDialog.create(this.actor.itemTypes.disease, 1, "Choose a disease to heal (must be naturally occuring)") + +this.script.scriptMessage(`Cured ${choice[0]?.name}`); +choice[0].delete() \ No newline at end of file diff --git a/reference_scripts/vc8eVKtyjtOGvWlK.js b/reference_scripts/vc8eVKtyjtOGvWlK.js new file mode 100644 index 0000000..848809f --- /dev/null +++ b/reference_scripts/vc8eVKtyjtOGvWlK.js @@ -0,0 +1,4 @@ +if (!this.actor.hasCondition("entangled")) +{ + this.effect.delete(); +} \ No newline at end of file diff --git a/reference_scripts/vcM0IgsYVmfWrlO3.js b/reference_scripts/vcM0IgsYVmfWrlO3.js new file mode 100644 index 0000000..fb2f0c1 --- /dev/null +++ b/reference_scripts/vcM0IgsYVmfWrlO3.js @@ -0,0 +1,3 @@ +fromUuid("Compendium.wfrp4e-core.items.rOV2s6PQBBrhpMOv").then(item => { + this.actor.createEmbeddedDocuments("Item", [item], {fromEffect : this.effect.id}); +}) \ No newline at end of file diff --git a/reference_scripts/vgfs0DXvF5iKrz1M.js b/reference_scripts/vgfs0DXvF5iKrz1M.js new file mode 100644 index 0000000..b815dbf --- /dev/null +++ b/reference_scripts/vgfs0DXvF5iKrz1M.js @@ -0,0 +1 @@ +return args.characteristic != "ag" || this.item.getFlag("wfrp4e", "passed") \ No newline at end of file diff --git a/reference_scripts/vj3zArmX27vCxYJW.js b/reference_scripts/vj3zArmX27vCxYJW.js new file mode 100644 index 0000000..d95ee60 --- /dev/null +++ b/reference_scripts/vj3zArmX27vCxYJW.js @@ -0,0 +1 @@ +return !["NAME.Perception", "NAME.Navigation"].map(i => game.i18n.localize(i)).includes(args.skill?.name) \ No newline at end of file diff --git a/reference_scripts/vjyTKcNrJzX4XWnS.js b/reference_scripts/vjyTKcNrJzX4XWnS.js new file mode 100644 index 0000000..033ec8d --- /dev/null +++ b/reference_scripts/vjyTKcNrJzX4XWnS.js @@ -0,0 +1,4 @@ +let SL = parseInt(this.effect.sourceTest.result.SL) +if (SL < 0) + SL = 0 +this.actor.addCondition("fatigued", 1 + SL) \ No newline at end of file diff --git a/reference_scripts/vuzRRj5d9XdNYx3o.js b/reference_scripts/vuzRRj5d9XdNYx3o.js new file mode 100644 index 0000000..c5c1635 --- /dev/null +++ b/reference_scripts/vuzRRj5d9XdNYx3o.js @@ -0,0 +1,6 @@ +let broken = this.actor.hasCondition("broken") +if (broken) +{ + broken.delete(); + this.script.scriptNotification("Removed Broken") +} \ No newline at end of file diff --git a/reference_scripts/vvVhAqreedtmOR9b.js b/reference_scripts/vvVhAqreedtmOR9b.js new file mode 100644 index 0000000..acab485 --- /dev/null +++ b/reference_scripts/vvVhAqreedtmOR9b.js @@ -0,0 +1,2 @@ +args.totalWoundLoss = Math.max(0, args.totalWoundLoss - 1) +args.modifiers.other.push({label : this.effect.name, value : -1) \ No newline at end of file diff --git a/reference_scripts/vvdo1NxjmGVkmFCT.js b/reference_scripts/vvdo1NxjmGVkmFCT.js new file mode 100644 index 0000000..22edf7f --- /dev/null +++ b/reference_scripts/vvdo1NxjmGVkmFCT.js @@ -0,0 +1,24 @@ +await this.actor.addCondition("stunned"); +let 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) +{ + await this.actor.addCondition("prone") + await this.actor.addCondition("stunned") +} + +let location = this.item.system.location.key; + +if (location) +{ + let dropped = this.item.system.weaponsAtLocation; + + if (dropped.length) + { + this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + for(let weapon of dropped) + { + await weapon.system.toggleEquip(); + } + } +} \ No newline at end of file diff --git a/reference_scripts/vzMxIDjRlQSxXtCW.js b/reference_scripts/vzMxIDjRlQSxXtCW.js new file mode 100644 index 0000000..49cc4fd --- /dev/null +++ b/reference_scripts/vzMxIDjRlQSxXtCW.js @@ -0,0 +1,11 @@ +// Remove the miscast if doubles rolled and succeeded +if(args.test.succeeded && args.test.result.minormis && args.test.result.roll % 11 == 0) +{ + delete args.test.result.minormis +} +// Decrement the major miscast to minor miscast +else if(args.test.succeeded && args.test.result.majormis && args.test.result.roll % 11 == 0) +{ + delete args.test.result.majormis + args.test.result.minormis = game.i18n.localize("ROLL.MinorMis") +} \ No newline at end of file diff --git a/reference_scripts/w3r54pKZQKaH2Yer.js b/reference_scripts/w3r54pKZQKaH2Yer.js new file mode 100644 index 0000000..bce673d --- /dev/null +++ b/reference_scripts/w3r54pKZQKaH2Yer.js @@ -0,0 +1,8 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn") +let data = item.toObject(); +let slOver = this.effect.sourceTest.result.slOver; +let overcast = this.effect.sourceTest.result.overcast +slOver -= ((overcast.total - overcast.available) * 2) // If they used an overcast, subtract 2 SL for each one +let added = Math.floor(slOver / 3) || 0 +data.system.specification.value = 1 + added; // For each +3 SL, add 1 specification +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/w4JKuTECFmu3YmTR.js b/reference_scripts/w4JKuTECFmu3YmTR.js new file mode 100644 index 0000000..deb575d --- /dev/null +++ b/reference_scripts/w4JKuTECFmu3YmTR.js @@ -0,0 +1 @@ +return !args.skill?.name?.includes(game.i18n.localize("NAME.Ride")) \ No newline at end of file diff --git a/reference_scripts/w4zubIHP0XgMXsFe.js b/reference_scripts/w4zubIHP0XgMXsFe.js new file mode 100644 index 0000000..5a69e19 --- /dev/null +++ b/reference_scripts/w4zubIHP0XgMXsFe.js @@ -0,0 +1 @@ +return !args.options.terror && !args.extendedTest?.getFlag("wfrp4e", "fear"); \ No newline at end of file diff --git a/reference_scripts/w7K0lbxQKJ2tsc6f.js b/reference_scripts/w7K0lbxQKJ2tsc6f.js new file mode 100644 index 0000000..3ef9266 --- /dev/null +++ b/reference_scripts/w7K0lbxQKJ2tsc6f.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.EO05HX7jql0g605A") +let data = item.toObject(); +data.system.specification.value = 60 +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/wAETU6aTRr9d4oCU.js b/reference_scripts/wAETU6aTRr9d4oCU.js new file mode 100644 index 0000000..b018850 --- /dev/null +++ b/reference_scripts/wAETU6aTRr9d4oCU.js @@ -0,0 +1 @@ +args.fields.slBonus++; \ No newline at end of file diff --git a/reference_scripts/wAntJhgb8Og5vJXh.js b/reference_scripts/wAntJhgb8Og5vJXh.js new file mode 100644 index 0000000..c788e80 --- /dev/null +++ b/reference_scripts/wAntJhgb8Og5vJXh.js @@ -0,0 +1 @@ +args.options.staunchBleeding = true; \ No newline at end of file diff --git a/reference_scripts/wS6OIR3QN4mOUHn0.js b/reference_scripts/wS6OIR3QN4mOUHn0.js new file mode 100644 index 0000000..4b370e5 --- /dev/null +++ b/reference_scripts/wS6OIR3QN4mOUHn0.js @@ -0,0 +1,12 @@ +if (args.totalWoundLoss > args.actor.characteristics.t.bonus) +{ + args.actor.setupSkill(game.i18n.localize("NAME.Endurance")).then(async test => { + await test.roll() + if (test.failed) { + let disease = await fromUuid("Compendium.wfrp4e-core.items.M8XyRs9DN12XsFTQ") + disease = disease.toObject() + disease.system.duration.active = true + args.actor.createEmbeddedDocuments("Item", [disease]) + } + }) +} \ No newline at end of file diff --git a/reference_scripts/wUlYLBT59Efys5aS.js b/reference_scripts/wUlYLBT59Efys5aS.js new file mode 100644 index 0000000..ce937bf --- /dev/null +++ b/reference_scripts/wUlYLBT59Efys5aS.js @@ -0,0 +1 @@ +args.actor.addCondition("prone"); \ No newline at end of file diff --git a/reference_scripts/wbM7tpw4TxvadcWm.js b/reference_scripts/wbM7tpw4TxvadcWm.js new file mode 100644 index 0000000..88dec95 --- /dev/null +++ b/reference_scripts/wbM7tpw4TxvadcWm.js @@ -0,0 +1,19 @@ +let items = this.effect.itemTargets; +let msg = ""; +for(let item of items) +{ + if (item.system.properties.qualities.durable) + { + await item.update({"system.qualities.value" : []}); + msg += `

${item.name} loses all Qualities

` + } + else + { + msg += `

${item.name} crumbles into dust!

` + await item.update({name : item.name + " (Dust)"}) + } +} +if(msg) +{ + this.script.scriptMessage(msg); +} \ No newline at end of file diff --git a/reference_scripts/whUSkaR1yem21bXp.js b/reference_scripts/whUSkaR1yem21bXp.js new file mode 100644 index 0000000..c2c2f1b --- /dev/null +++ b/reference_scripts/whUSkaR1yem21bXp.js @@ -0,0 +1,133 @@ +let characteristics = { + "ws" : 10, + "bs" : 5, + "s" : 0, + "t" : 5, + "i" : 10, + "ag" : 0, + "dex" : 6, + "int" : -5, + "wp" : 0, + "fel" : 10 +} +let skills = ["Melee (Basic)", "Track"] +let skillAdvancements = [8, 7] +let talents = ["Berserk Charge", "Careful Strike", "Strike to Injure"] +let traits = ["Flight (8)", "Fury", "Swarm", "Tracker"] +let trappings = [] +let items = []; +let spells = []; + +let updateObj = this.actor.toObject(); + +for (let ch in characteristics) +{ + updateObj.system.characteristics[ch].modifier += characteristics[ch]; +} + +for (let index = 0; index < skills.length; index++) +{ + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } +} + +for (let talent of talents) +{ + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } +} + +const traitRegex = /(?:,?(.+?)(\+?\d{1,2}\+?)?\s*?(?:\((.+?)\)\s*(\+?\d{1,2})?|,|$))/gm +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's a specialization + let traitSpec = traitMatches[3] + + let traitItem; + try { + traitItem = await WFRP_Utility.findItem(traitName, "trait") + } + catch { } + if (!traitItem) { + ui.notifications.warn(`Could not find ${trait}`, {permanent : true}) + } + traitItem = traitItem.toObject() + + if (Number.isNumeric(traitVal)) + { + traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal; + traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim() + } + else + traitItem.system.specification.value = traitSpec + + items.push(traitItem) + +} + +for (let trapping of trappings) +{ + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + 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 += " " + this.effect.name + +await this.actor.update(updateObj) +this.actor.createEmbeddedDocuments("Item", items); + + +function equip(item) +{ + if (item.type == "armour") + item.worn = true + else if (item.type == "weapon") + item.equipped = true + else if (item.type == "trapping" && item.trappingType?.value == "clothingAccessories") + item.worn = true +} \ No newline at end of file diff --git a/reference_scripts/wsqNM4NHnwaAAQym.js b/reference_scripts/wsqNM4NHnwaAAQym.js new file mode 100644 index 0000000..a07f054 --- /dev/null +++ b/reference_scripts/wsqNM4NHnwaAAQym.js @@ -0,0 +1,11 @@ + args.applyAP = false; + + this.script.scriptNotification("This test only applies to criminals, otherwise close the dialog."); + this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => + { + await test.roll(); + if (test.failed) + { + args.actor.addCondition("unconscious"); + } + }); \ No newline at end of file diff --git a/reference_scripts/wyTCozh9qGTx6yK0.js b/reference_scripts/wyTCozh9qGTx6yK0.js new file mode 100644 index 0000000..c2afa63 --- /dev/null +++ b/reference_scripts/wyTCozh9qGTx6yK0.js @@ -0,0 +1,5 @@ +if (args.options.terror || args.extendedTest?.getFlag("wfrp4e", "fear")) +{ + args.abort = true; + this.script.scriptNotification("Does not need to make Fear or Terror tests"); +} \ No newline at end of file diff --git a/reference_scripts/wzkxiKjxVEeNS1di.js b/reference_scripts/wzkxiKjxVEeNS1di.js new file mode 100644 index 0000000..7625d68 --- /dev/null +++ b/reference_scripts/wzkxiKjxVEeNS1di.js @@ -0,0 +1,11 @@ +let roll = await new Roll("1d10").roll(); +this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true})) + +await this.actor.addCondition("deafened", 3) + +let 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"}}) +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("broken") +} \ No newline at end of file diff --git a/reference_scripts/x2RLUUNB7BiIDYCP.js b/reference_scripts/x2RLUUNB7BiIDYCP.js new file mode 100644 index 0000000..0ab5fe7 --- /dev/null +++ b/reference_scripts/x2RLUUNB7BiIDYCP.js @@ -0,0 +1,16 @@ + + 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}, skipTargets: true, appendTitle : " - Blight"}) + await test.roll(); + if (test.failed) + { + this.actor.addCondition("dead"); + } + \ No newline at end of file diff --git a/reference_scripts/x76tKw4L8dX00ikE.js b/reference_scripts/x76tKw4L8dX00ikE.js new file mode 100644 index 0000000..c98eddb --- /dev/null +++ b/reference_scripts/x76tKw4L8dX00ikE.js @@ -0,0 +1,5 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3") +let data = item.toObject(); +setProperty(data, "flags.wfrp4e.breath", "fire") +data.system.specification.value = 5 +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/x8XK2fzzXCnSwfjt.js b/reference_scripts/x8XK2fzzXCnSwfjt.js new file mode 100644 index 0000000..d42e514 --- /dev/null +++ b/reference_scripts/x8XK2fzzXCnSwfjt.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Athletics")) +await test.roll(); + +if (test.succeeded) +{ + this.actor.removeCondition("prone"); +} \ No newline at end of file diff --git a/reference_scripts/x9G6Du5EWV6byf4C.js b/reference_scripts/x9G6Du5EWV6byf4C.js new file mode 100644 index 0000000..79042f3 --- /dev/null +++ b/reference_scripts/x9G6Du5EWV6byf4C.js @@ -0,0 +1,8 @@ +if (parseInt(this.effect.sourceTest.result.SL) >= 3) +{ + this.actor.modifyWounds(this.actor.system.characteristics.t.bonus * 2) +} +else +{ + this.actor.modifyWounds(this.actor.system.characteristics.t.bonus) +} \ No newline at end of file diff --git a/reference_scripts/x9iKFYYc4Ocy8PTS.js b/reference_scripts/x9iKFYYc4Ocy8PTS.js new file mode 100644 index 0000000..9f078b6 --- /dev/null +++ b/reference_scripts/x9iKFYYc4Ocy8PTS.js @@ -0,0 +1,30 @@ +let item = this.effect.getCreatedItems()?.[0]; +ChatMessage.create({content : "Grace is beyond style", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) + +let choice = await ItemDialog.create(ItemDialog.objectToArray({ + "nobles" : "Nobles", + "guilders" : "Guilders", + "servants" : "Servants" +}), 1, "Choose Group") + +let name = choice[0]?.name + +if (!name) +{ + return; +} + +if (item) +{ + item.update({ + name : item.name.split("(")[0] + ` (${name})`, + "system.tests.value" : item.system.tests.value.split("(")[0] + ` (${name}` + }) +} +else +{ + item = await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP"); + let data = item.toObject(); + data.name += ` (${name})` + this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) +} \ No newline at end of file diff --git a/reference_scripts/xBpLQa7yBPczDMY8.js b/reference_scripts/xBpLQa7yBPczDMY8.js new file mode 100644 index 0000000..dd7547f --- /dev/null +++ b/reference_scripts/xBpLQa7yBPczDMY8.js @@ -0,0 +1,7 @@ + let scythe = (await fromUuid("Compendium.wfrp4e-core.items.CXg7XOFJwu4LZ9LM")).toObject(); + scythe.name = "Scythe of Shyish"; + scythe.system.damage.value = "WPB + 3" + scythe.system.equipped = true; + scythe.img = this.effect.icon; + scythe.system.qualities.value.push({name : "magical"}) + this.actor.createEmbeddedDocuments("Item", [scythe], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/xIRU2SaqLeWmqGDI.js b/reference_scripts/xIRU2SaqLeWmqGDI.js new file mode 100644 index 0000000..01cabd4 --- /dev/null +++ b/reference_scripts/xIRU2SaqLeWmqGDI.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.vMYEkrWj0ip6ZOdv") +let data = item.toObject(); +data.name += " (Disease)" +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/xL4S0H1RP8hhXW7c.js b/reference_scripts/xL4S0H1RP8hhXW7c.js new file mode 100644 index 0000000..7aa1d03 --- /dev/null +++ b/reference_scripts/xL4S0H1RP8hhXW7c.js @@ -0,0 +1,3 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.xneBqGOs1QS7kfUr") +let data = item.toObject(); +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/xLKAuD6yzwjAL6tJ.js b/reference_scripts/xLKAuD6yzwjAL6tJ.js new file mode 100644 index 0000000..15ad6a7 --- /dev/null +++ b/reference_scripts/xLKAuD6yzwjAL6tJ.js @@ -0,0 +1 @@ +return !args.weapon || args.weapon?.system.properties?.qualities.shield || !this.item.system.usesLocation(args.weapon) \ No newline at end of file diff --git a/reference_scripts/xMhhVol8Is3DJ3gb.js b/reference_scripts/xMhhVol8Is3DJ3gb.js new file mode 100644 index 0000000..bd75d66 --- /dev/null +++ b/reference_scripts/xMhhVol8Is3DJ3gb.js @@ -0,0 +1,5 @@ +if (this.effect.sourceTest.succeeded) +{ + let blinded = 1 + this.effect.sourceTest.result.overcast.usage.other.count + this.actor.addCondition("blinded", blinded) +} \ No newline at end of file diff --git a/reference_scripts/xPDMpOvC1ZBVxrNg.js b/reference_scripts/xPDMpOvC1ZBVxrNg.js new file mode 100644 index 0000000..40f6360 --- /dev/null +++ b/reference_scripts/xPDMpOvC1ZBVxrNg.js @@ -0,0 +1 @@ +args.fields.modifier += 10; \ No newline at end of file diff --git a/reference_scripts/xPwa3NftkpMBc2AO.js b/reference_scripts/xPwa3NftkpMBc2AO.js new file mode 100644 index 0000000..0b6eef8 --- /dev/null +++ b/reference_scripts/xPwa3NftkpMBc2AO.js @@ -0,0 +1 @@ +return !["ws", "s", "ag"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/xQ3xR2Wf0wHFa76H.js b/reference_scripts/xQ3xR2Wf0wHFa76H.js new file mode 100644 index 0000000..99df4ab --- /dev/null +++ b/reference_scripts/xQ3xR2Wf0wHFa76H.js @@ -0,0 +1 @@ +return ["ws", "bs", "fel", "dex"].includes(args.characteristic) || args.weapon \ No newline at end of file diff --git a/reference_scripts/xQnoRTHotZKrwPrx.js b/reference_scripts/xQnoRTHotZKrwPrx.js new file mode 100644 index 0000000..036d4f5 --- /dev/null +++ b/reference_scripts/xQnoRTHotZKrwPrx.js @@ -0,0 +1 @@ +return args.type == "cast" && args.item?.system.lore?.value == "shadow" \ No newline at end of file diff --git a/reference_scripts/xRTmMwNfdirjsi8X.js b/reference_scripts/xRTmMwNfdirjsi8X.js new file mode 100644 index 0000000..4a8886f --- /dev/null +++ b/reference_scripts/xRTmMwNfdirjsi8X.js @@ -0,0 +1,3 @@ +this.actor.addCondition("ablaze"); + +this.actor.applyBasicDamage(this.effect.sourceTest.result.damage) \ No newline at end of file diff --git a/reference_scripts/xRd6oA1QWLVpfoBm.js b/reference_scripts/xRd6oA1QWLVpfoBm.js new file mode 100644 index 0000000..db785fb --- /dev/null +++ b/reference_scripts/xRd6oA1QWLVpfoBm.js @@ -0,0 +1,6 @@ +if (!this.actor.has("Night Vision")) +{ + let item = await fromUuid("Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm"); + let data = item.toObject(); + this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) +} \ No newline at end of file diff --git a/reference_scripts/xS2su09zcza9du09.js b/reference_scripts/xS2su09zcza9du09.js new file mode 100644 index 0000000..592e0c2 --- /dev/null +++ b/reference_scripts/xS2su09zcza9du09.js @@ -0,0 +1,8 @@ +if (["Minor", "Moderate", "Major"].includes(this.item.system.specification.value)) +{ + return +} + +let choice = await ItemDialog.create(ItemDialog.objectToArray({minor : "Minor", moderate : "Moderate", major : "Major"}, this.item.img), 1, "Choose Corruption Severity"); + +this.item.updateSource({"system.specification.value" : choice[0]?.name || ""}) \ No newline at end of file diff --git a/reference_scripts/xUpKYT7BZCSmAfUy.js b/reference_scripts/xUpKYT7BZCSmAfUy.js new file mode 100644 index 0000000..6e013b0 --- /dev/null +++ b/reference_scripts/xUpKYT7BZCSmAfUy.js @@ -0,0 +1,10 @@ +if (this.item.system.quantity.value) +{ + this.item.system.reduceQuantity(); + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + actor.applyEffect({effectData : [this.item.effects.contents[0].convertToApplied()]}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/xYTkj8jhSVOSoLbC.js b/reference_scripts/xYTkj8jhSVOSoLbC.js new file mode 100644 index 0000000..f319a92 --- /dev/null +++ b/reference_scripts/xYTkj8jhSVOSoLbC.js @@ -0,0 +1 @@ +this.actor.flags.useless[this.item.system.location.key[0] + "Arm"] = true; \ No newline at end of file diff --git a/reference_scripts/xcy5GOUSZ0meIejZ.js b/reference_scripts/xcy5GOUSZ0meIejZ.js new file mode 100644 index 0000000..9d4ae4a --- /dev/null +++ b/reference_scripts/xcy5GOUSZ0meIejZ.js @@ -0,0 +1,4 @@ +if (args.test.isFumble) +{ + args.test.result.other.push("@Table[warp-grinder-fumble]") +} \ No newline at end of file diff --git a/reference_scripts/xgdhf0wlNP2cHIQx.js b/reference_scripts/xgdhf0wlNP2cHIQx.js new file mode 100644 index 0000000..af39144 --- /dev/null +++ b/reference_scripts/xgdhf0wlNP2cHIQx.js @@ -0,0 +1 @@ +await this.actor.addCondition("entangled", this.effect.sourceTest.result.overcast.usage.other.current) \ No newline at end of file diff --git a/reference_scripts/xgplXZMs459X7XXM.js b/reference_scripts/xgplXZMs459X7XXM.js new file mode 100644 index 0000000..af8f73d --- /dev/null +++ b/reference_scripts/xgplXZMs459X7XXM.js @@ -0,0 +1,21 @@ +// Apply changes when the mask is worn + +if (args.equipped) { + this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) + this.script.scriptMessage(`${this.actor.name} dons the ${this.item.name}.
+ They suffer –20 to all attempts to resist Disease.
+ If they wear the mask for more than an hour or benefit from any of its effects, they are exposed to @Corruption[moderate]{Moderate Corruption}. + `, + {whisper: ChatMessage.getWhisperRecipients("GM")}) +} + +// Notify of lingering effects when mask is removed +else if (!args.equipped) +{ + await this.item.effects.contents[0].delete(); + await this.item.update({name : this.item.name += " (Used)"}) + this.script.scriptMessage(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`, + {whisper: ChatMessage.getWhisperRecipients("GM")} + ) + +} diff --git a/reference_scripts/xklncIMwQIespDxS.js b/reference_scripts/xklncIMwQIespDxS.js new file mode 100644 index 0000000..3839739 --- /dev/null +++ b/reference_scripts/xklncIMwQIespDxS.js @@ -0,0 +1,8 @@ +let test = await this.actor.setupCharacteristic("t", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "vhard"}}); +await test.roll(); +game.wfrp4e.utility.postCorruptionTest("minor", this.script.getChatData()) + +if (test.failed) +{ + this.actor.addCondition("unconscious"); +} \ No newline at end of file diff --git a/reference_scripts/xnHobI9HojObLHMp.js b/reference_scripts/xnHobI9HojObLHMp.js new file mode 100644 index 0000000..0cc3ed2 --- /dev/null +++ b/reference_scripts/xnHobI9HojObLHMp.js @@ -0,0 +1,2 @@ +args.applyTB = false; +args.applyAP = false; \ No newline at end of file diff --git a/reference_scripts/xobGBJbgFjQCrwvq.js b/reference_scripts/xobGBJbgFjQCrwvq.js new file mode 100644 index 0000000..b6b5f54 --- /dev/null +++ b/reference_scripts/xobGBJbgFjQCrwvq.js @@ -0,0 +1,17 @@ +let roll; +if (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)) +{ + roll = await new Roll(`1d10 + ${this.effect.sourceTest.result.overcast.usage.other.current}`).roll() +} +else +{ + roll = await new Roll(`1d10`).roll() +} + +roll.toMessage(this.script.getChatData()) +await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}) + +if (this.actor.has("Undead") || args.actor.has("Daemonic")) +{ + this.actor.addCondition("ablaze") +} \ No newline at end of file diff --git a/reference_scripts/xpgXWoK2zDnG1uiF.js b/reference_scripts/xpgXWoK2zDnG1uiF.js new file mode 100644 index 0000000..a8a946e --- /dev/null +++ b/reference_scripts/xpgXWoK2zDnG1uiF.js @@ -0,0 +1,31 @@ +let stunned = args.actor.hasCondition("stunned") +if (stunned) + setProperty(stunned, "flags.wfrp4e.scriptData", getProperty(stunned, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog")) + +let poisoned= args.actor.hasCondition("poisoned") +if (poisoned) + setProperty(poisoned, "flags.wfrp4e.scriptData", getProperty(poisoned, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog")) + +let deafened = args.actor.hasCondition("deafened") +if (deafened) + setProperty(deafened, "flags.wfrp4e.scriptData", getProperty(deafened, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog")) + +let entangled = args.actor.hasCondition("entangled") +if (entangled) + setProperty(entangled, "flags.wfrp4e.scriptData", getProperty(entangled, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog")) + +let fatigued = args.actor.hasCondition("fatigued") +if (fatigued) + setProperty(fatigued, "flags.wfrp4e.scriptData", getProperty(fatigued, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog")) + +let blinded = args.actor.hasCondition("blinded") +if (blinded) + setProperty(blinded, "flags.wfrp4e.scriptData", getProperty(blinded, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog")) + +let broken = args.actor.hasCondition("broken") +if (broken) + setProperty(broken, "flags.wfrp4e.scriptData", getProperty(broken, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog")) + +let prone= args.actor.hasCondition("prone") +if (prone) + setProperty(prone, "flags.wfrp4e.scriptData", getProperty(prone, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog")) \ No newline at end of file diff --git a/reference_scripts/xq3RANOtmPhy77ne.js b/reference_scripts/xq3RANOtmPhy77ne.js new file mode 100644 index 0000000..b9c040f --- /dev/null +++ b/reference_scripts/xq3RANOtmPhy77ne.js @@ -0,0 +1 @@ +args.update({texture : {tint : "#FFBF00"}}); \ No newline at end of file diff --git a/reference_scripts/xqWxV9w5ezBQdJkZ.js b/reference_scripts/xqWxV9w5ezBQdJkZ.js new file mode 100644 index 0000000..452ff57 --- /dev/null +++ b/reference_scripts/xqWxV9w5ezBQdJkZ.js @@ -0,0 +1 @@ +return args.options.corruption; \ No newline at end of file diff --git a/reference_scripts/xvGxwv7X0Vq3vNqb.js b/reference_scripts/xvGxwv7X0Vq3vNqb.js new file mode 100644 index 0000000..5be0d76 --- /dev/null +++ b/reference_scripts/xvGxwv7X0Vq3vNqb.js @@ -0,0 +1 @@ +args.fields.modifier -= 10; \ No newline at end of file diff --git a/reference_scripts/xvH4PKJasHcehOZz.js b/reference_scripts/xvH4PKJasHcehOZz.js new file mode 100644 index 0000000..3149d05 --- /dev/null +++ b/reference_scripts/xvH4PKJasHcehOZz.js @@ -0,0 +1 @@ +return args.skill?.name == `${game.i18n.localize("NAME.Lore")} (${this.item.parenthesesText})` \ No newline at end of file diff --git a/reference_scripts/y3agVFVBR8tVqWyx.js b/reference_scripts/y3agVFVBR8tVqWyx.js new file mode 100644 index 0000000..687a28a --- /dev/null +++ b/reference_scripts/y3agVFVBR8tVqWyx.js @@ -0,0 +1,2 @@ +let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); +await test.roll(); \ No newline at end of file diff --git a/reference_scripts/yAL0YwZWVm8o1nxa.js b/reference_scripts/yAL0YwZWVm8o1nxa.js new file mode 100644 index 0000000..75e6cf8 --- /dev/null +++ b/reference_scripts/yAL0YwZWVm8o1nxa.js @@ -0,0 +1,6 @@ +if (this.actor.hasCondition("dead") && !this.actor.gardenOfCorpses) +{ + this.script.scriptMessage("[[3d10]] @UUID[Compendium.wfrp4e-core.actors.T79RqnDOAQLn3I1s]{zombies} spring forth from the remains.", {whisper : ChatMessage.getWhisperRecipients("GM")}) + this.actor.gardenOfCorpses = true; + // local storage is sufficient to prevent multiple messages +} \ No newline at end of file diff --git a/reference_scripts/yCgH3N9AurIiAv0i.js b/reference_scripts/yCgH3N9AurIiAv0i.js new file mode 100644 index 0000000..06aecb3 --- /dev/null +++ b/reference_scripts/yCgH3N9AurIiAv0i.js @@ -0,0 +1,29 @@ +if (!this.item.name.includes("(") || this.item.system.tests.value.includes("(Sense)")) +{ + 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("(")) + { + let sense = name.split("(")[1].split(")")[0] + tests = `${tests.split("(")[0].trim()} (${sense})`; + } + else // If no sense specified, provide dialog choice + { + let choice = await ItemDialog.create(ItemDialog.objectToArray({ + taste : "Taste", + sight : "Sight", + smell : "Smell", + hearing : "Hearing", + touch : "Touch" + }, this.item.img), 1, "Choose Sense"); + if (choice[0]) + { + name = `${name.split("(")[0].trim()} (${choice[0].name})` + tests = `${tests.split("(")[0].trim()} (${choice[0].name})` + } + } + + this.item.updateSource({name, "system.tests.value" : tests}) +} \ No newline at end of file diff --git a/reference_scripts/yDvxF9llUYwJg0sE.js b/reference_scripts/yDvxF9llUYwJg0sE.js new file mode 100644 index 0000000..54cd21a --- /dev/null +++ b/reference_scripts/yDvxF9llUYwJg0sE.js @@ -0,0 +1,22 @@ +if (getProperty(args.data, "system.loaded.value") == true) +{ + let repeaterValue = Math.ceil(CONFIG.Dice.randomUniform() * 10); + let qualities = foundry.utils.deepClone(this.item.system.qualities.value); + let repeater = qualities.find(i => i.name == "repeater") + if (repeater) + { + repeater.value = repeaterValue + } + else + { + qualities.push({name : "repeater", value : repeaterValue}) + } + setProperty(args.data, "system.loaded.amt", repeaterValue) + this.item.update({"system.qualities.value" : qualities}); + this.script.scriptNotification("Repeater " + repeaterValue); +} +else if (getProperty(args.data, "system.loaded.value") == false) +{ + let qualities = foundry.utils.deepClone(this.item.system.qualities.value).filter(i => i.name != "repeater"); + this.item.update({"system.qualities.value" : qualities}); +} \ No newline at end of file diff --git a/reference_scripts/yFMvxecXAZ6T2O0S.js b/reference_scripts/yFMvxecXAZ6T2O0S.js new file mode 100644 index 0000000..72cbdc7 --- /dev/null +++ b/reference_scripts/yFMvxecXAZ6T2O0S.js @@ -0,0 +1,9 @@ +if (args.totalWoundLoss >= 1) +{ + let roll = await new Roll("1d10").roll(); + await roll.toMessage(this.script.getChatData()); + if (roll.total == 9) + { + this.script.scriptMessage(`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")}) + } +} \ No newline at end of file diff --git a/reference_scripts/yIGItnshXI4W46cp.js b/reference_scripts/yIGItnshXI4W46cp.js new file mode 100644 index 0000000..b47bdc0 --- /dev/null +++ b/reference_scripts/yIGItnshXI4W46cp.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Charm"); \ No newline at end of file diff --git a/reference_scripts/yMMzZ7daCqRlGT3N.js b/reference_scripts/yMMzZ7daCqRlGT3N.js new file mode 100644 index 0000000..7dd1c9b --- /dev/null +++ b/reference_scripts/yMMzZ7daCqRlGT3N.js @@ -0,0 +1,5 @@ +let item = args.opposedTest.attackerTest.item; +if (!item.isMagical && (item.type == "weapon" || item.type == "trait")) +{ + args.modifiers.other.push({label : this.effect.name, details : "Remove Damage Rating", value : -1 * (args.totalWoundLoss - args.opposedTest.result.differenceSL)}) +} diff --git a/reference_scripts/yPxYRObUiqAIhlNB.js b/reference_scripts/yPxYRObUiqAIhlNB.js new file mode 100644 index 0000000..9ec5719 --- /dev/null +++ b/reference_scripts/yPxYRObUiqAIhlNB.js @@ -0,0 +1 @@ +this.actor.system.status.encumbrance.max += 1 \ No newline at end of file diff --git a/reference_scripts/yRRzSKlcN3L7rEEe.js b/reference_scripts/yRRzSKlcN3L7rEEe.js new file mode 100644 index 0000000..d94075f --- /dev/null +++ b/reference_scripts/yRRzSKlcN3L7rEEe.js @@ -0,0 +1 @@ +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")); \ No newline at end of file diff --git a/reference_scripts/yTmRoUstxHMso91c.js b/reference_scripts/yTmRoUstxHMso91c.js new file mode 100644 index 0000000..9dcd76f --- /dev/null +++ b/reference_scripts/yTmRoUstxHMso91c.js @@ -0,0 +1,4 @@ +if (args.item.name == "Magic Resistance" && args.item.type == "trait") +{ + args.item.system.specification.value = Number(args.item.system.specification.value) + 1 +} \ No newline at end of file diff --git a/reference_scripts/yXUPiWuQ5o0JBY4i.js b/reference_scripts/yXUPiWuQ5o0JBY4i.js new file mode 100644 index 0000000..ea57de2 --- /dev/null +++ b/reference_scripts/yXUPiWuQ5o0JBY4i.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("Endurance") || args.characteristic == "int" \ No newline at end of file diff --git a/reference_scripts/yatUu0cd7iKs50rq.js b/reference_scripts/yatUu0cd7iKs50rq.js new file mode 100644 index 0000000..0230e54 --- /dev/null +++ b/reference_scripts/yatUu0cd7iKs50rq.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Track"); \ No newline at end of file diff --git a/reference_scripts/ybxDG2ezvRx02LYx.js b/reference_scripts/ybxDG2ezvRx02LYx.js new file mode 100644 index 0000000..e78b8b3 --- /dev/null +++ b/reference_scripts/ybxDG2ezvRx02LYx.js @@ -0,0 +1 @@ +return !args.options.corruption \ No newline at end of file diff --git a/reference_scripts/ynNCBAYwJFkTiXV1.js b/reference_scripts/ynNCBAYwJFkTiXV1.js new file mode 100644 index 0000000..6008a15 --- /dev/null +++ b/reference_scripts/ynNCBAYwJFkTiXV1.js @@ -0,0 +1 @@ +this.actor.system.status.addArmour(4, {source : this.effect}) \ No newline at end of file diff --git a/reference_scripts/ynV7tz0OdCwlsQp6.js b/reference_scripts/ynV7tz0OdCwlsQp6.js new file mode 100644 index 0000000..bceeeae --- /dev/null +++ b/reference_scripts/ynV7tz0OdCwlsQp6.js @@ -0,0 +1,6 @@ +let msg = "" +msg += `

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

` +msg += `

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

` +msg += `

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

` + +this.script.scriptMessage(msg); \ No newline at end of file diff --git a/reference_scripts/ynoHNXXCGRS6fTqF.js b/reference_scripts/ynoHNXXCGRS6fTqF.js new file mode 100644 index 0000000..9c5e860 --- /dev/null +++ b/reference_scripts/ynoHNXXCGRS6fTqF.js @@ -0,0 +1,26 @@ +let msg = "" + +let i_gain = (await new Roll("1d10").roll()).total + +if (args.actor.characteristics.i.value <= 0) +{ + i_gain += (await new Roll("2d10").roll()).total +} + +msg = `${this.actor.prototypeToken.name} gains ${i_gain} Initiative` + +let newValue = i_gain + args.actor.characteristics.i.modifier + +this.actor.update({"system.characteristics.i.modifier" : newValue}) + + +let hitloc = await game.wfrp4e.tables.rollTable("hitloc") + +let value = hitloc.result +let desc = hitloc.description + +this.effect.updateSource({"flags.wfrp4e.location" : value}) + +msg += ` as eyes push out of their ${desc}` + +this.script.scriptMessage(msg) \ No newline at end of file diff --git a/reference_scripts/yzN7ZNlgCiSVJqsU.js b/reference_scripts/yzN7ZNlgCiSVJqsU.js new file mode 100644 index 0000000..ac583fa --- /dev/null +++ b/reference_scripts/yzN7ZNlgCiSVJqsU.js @@ -0,0 +1,7 @@ +let sourceItem = this.effect.sourceItem; + +if (sourceItem) +{ + this.actor.applyEffect({effectUuids : [sourceItem.effects.contents[1].uuid]}) + this.script.scriptNotification("Applied after effects"); +} \ No newline at end of file diff --git a/reference_scripts/z5HfNUrHy5MS3K7a.js b/reference_scripts/z5HfNUrHy5MS3K7a.js new file mode 100644 index 0000000..e635110 --- /dev/null +++ b/reference_scripts/z5HfNUrHy5MS3K7a.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: "1 Corruption Point Gained"}}) +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.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/reference_scripts/z926Cl2vxUfyLY0V.js b/reference_scripts/z926Cl2vxUfyLY0V.js new file mode 100644 index 0000000..accff96 --- /dev/null +++ b/reference_scripts/z926Cl2vxUfyLY0V.js @@ -0,0 +1,4 @@ +if (!["rArm", "lArm"].includes(this.effect.getFlag("wfrp4e", "location"))) + return true + +return ["fel", "wp", "int", "t"].includes(args.characteristic) \ No newline at end of file diff --git a/reference_scripts/z9NEbIUBsKMaTuCz.js b/reference_scripts/z9NEbIUBsKMaTuCz.js new file mode 100644 index 0000000..144e2e4 --- /dev/null +++ b/reference_scripts/z9NEbIUBsKMaTuCz.js @@ -0,0 +1,4 @@ +if (args.opposedTest.result.hitloc && args.opposedTest.result.hitloc.value == "head") +{ + args.actor.addCondition("entangled") +} \ No newline at end of file diff --git a/reference_scripts/zA6TDttpwMSMl7D8.js b/reference_scripts/zA6TDttpwMSMl7D8.js new file mode 100644 index 0000000..898b642 --- /dev/null +++ b/reference_scripts/zA6TDttpwMSMl7D8.js @@ -0,0 +1,14 @@ +// An imbiber must take a Consume Alcohol Test. +this.actor.setupSkill(game.i18n.localize("NAME.ConsumeAlcohol"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => { + await test.roll() + // If they succeed, + // as a result of whatever potential futures they glimpse, + // they can spend a Fortune Point within the next hour to reverse the dice of any failed Test. + if (test.succeeded) { + this.script.scriptMessage(`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.`, + { + whisper: ChatMessage.getWhisperRecipients("GM"), + blind: true + }) + } +}) \ No newline at end of file diff --git a/reference_scripts/zBHTIBU8OlYj1YIO.js b/reference_scripts/zBHTIBU8OlYj1YIO.js new file mode 100644 index 0000000..36139f8 --- /dev/null +++ b/reference_scripts/zBHTIBU8OlYj1YIO.js @@ -0,0 +1 @@ +args.fields.modifier += this.effect.sourceActor?.system.characteristics.wp.value; \ No newline at end of file diff --git a/reference_scripts/zFYCaGR0wbFWjl4T.js b/reference_scripts/zFYCaGR0wbFWjl4T.js new file mode 100644 index 0000000..fbb0202 --- /dev/null +++ b/reference_scripts/zFYCaGR0wbFWjl4T.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.OutdoorSurvival"); \ No newline at end of file diff --git a/reference_scripts/zK38Rl5t9zbFi4Se.js b/reference_scripts/zK38Rl5t9zbFi4Se.js new file mode 100644 index 0000000..029af27 --- /dev/null +++ b/reference_scripts/zK38Rl5t9zbFi4Se.js @@ -0,0 +1,5 @@ +if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) +{ + args.actor.addCondition("bleeding", 1); + this.script.scriptNotification("Added Bleeding") +} \ No newline at end of file diff --git a/reference_scripts/zR4WAjzXHTZuiu5G.js b/reference_scripts/zR4WAjzXHTZuiu5G.js new file mode 100644 index 0000000..a366058 --- /dev/null +++ b/reference_scripts/zR4WAjzXHTZuiu5G.js @@ -0,0 +1,52 @@ +let actor = this.actor; + let effect = this.effect; + let bleedingAmt; + let bleedingRoll; + let msg = "" + + let damage = effect.conditionValue; + let scriptArgs = {msg, damage}; + await Promise.all(actor.runScripts("preApplyCondition", {effect, data : scriptArgs})) + msg = scriptArgs.msg; + damage = scriptArgs.damage; + msg += await actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, minimumOne : false, suppressMsg : true}) + + if (actor.status.wounds.value == 0 && !actor.hasCondition("unconscious")) + { + await actor.addCondition("unconscious") + msg += "
" + game.i18n.format("BleedUnc", {name: actor.prototypeToken.name }) + } + + if (actor.hasCondition("unconscious")) + { + bleedingAmt = effect.conditionValue; + bleedingRoll = (await new Roll("1d100").roll()).total; + if (bleedingRoll <= bleedingAmt * 10) + { + msg += "
" + game.i18n.format("BleedFail", {name: actor.prototypeToken.name}) + " (" + game.i18n.localize("Rolled") + " " + bleedingRoll + ")"; + await actor.addCondition("dead") + } + else if (bleedingRoll % 11 == 0) + { + msg += "
" + game.i18n.format("BleedCrit", { name: actor.prototypeToken.name } ) + " (" + game.i18n.localize("Rolled") + bleedingRoll + ")" + await actor.removeCondition("bleeding") + } + else + { + msg += "
" + game.i18n.localize("BleedRoll") + ": " + bleedingRoll; + } + } + + await Promise.all(actor.runScripts("applyCondition", {effect, data : {bleedingRoll}})) + if (args.suppressMessage) + { + let messageData = game.wfrp4e.utility.chatDataSetup(msg); + messageData.speaker = {alias: this.effect.name} + messageData.flavor = this.effect.name; + return messageData + } + else + { + return this.script.scriptMessage(msg) + } + \ No newline at end of file diff --git a/reference_scripts/zUv9e0A3OEXWY9Mv.js b/reference_scripts/zUv9e0A3OEXWY9Mv.js new file mode 100644 index 0000000..c8b1c93 --- /dev/null +++ b/reference_scripts/zUv9e0A3OEXWY9Mv.js @@ -0,0 +1,4 @@ +let item = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv") +let data = item.toObject(); +data.system.specification.value = 9 - this.actor.system.characteristics.s.bonus +this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/reference_scripts/zY4ZjY7uyKIKMYmX.js b/reference_scripts/zY4ZjY7uyKIKMYmX.js new file mode 100644 index 0000000..10f3700 --- /dev/null +++ b/reference_scripts/zY4ZjY7uyKIKMYmX.js @@ -0,0 +1,8 @@ +this.script.scriptMessage(await game.wfrp4e.tables.formatChatRoll("fleshy-curse")) + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}}) +await test.roll(); +if (test.succeeded) +{ + this.effect.delete() +} \ No newline at end of file diff --git a/reference_scripts/zadppy7FEbXvgUON.js b/reference_scripts/zadppy7FEbXvgUON.js new file mode 100644 index 0000000..8b87ec9 --- /dev/null +++ b/reference_scripts/zadppy7FEbXvgUON.js @@ -0,0 +1,84 @@ + let characteristics = { + "ws" : 5, + "bs" : 0, + "s" : 0, + "t" : 0, + "i" : 0, + "ag" : 10, + "dex" : 10, + "int" : 0, + "wp" : 0, + "fel" : 5 + } + let skills = ["Perception", "Sleight of Hand", "Stealth (Urban)"] + let skillAdvancements = [10, 10, 10] + let talents = ["Criminal", "Etiquette (Criminals)"] + let trappings = ["Rope, 10 yards", "Lockpick", "Mask"] + let items = [] + + let updateObj = this.actor.toObject(); + + for (let ch in characteristics) + { + updateObj.system.characteristics[ch].modifier += characteristics[ch]; + } + + for (let index = 0; index < skills.length; index++) + { + let skill = skills[index] + let skillItem; + 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(skill) + skillItem = skillItem.toObject(); + skillItem.system.advances.value = skillAdvancements[index]; + items.push(skillItem); + } + } + + for (let talent of talents) + { + let talentItem = await game.wfrp4e.utility.findTalent(talent) + if (talentItem) + { + items.push(talentItem.toObject()); + } + else + { + ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + } + } + + for (let trapping of trappings) + { + let trappingItem = await game.wfrp4e.utility.findItem(trapping) + if (trappingItem) + { + trappingItem = trappingItem.toObject() + + equip(trappingItem) + + items.push(trappingItem); + } + else + { + ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + } + } + + + await this.actor.update(updateObj) + this.actor.createEmbeddedDocuments("Item", items); + + function equip(item) + { + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true + } \ No newline at end of file diff --git a/reference_scripts/zi8Z3NlwVj3IfgAW.js b/reference_scripts/zi8Z3NlwVj3IfgAW.js new file mode 100644 index 0000000..70c5434 --- /dev/null +++ b/reference_scripts/zi8Z3NlwVj3IfgAW.js @@ -0,0 +1,10 @@ +if (this.item.system.quantity.value) +{ + this.item.system.reduceQuantity(); + let actor = Array.from(game.user.targets)[0]?.actor || this.actor; + actor.applyEffect({effectData : [this.item.effects.contents[3].convertToApplied()]}) +} +else +{ + this.script.scriptNotification("None left!", "error") +} \ No newline at end of file diff --git a/reference_scripts/ziG9H5Kdb7xC3dFE.js b/reference_scripts/ziG9H5Kdb7xC3dFE.js new file mode 100644 index 0000000..3d360af --- /dev/null +++ b/reference_scripts/ziG9H5Kdb7xC3dFE.js @@ -0,0 +1 @@ +return !args.skill?.name.includes(game.i18n.localize("NAME.Art")); \ No newline at end of file diff --git a/reference_scripts/zk44dFEGkylB7kW6.js b/reference_scripts/zk44dFEGkylB7kW6.js new file mode 100644 index 0000000..f1d1ccd --- /dev/null +++ b/reference_scripts/zk44dFEGkylB7kW6.js @@ -0,0 +1,9 @@ + let modifier; let target = args.data.targets[0] + if (target.actor.details.size.value == "tiny") + modifier = 30 + if (target.actor.details.size.value == "ltl") + modifier = 20 + if (target.actor.details.size.value == "sml") + modifier = 10 + + args.fields.modifier += (modifier || 0); // Offset size modifier \ No newline at end of file diff --git a/reference_scripts/zphxI8VSWbNQCMBy.js b/reference_scripts/zphxI8VSWbNQCMBy.js new file mode 100644 index 0000000..1034c1b --- /dev/null +++ b/reference_scripts/zphxI8VSWbNQCMBy.js @@ -0,0 +1 @@ +args.size = "lrg" \ No newline at end of file diff --git a/reference_scripts/zqShIJnrRReGgP94.js b/reference_scripts/zqShIJnrRReGgP94.js new file mode 100644 index 0000000..bddd877 --- /dev/null +++ b/reference_scripts/zqShIJnrRReGgP94.js @@ -0,0 +1,15 @@ +let {added, removed} = this.effect.getFlag("wfrp4e", "propertiesChanged"); + +for(let property of (added || [])) +{ + let hasValue = game.wfrp4e.config.propertyHasValue[property]; + if (!args.item.system.qualities.value.find(i => i.name == property)) + { + args.item.system.qualities.value.push({name : property, value : (hasValue ? 2 : null)}) + } +} + +for(let property of (removed || [])) +{ + args.item.system.flaws.value = args.item.system.flaws.value.filter(i => i.name != property) +} \ No newline at end of file diff --git a/reference_scripts/zsiV6XEHlCNGLLPl.js b/reference_scripts/zsiV6XEHlCNGLLPl.js new file mode 100644 index 0000000..8911fdc --- /dev/null +++ b/reference_scripts/zsiV6XEHlCNGLLPl.js @@ -0,0 +1 @@ +return args.skill?.name == game.i18n.localize("NAME.SetTrap"); \ No newline at end of file diff --git a/reference_scripts/zsoTVkHe4nHY1M52.js b/reference_scripts/zsoTVkHe4nHY1M52.js new file mode 100644 index 0000000..c227411 --- /dev/null +++ b/reference_scripts/zsoTVkHe4nHY1M52.js @@ -0,0 +1 @@ +this.script.scriptMessage(await this.actor.applyBasicDamage(10 + parseInt(this.effect.sourceTest.result.SL), {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP})) \ No newline at end of file diff --git a/reference_scripts/zzk2uRSFjFHB5kjw.js b/reference_scripts/zzk2uRSFjFHB5kjw.js new file mode 100644 index 0000000..df8f9a1 --- /dev/null +++ b/reference_scripts/zzk2uRSFjFHB5kjw.js @@ -0,0 +1,9 @@ + + let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10) + if (args.test.isFumble && roll == 1 && !args.test.result.misfire) + { + args.test.result.misfire = game.i18n.localize("Misfire") + " (Rolled 1)" + args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage) + } + else if (args.test.isFumble && roll != 1) + args.test.result.other.push("Misfire Roll: " + roll) \ No newline at end of file diff --git a/scripts/OGX4BneaYAnV25TO.js b/scripts/OGX4BneaYAnV25TO.js index 7e752b3..f7f1a66 100644 --- a/scripts/OGX4BneaYAnV25TO.js +++ b/scripts/OGX4BneaYAnV25TO.js @@ -15,25 +15,25 @@ if (wounds.value > 0) { wounds.value = wounds.max } - message += `${this.actor.name} regains ${regen} Wounds.` + message += `${this.actor.name} récupère ${regen} Blessures.` if (regen == 10) { - message += `
Additionally, they regenerate a Critical Wound.` - } + message += `
En plus, il guérit d'une Blessure Critique.` +B } } else if (regen >= 8) { - message += `${this.actor.name} rolled a ${regen} and regains 1 Wound.` + message += `${this.actor.name} résultat de ${regen} et récupère 1 Blessure.` wounds.value += 1 if (regen == 10) { - message += `
Additionally, they regenerate a Critical Wound.` + message += `
En plus, il guérit d'une Blessure Critique.` } } else { - message += `${this.actor.name} Regenerate roll of ${regen} - No effect.` + message += `${this.actor.name} Résultat de ${regen} - Aucun effet.` } await this.actor.update({ "system.status.wounds": wounds }) diff --git a/scripts/OicQSEVZBbqLtrcf.js b/scripts/OicQSEVZBbqLtrcf.js index 796995b..7d35048 100644 --- a/scripts/OicQSEVZBbqLtrcf.js +++ b/scripts/OicQSEVZBbqLtrcf.js @@ -1,4 +1,4 @@ -let choice = await ItemDialog.create(this.actor.itemTypes.critical, (this.effect.sourceTest.result.overcast.usage.other.current || 1), "Choose the Critical Wounds to heal (cannot reattach body parts)") +let choice = await ItemDialog.create(this.actor.itemTypes.critical, (this.effect.sourceTest.result.overcast.usage.other.current || 1), "Choisissez la Blessure Critique à soigner (ne peut guérir les membres perdus)") -this.script.scriptMessage(`Healed ${choice.map(i => i.name).join(`, `)}`); +this.script.scriptMessage(`Guéri de ${choice.map(i => i.name).join(`, `)}`); this.actor.deleteEmbeddedDocuments("Item", choice.map(i => i.id)) \ No newline at end of file diff --git a/scripts/Op88kMtimSEWlY2h.js b/scripts/Op88kMtimSEWlY2h.js index 3fd9036..9f485ca 100644 --- a/scripts/Op88kMtimSEWlY2h.js +++ b/scripts/Op88kMtimSEWlY2h.js @@ -6,5 +6,5 @@ if (this.item.system.quantity.value) } else { - this.script.scriptNotification("None left!", "error") + this.script.scriptNotification("Aucun disponible!", "error") } \ No newline at end of file diff --git a/scripts/OqLKL0PiCvYH2QxW.js b/scripts/OqLKL0PiCvYH2QxW.js index 1641e71..a7317d8 100644 --- a/scripts/OqLKL0PiCvYH2QxW.js +++ b/scripts/OqLKL0PiCvYH2QxW.js @@ -8,6 +8,6 @@ if (args.test.options.wallcrawler) args.test.result.description = game.i18n.localize("ROLL.MarginalSuccess"); } args.test.result.outcome = "success" - args.test.result.other.push(`${this.effect.name}: Minimum +0 SL`) + args.test.result.other.push(`${this.effect.name}: Minimum +0 DR`) } } \ No newline at end of file diff --git a/scripts/OxsBnnVI3Smpknpb.js b/scripts/OxsBnnVI3Smpknpb.js index 519a2a2..dabe09c 100644 --- a/scripts/OxsBnnVI3Smpknpb.js +++ b/scripts/OxsBnnVI3Smpknpb.js @@ -1,5 +1,5 @@ if (this.actor.status.advantage.value && !this.actor.sameSideAs(this.effect.sourceActor)) { this.actor.modifyAdvantage(-1); - this.script.scriptNotification(`${this.actor.name} loses 1 Advantage`); + this.script.scriptNotification(`${this.actor.name} perd 1 Avantage`); } \ No newline at end of file diff --git a/scripts/PMISUsaEDBA7D3od.js b/scripts/PMISUsaEDBA7D3od.js index d9cd2ce..f8ce04c 100644 --- a/scripts/PMISUsaEDBA7D3od.js +++ b/scripts/PMISUsaEDBA7D3od.js @@ -1,7 +1,7 @@ // After consumption, the user gains the Magic Resistance 3 Creature Trait, // reducing the SL of any spell affecting it by 3. // This effect lasts for one hour. -const hasMagicResistance = this.actor.has("Magic Resistance") +const hasMagicResistance = this.actor.has("Résistance à la Magie") if (hasMagicResistance === undefined) { fromUuid("Compendium.wfrp4e-core.items.yrkI7ATjqLPDTFmZ").then(trait => { @@ -9,12 +9,12 @@ if (hasMagicResistance === undefined) { traitItem.system.specification.value = 2 this.actor.createEmbeddedDocuments("Item", [traitItem], {fromEffect: this.effect.id}) }) - this.script.scriptMessage(`

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

`, {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) + this.script.scriptMessage(`

${this.actor.prototypeToken.name} bénéficie du Trait Résistance à la Magie. Cet effet dure 1 heure.

`, {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) } if (hasMagicResistance) { // 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. - 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.

` + let msg = `

${this.actor.prototypeToken.name} a amélioré sa Résistance à la Magie de 1 pour atteindre ${parseInt(hasMagicResistance.system.specification.value)}. Cette effte dure 1 heure.

` // Resist toxic effect this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { @@ -24,8 +24,8 @@ if (hasMagicResistance) { // If they fail ... if (!test.succeeded) { - 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.

-

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.

` + msg += `

Cependant, il commence à suinter la bave épaisse et venimeuse qui recouvre chaque Dreadmaw. Il reçoit 1 état Empoisonné et doit continuer à recevoir 1 état @Condition[Empoisonné] andà la fin de chaque round.

+

Si le personnage est toujours vivant à la fin de 10 rounds, les effets cessent et tout les états Empoisonnés dues à ${this.effect.name} sont supprimés.

` this.actor.addCondition("poisoned", 1) } this.script.scriptMessage(msg, {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) diff --git a/scripts/PVjaKAHTKDA0rA9J.js b/scripts/PVjaKAHTKDA0rA9J.js index 8942127..3406d92 100644 --- a/scripts/PVjaKAHTKDA0rA9J.js +++ b/scripts/PVjaKAHTKDA0rA9J.js @@ -1,2 +1,2 @@ -let test = await this.actor.setupSkill("Dodge", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); +let test = await this.actor.setupSkill("Esquive", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); await test.roll(); \ No newline at end of file diff --git a/scripts/PeZYj8b0vedyJj00.js b/scripts/PeZYj8b0vedyJj00.js index 51a0a44..a176c19 100644 --- a/scripts/PeZYj8b0vedyJj00.js +++ b/scripts/PeZYj8b0vedyJj00.js @@ -1,12 +1,12 @@ // This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor let mainEffect = this.item.effects.contents[0]; -if (mainEffect.name.includes("(Lore)")) +if (mainEffect.name.includes("(Savoir)")) { - let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choose Lore"); + let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choisissez le Savoir"); if (choice.length) { - mainEffect.update({name : mainEffect.name.replace("Lore", choice[0].name)}) + mainEffect.update({name : mainEffect.name.replace("Savoir", choice[0].name)}) this.item.update({name : this.item.name += ` (${choice[0].name})`}) } } diff --git a/scripts/Ph3TdQw1lGiFr049.js b/scripts/Ph3TdQw1lGiFr049.js index f7e4852..a75ea45 100644 --- a/scripts/Ph3TdQw1lGiFr049.js +++ b/scripts/Ph3TdQw1lGiFr049.js @@ -2,10 +2,10 @@ (this.actor.isOpposing || args.test.context.defending) && args.test.result.roll % 11 == 0 && args.test.succeeded && - ["Language (Magick)", "Dodge"].includes(args.test.item?.name)) + ["Langue (Magick)", "Esquive"].includes(args.test.item?.name)) { args.test.context.phantasmal = true; // Flag so items aren't readded if test is edited - let text = `${this.effect.name}: Adding Unstable and Ward` + let text = `${this.effect.name}: Ajout de Instable et Protection` args.test.result.other.push(text) this.script.scriptNotification(text); diff --git a/scripts/PwqTmw7rsG8hzqCS.js b/scripts/PwqTmw7rsG8hzqCS.js index 6ce47bf..a4d2b43 100644 --- a/scripts/PwqTmw7rsG8hzqCS.js +++ b/scripts/PwqTmw7rsG8hzqCS.js @@ -3,7 +3,7 @@ if (args.test.result.critical && args.test.result.roll % 10 == 0) game.wfrp4e.tables.findTable("knuckleduster-diseases").roll().then(roll => { let results = roll.results[0] - this.script.scriptMessage(`${this.actor.name} contracts @UUID[Compendium.${results.documentCollection}.${results.documentId}]{${results.text}}`, {blind : true, whisper: ChatMessage.getWhisperRecipients("GM") }) + this.script.scriptMessage(`${this.actor.name} subit @UUID[Compendium.${results.documentCollection}.${results.documentId}]{${results.text}}`, {blind : true, whisper: ChatMessage.getWhisperRecipients("GM") }) }) } diff --git a/scripts/Q4EQgP4gZR8TTm7S.js b/scripts/Q4EQgP4gZR8TTm7S.js index 2ae696c..b38c7fa 100644 --- a/scripts/Q4EQgP4gZR8TTm7S.js +++ b/scripts/Q4EQgP4gZR8TTm7S.js @@ -3,7 +3,7 @@ if (args.item?.system.attackType) { penalty -= 30 } -if (args.actor.has("Second Sight", "talent")) +if (args.actor.has("Seconde Vue", "talent")) penalty += 10 args.prefillModifiers.modifier += penalty \ No newline at end of file diff --git a/scripts/Q68WiUWY7GxiXBbT.js b/scripts/Q68WiUWY7GxiXBbT.js index 536d1ae..9883f8c 100644 --- a/scripts/Q68WiUWY7GxiXBbT.js +++ b/scripts/Q68WiUWY7GxiXBbT.js @@ -1,5 +1,5 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.9GNpAqgsKzxZKJpp") let data = item.toObject(); -data.system.specification.value = "When Alone"; +data.system.specification.value = "Lorsque seul"; data.effects[0].disabled = true; this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/QRSACifDrvojIXHB.js b/scripts/QRSACifDrvojIXHB.js index 0527702..e475e62 100644 --- a/scripts/QRSACifDrvojIXHB.js +++ b/scripts/QRSACifDrvojIXHB.js @@ -1,9 +1,9 @@ if (!this.actor.effects.find(e => e.isCondition)) { - return this.script.scriptNotification("No Conditions on this Actor") + return this.script.scriptNotification("Aucun état sur cet Acteur") } -let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choose a Condition") +let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choisissez un état") if (choice[0]) { diff --git a/scripts/Qgn92fZyc3Psn8QJ.js b/scripts/Qgn92fZyc3Psn8QJ.js index fcfd3fd..315a269 100644 --- a/scripts/Qgn92fZyc3Psn8QJ.js +++ b/scripts/Qgn92fZyc3Psn8QJ.js @@ -4,7 +4,8 @@ if (args.test.options.useOnesAttractive && (args.test.result.roll <= game.settin let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) 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.result.other.push(`${this.effect.name}: Used unit dice as SL`) +if (ones > SL) { + args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus) + args.test.result.other.push(`${this.effect.name}: Utilise le dé d'unité comme DR`) + } } \ No newline at end of file diff --git a/scripts/QoEOxRruQXYrZrv3.js b/scripts/QoEOxRruQXYrZrv3.js index c084829..fca8751 100644 --- a/scripts/QoEOxRruQXYrZrv3.js +++ b/scripts/QoEOxRruQXYrZrv3.js @@ -10,7 +10,7 @@ let filters = [ } ] -let items = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 2, "Choose 2 Skills to add +20") +let items = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 2, "Choisissez 2 Compétences pour y ajouter +20") items = items.map(i => i.toObject()) items.forEach(i => i.system.advances.value = 20) diff --git a/scripts/QwHoqu2oO8QO8Mad.js b/scripts/QwHoqu2oO8QO8Mad.js index a5972f6..084a8f6 100644 --- a/scripts/QwHoqu2oO8QO8Mad.js +++ b/scripts/QwHoqu2oO8QO8Mad.js @@ -1,3 +1,3 @@ -let content = `${this.effect.name}: All targets engaged with ${this.actor.prototypeToken.name} take [[/r 1d10]] Damage, modified by TB and AP.` +let content = `${this.effect.name}: Toute les cibles au contact abec ${this.actor.prototypeToken.name} subissent [[/r 1d10]] dégats, modifiés par le BE et les PA.` this.script.scriptMessage(content) \ No newline at end of file diff --git a/scripts/R32U01LBjBrK1pns.js b/scripts/R32U01LBjBrK1pns.js index 4816313..793479c 100644 --- a/scripts/R32U01LBjBrK1pns.js +++ b/scripts/R32U01LBjBrK1pns.js @@ -18,9 +18,9 @@ let bio = `

Template: ${template.text}

-

Phsyical Quirk: ${physicalQuirk}

-

Work Ethic: ${workEthic}

-

Personality Quirk: ${personalityQuirk}

+

Bizarrerie Physique: ${physicalQuirk}

+

Etique de travail: ${workEthic}

+

Bizarrerie de personnalité: ${personalityQuirk}

` this.script.scriptMessage(bio, {whisper : ChatMessage.getWhisperRecipients("GM")}) diff --git a/scripts/RDtJXji3hgcKnEBk.js b/scripts/RDtJXji3hgcKnEBk.js index 84cd8d9..e557c94 100644 --- a/scripts/RDtJXji3hgcKnEBk.js +++ b/scripts/RDtJXji3hgcKnEBk.js @@ -3,7 +3,7 @@ let hv = (await fromUuid("Compendium.wfrp4e-core.items.Item.Nj3tC8A5fZ3zEdMR")). let ms = (await fromUuid("Compendium.wfrp4e-core.items.Item.6w30u0VPsAicrqb5")).toObject(); let ss = (await fromUuid("Compendium.wfrp4e-core.items.Item.OEjUvJKi0xmBwbS2")).toObject(); -as.name += " (Sight)"; +as.name += " (Vue)"; let roll = (await new Roll("1d10").roll()); roll.toMessage(this.script.getChatData()) diff --git a/scripts/RHyBLYT5oHf7EPnG.js b/scripts/RHyBLYT5oHf7EPnG.js index 0eeaadd..99ec6ac 100644 --- a/scripts/RHyBLYT5oHf7EPnG.js +++ b/scripts/RHyBLYT5oHf7EPnG.js @@ -1,6 +1,6 @@ let skills = this.actor.itemTypes.skill.filter(i => i.name.includes(game.i18n.localize("NAME.Melee"))) -let skill = await ItemDialog.create(skills, 1, "Select the skill used by the weapon") +let skill = await ItemDialog.create(skills, 1, "Sélectionnez la compétence à utiliser avec l'arme") let group = game.wfrp4e.utility.extractParenthesesText(skill[0]?.name) let groupKey = game.wfrp4e.utility.findKey(group, game.wfrp4e.config.weaponGroups) @@ -18,4 +18,4 @@ let weapon = { } Item.implementation.create(foundry.utils.expandObject(weapon), {parent : this.actor, fromEffect : this.effect.id}) -this.script.scriptNotification("Item created. Further customization must be done manually within the Item's sheet"); \ No newline at end of file +this.script.scriptNotification("Item créé. Les modifications supplémentaires doivent être réalisées manuellement sur la fiche de l'objet."); \ No newline at end of file diff --git a/scripts/RKIFGN583PQnqHGk.js b/scripts/RKIFGN583PQnqHGk.js index c0633f0..223f490 100644 --- a/scripts/RKIFGN583PQnqHGk.js +++ b/scripts/RKIFGN583PQnqHGk.js @@ -1,5 +1,5 @@ if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 2) - this.script.scriptMessage("Gained 2 Bleeding Conditions") + this.script.scriptMessage("Ajout de 2 état Hémorragiques") } \ No newline at end of file diff --git a/scripts/ROXCqAFSTLouJniL.js b/scripts/ROXCqAFSTLouJniL.js index dcc969a..979b433 100644 --- a/scripts/ROXCqAFSTLouJniL.js +++ b/scripts/ROXCqAFSTLouJniL.js @@ -2,6 +2,6 @@ if (args.test.spell.name == "Warp Lightning") { if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis) { - this.script.scriptMessage(`${this.item.name} Overloads!`) + this.script.scriptMessage(`${this.item.name} Surcharge!`) } } \ No newline at end of file diff --git a/scripts/RSsGiDFibuqg3sHr.js b/scripts/RSsGiDFibuqg3sHr.js index 9132550..af0157e 100644 --- a/scripts/RSsGiDFibuqg3sHr.js +++ b/scripts/RSsGiDFibuqg3sHr.js @@ -7,7 +7,7 @@ let diseaseIndex = game.packs return i }) -let choice = await ItemDialog.create(diseaseIndex , 1, "Choose a Disease") +let choice = await ItemDialog.create(diseaseIndex , 1, "Choisissez une maladie") if (choice[0]) { diff --git a/scripts/RrchOMpEdIvceJxl.js b/scripts/RrchOMpEdIvceJxl.js index 300050b..b1d1cc8 100644 --- a/scripts/RrchOMpEdIvceJxl.js +++ b/scripts/RrchOMpEdIvceJxl.js @@ -1 +1 @@ -return args.skill?.name == "Stealth (Rural)" \ No newline at end of file +return args.skill?.name == "Discrétion (Rurale)" \ No newline at end of file diff --git a/scripts/RvipIYj9H7n4UDMe.js b/scripts/RvipIYj9H7n4UDMe.js index 4ae90e5..1beaef4 100644 --- a/scripts/RvipIYj9H7n4UDMe.js +++ b/scripts/RvipIYj9H7n4UDMe.js @@ -48,7 +48,7 @@ } else { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) } } @@ -65,7 +65,7 @@ } else { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true}) } } diff --git a/scripts/S1QihXuvdEVzeRtB.js b/scripts/S1QihXuvdEVzeRtB.js index 0194c09..dd7235c 100644 --- a/scripts/S1QihXuvdEVzeRtB.js +++ b/scripts/S1QihXuvdEVzeRtB.js @@ -27,7 +27,7 @@ else if (roll = 10) modifier = -5 } -message = `${roll} Rolled, gain ${item.name}, ${modifier} Strength` +message = `Résultat de ${roll}, gagnez ${item.name}, ${modifier} en Force` dice.toMessage(this.script.getChatData()) let changes = duplicate(this.effect.changes) diff --git a/scripts/S3Dev4hleOYqDNe9.js b/scripts/S3Dev4hleOYqDNe9.js index 82a4f59..c014e56 100644 --- a/scripts/S3Dev4hleOYqDNe9.js +++ b/scripts/S3Dev4hleOYqDNe9.js @@ -7,10 +7,10 @@ if (args.test.options.healWounds) { wounds = this.actor.characteristics.int.bonus + Math.min(1, Number(args.test.result.SL)) } args.test.result.woundsHealed = wounds - args.test.result.other.push(`${this.actor.name} healed ${wounds} wounds of the patient.`) + args.test.result.other.push(`${this.actor.name} guérit ${wounds} Points de Blessures du patient.`) } else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0) { - args.test.result.other.push(`The patient contracts a @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Minor Infection}.`) + args.test.result.other.push(`Le patient subit une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`) } } \ No newline at end of file diff --git a/scripts/SGr50Hq1AHIEzIFN.js b/scripts/SGr50Hq1AHIEzIFN.js index 324b7a2..0b6d374 100644 --- a/scripts/SGr50Hq1AHIEzIFN.js +++ b/scripts/SGr50Hq1AHIEzIFN.js @@ -1,6 +1,6 @@ let choice = await ItemDialog.create(ItemDialog.objectToArray({ int : game.wfrp4e.config.characteristics.int, fel : game.wfrp4e.config.characteristics.fel -}, this.effect.img), 1, "Choose Characteristic"); +}, this.effect.img), 1, "Choisissez une caractéristique"); this.effect.updateSource({"flags.wfrp4e.characteristic" : choice[0].id}) \ No newline at end of file diff --git a/scripts/T5fiTzhXEQAv9Drf.js b/scripts/T5fiTzhXEQAv9Drf.js index 536b32a..b4d5c21 100644 --- a/scripts/T5fiTzhXEQAv9Drf.js +++ b/scripts/T5fiTzhXEQAv9Drf.js @@ -11,7 +11,7 @@ if (location) if (dropped.length) { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + this.script.scriptNotification(`Laché ${dropped.map(i => i.name).join(", ")}!`) for(let weapon of dropped) { await weapon.system.toggleEquip(); diff --git a/scripts/TAw9vXnfyIAl5DGs.js b/scripts/TAw9vXnfyIAl5DGs.js index c6062cd..587a05a 100644 --- a/scripts/TAw9vXnfyIAl5DGs.js +++ b/scripts/TAw9vXnfyIAl5DGs.js @@ -7,5 +7,5 @@ if (this.item.system.quantity.value) } else { - this.script.scriptNotification("None left!", "error") + this.script.scriptNotification("Quantité insuffisante!", "error") } \ No newline at end of file diff --git a/scripts/TBpNFRL5uehs0fze.js b/scripts/TBpNFRL5uehs0fze.js index be5a2fb..974d619 100644 --- a/scripts/TBpNFRL5uehs0fze.js +++ b/scripts/TBpNFRL5uehs0fze.js @@ -6,5 +6,5 @@ if (this.item.system.quantity.value) } else { - this.script.scriptNotification("None left!", "error") + this.script.scriptNotification("Quantité insuffisante!", "error") } \ No newline at end of file diff --git a/scripts/TwgdEucxcHloc4cX.js b/scripts/TwgdEucxcHloc4cX.js index 325d158..08c7bb0 100644 --- a/scripts/TwgdEucxcHloc4cX.js +++ b/scripts/TwgdEucxcHloc4cX.js @@ -1,135 +1,129 @@ let choice1 = [ - { - type : "armour", - name : "Mail Chausses" - }, - { - type : "armour", - name : "Mail Coat" - }, - { - type : "armour", - name : "Mail Coif" - }, + { + type: "armour", + name: "Chausses de Mailles" + }, + { + type: "armour", + name: "Cotte de Mailles" + }, + { + type: "armour", + name: "Coiffe de Mailles" + }, ] let choice2 = [ - { - type : "armour", - name : "Mail Chausses" - }, - { - type : "armour", - name : "Mail Coat" - }, - { - type : "armour", - name : "Mail Coif" - }, - { - type : "armour", - name : "Leather Leggings" - }, - { - type : "armour", - name : "Leather Skullcap" - }, - { - type : "armour", - name : "Leather Jack" - }, + { + type: "armour", + name: "Chausses de Mailles" + }, + { + type: "armour", + name: "Cotte de Mailles" + }, + { + type: "armour", + name: "Coiffe de Mailles" + }, + { + type: "armour", + name: "Jambières de Cuir" + }, + { + type: "armour", + name: "Calotte de Cuir" + }, + { + type: "armour", + name: "Veste de Cuir" + }, ] let choice3 = [ - { - type : "armour", - name : "Plate Breastplate" - }, - { - type : "armour", - name : "Plate Bracers" - }, - { - type : "armour", - name : "Plate Helm" - }, - { - type : "armour", - name : "Plate Leggings" - }, + { + type: "armour", + name: "Plastron d'acier" + }, + { + type: "armour", + name: "Brassards" + }, + { + type: "armour", + name: "Heaume" + }, + { + type: "armour", + name: "Jambières d'acier" + }, ] let choice = await new Promise((resolve, reject) => { - new Dialog({ - title : "Choice", - content : - `

- Select your choice + new Dialog({ + title: "Choix", + content: + `

+ Selectionnez votre choix

    -
  1. Mail
  2. -
  3. Mail & Leather
  4. -
  5. Plate
  6. +
  7. Mailles
  8. +
  9. Mailles & Cuir
  10. +
  11. Plates
`, - buttons : { - 1 : { - label : "Mail", - callback : () => { - resolve(choice1) - } - }, - 2 : { - label : "Mail & Leather", - callback : () => { - resolve(choice2) - } - }, - 3 : { - label : "Plate", - callback : () => { - resolve(choice3) - } - } + buttons: { + 1: { + label: "Mailles", + callback: () => { + resolve(choice1) } - }).render(true) -}) + }, + 2: { + label: "Mailles & Cuir", + callback: () => { + resolve(choice2) + } + }, + 3: { + label: "Plates", + callback: () => { + resolve(choice3) + } + } + } + }).render(true) +}) let updateObj = this.actor.toObject(); let items = [] -for (let c of choice) -{ - let existing - if (c.type == "skill") - { - existing = updateObj.items.find(i => i.name == c.name && i.type == c.type) - if (existing && c.diff?.system?.advances?.value) - { - existing.system.advances.value += c.diff.system.advances.value - } +for (let c of choice) { + let existing + if (c.type == "skill") { + existing = updateObj.items.find(i => i.name == c.name && i.type == c.type) + if (existing && c.diff?.system?.advances?.value) { + existing.system.advances.value += c.diff.system.advances.value } + } - if (!existing) - { - let item = await game.wfrp4e.utility.find(c.name, c.type) - if (item) - { - item = item.toObject() - equip(item); - items.push(mergeObject(item, (c.diff || {}))) - } - else - ui.notifications.warn(`Could not find ${c.name}`, {permanent : true}) + if (!existing) { + let item = await game.wfrp4e.utility.find(c.name, c.type) + if (item) { + item = item.toObject() + equip(item); + items.push(mergeObject(item, (c.diff || {}))) } + else + ui.notifications.warn(`Impossible de trouver ${c.name}`, { permanent: true }) + } } await this.actor.update(updateObj) this.actor.createEmbeddedDocuments("Item", items); -function equip(item) -{ - if (item.type == "armour") - item.system.worn.value = true - else if (item.type == "weapon") - item.system.equipped = true - else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") - item.system.worn = true +function equip(item) { + if (item.type == "armour") + item.system.worn.value = true + else if (item.type == "weapon") + item.system.equipped = true + else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories") + item.system.worn = true } \ No newline at end of file diff --git a/scripts/U1UpSRJOSjPpO4HS.js b/scripts/U1UpSRJOSjPpO4HS.js index e0bdcd1..39df8a1 100644 --- a/scripts/U1UpSRJOSjPpO4HS.js +++ b/scripts/U1UpSRJOSjPpO4HS.js @@ -1,4 +1,4 @@ -let mutations = await game.wfrp4e.utility.findAll("mutation", "Loading Mutations") +let mutations = await game.wfrp4e.utility.findAll("mutation", "Chargement des mutations") let roll = Math.floor(CONFIG.Dice.randomUniform() * mutations.length); this.actor.createEmbeddedDocuments("Item", [mutations[roll]]); -this.script.scriptNotification(`Added ${mutations[roll].name}`) \ No newline at end of file +this.script.scriptNotification(`Ajout ${mutations[roll].name}`) \ No newline at end of file diff --git a/scripts/U26XMie3Kjoddisj.js b/scripts/U26XMie3Kjoddisj.js index 6b2b8bd..35d406e 100644 --- a/scripts/U26XMie3Kjoddisj.js +++ b/scripts/U26XMie3Kjoddisj.js @@ -1,10 +1,10 @@ let stunned = this.actor.hasCondition("stunned") if (stunned) { - this.script.scriptNotification(`Cleared 1 Stunned Condition`) + this.script.scriptNotification(`Suppression de 1 état Assomé`) this.actor.removeCondition("stunned"); } else { - this.script.scriptNotification(`No Stunned Conditions`) + this.script.scriptNotification(`Aucun état Assomé`) } \ No newline at end of file diff --git a/scripts/U4A8FDNmwBGTuQZO.js b/scripts/U4A8FDNmwBGTuQZO.js index 8e8a337..7fbb187 100644 --- a/scripts/U4A8FDNmwBGTuQZO.js +++ b/scripts/U4A8FDNmwBGTuQZO.js @@ -1,5 +1,5 @@ -if (args.attacker.has("Undead") && !args.attacker.has("Ethereal")) +if (args.attacker.has("Mort-vivant") && !args.attacker.has("Ethéré")) { args.totalWoundLoss = Math.floor(args.totalWoundLoss / 2) - args.modifiers.other.push({label : this.effect.name, details : "Halved", value : "× 0.5"}) + args.modifiers.other.push({label : this.effect.name, details : "Divisé par deux", value : "× 0.5"}) } \ No newline at end of file diff --git a/scripts/U9xh2wriSqCosugW.js b/scripts/U9xh2wriSqCosugW.js index 5770437..b76aedc 100644 --- a/scripts/U9xh2wriSqCosugW.js +++ b/scripts/U9xh2wriSqCosugW.js @@ -8,6 +8,6 @@ if (args.test.options.stag) args.test.result.description = game.i18n.localize("ROLL.MarginalSuccess"); } args.test.result.outcome = "success" - args.test.result.other.push(`${this.effect.name}: Minimum +0 SL`) + args.test.result.other.push(`${this.effect.name}: Minimum +0 DR`) } } \ No newline at end of file diff --git a/scripts/ULmZMLezDamerN04.js b/scripts/ULmZMLezDamerN04.js index a8fefdb..64d6d01 100644 --- a/scripts/ULmZMLezDamerN04.js +++ b/scripts/ULmZMLezDamerN04.js @@ -1,16 +1,16 @@ -let spells = await game.wfrp4e.utility.findAll("spell", "Loading Spells") +let spells = await game.wfrp4e.utility.findAll("spell", "Chargement des sorts") let lore = (await game.wfrp4e.tables.rollTable("random-caster", {hideDSN: true})).text this.script.scriptNotification(lore) -if (lore == "GM's Choice") { +if (lore == "Au choix") { return } -else if (lore == "Arcane Magic") { +else if (lore == "Magie des Arcanes") { lore = "Arcane" } -else if (lore == "Petty Magic") { +else if (lore == "Magie Mineure ") { lore = "petty" } diff --git a/scripts/UTlgF4azrGQZsoDv.js b/scripts/UTlgF4azrGQZsoDv.js index 052e2d2..bd64ba5 100644 --- a/scripts/UTlgF4azrGQZsoDv.js +++ b/scripts/UTlgF4azrGQZsoDv.js @@ -1,2 +1,2 @@ -const talents = await Promise.all(["Ambidextrous", "Distract"].map(game.wfrp4e.utility.findTalent)) +const talents = await Promise.all(["Ambidextre", "Distraire"].map(game.wfrp4e.utility.findTalent)) this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/UaImulhbPURkLJg2.js b/scripts/UaImulhbPURkLJg2.js index 77d2ab5..d045f97 100644 --- a/scripts/UaImulhbPURkLJg2.js +++ b/scripts/UaImulhbPURkLJg2.js @@ -1 +1 @@ -return this.actor.attacker && (args.skill?.name.includes("Melee (Basic)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic")) \ No newline at end of file +return this.actor.attacker && (args.skill?.name.includes("Corps à corps (Bas)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic")) \ No newline at end of file diff --git a/scripts/UgQW0UMPOZ0jwfVJ.js b/scripts/UgQW0UMPOZ0jwfVJ.js index 3dc1a6d..8cce56a 100644 --- a/scripts/UgQW0UMPOZ0jwfVJ.js +++ b/scripts/UgQW0UMPOZ0jwfVJ.js @@ -2,4 +2,4 @@ let current = this.actor.status.fortune.value this.actor.update({"system.status.fortune.value" : 1 + current}) -this.script.scriptMessage(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${1 + current}`) \ No newline at end of file +this.script.scriptMessage(`${this.actor.prototypeToken.name} voit ses Points de Chance augmenter de ${current} à ${1 + current}`) \ No newline at end of file diff --git a/scripts/UnqnWi0dZYLf5fTT.js b/scripts/UnqnWi0dZYLf5fTT.js index e5dd8a6..ea1aec2 100644 --- a/scripts/UnqnWi0dZYLf5fTT.js +++ b/scripts/UnqnWi0dZYLf5fTT.js @@ -1,89 +1,89 @@ let choice1 = [ { type : "armour", - name : "Mail Chausses" + name : "Chausses de Mailles" }, { type : "armour", - name : "Mail Coat" + name : "Cotte de Mailles" }, { type : "armour", - name : "Mail Coif" + name : "Coiffe de Mailles" }, ] let choice2 = [ - { + { + type : "armour", + name : "Chausses de Mailles" +}, +{ + type : "armour", + name : "Cotte de Mailles" +}, +{ + type : "armour", + name : "Coiffe de Mailles" +}, +{ type : "armour", - name : "Mail Chausses" + name : "Jambières de Cuir" }, { type : "armour", - name : "Mail Coat" + name : "Calotte de Cuir" }, { type : "armour", - name : "Mail Coif" - }, - { - type : "armour", - name : "Leather Leggings" - }, - { - type : "armour", - name : "Leather Skullcap" - }, - { - type : "armour", - name : "Leather Jack" + name : "Veste de Cuir" }, ] let choice3 = [ { type : "armour", - name : "Plate Breastplate" + name : "Plastron d'acier" }, { type : "armour", - name : "Plate Bracers" + name : "Brassards" }, { type : "armour", - name : "Plate Helm" + name : "Heaume" }, { type : "armour", - name : "Plate Leggings" + name : "Jambières d'acier" }, ] let choice = await Dialog.wait({ - title : "Choice", + title : "Choix", content : `

- Select your choice + Sélectionnez votre choix

    -
  1. Mail
  2. -
  3. Mail & Leather
  4. -
  5. Plate
  6. +
  7. Mailles
  8. +
  9. Mailles & Cuir
  10. +
  11. Plates
`, buttons : { 1 : { - label : "Mail", + label : "Mailles", callback : () => { return choice1 } }, 2 : { - label : "Mail & Leather", + label : "Mailles & Cuir", callback : () => { return choice2 } }, 3 : { - label : "Plate", + label : "Plates", callback : () => { return choice3 } @@ -115,7 +115,7 @@ for (let c of choice) items.push(mergeObject(item, (c.diff || {}))) } else - ui.notifications.warn(`Could not find ${c.name}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${c.name}`, {permanent : true}) } } diff --git a/scripts/V1D2Uo3WDKYQePU3.js b/scripts/V1D2Uo3WDKYQePU3.js index cab27a0..ad0163b 100644 --- a/scripts/V1D2Uo3WDKYQePU3.js +++ b/scripts/V1D2Uo3WDKYQePU3.js @@ -10,5 +10,5 @@ let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at locatio damage -= (APused + this.actor.system.characteristics.t.bonus) let msg = await this.actor.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL}); -msg += ` (ignored ${metalAP} metal AP on ${game.wfrp4e.config.locations[loc]})` +msg += ` (ignore ${metalAP} PA métalliques sur ${game.wfrp4e.config.locations[loc]})` this.script.scriptMessage(msg) diff --git a/scripts/V9wD9FWHWxZUOGSI.js b/scripts/V9wD9FWHWxZUOGSI.js index c0e2cb8..382037e 100644 --- a/scripts/V9wD9FWHWxZUOGSI.js +++ b/scripts/V9wD9FWHWxZUOGSI.js @@ -4,12 +4,12 @@ roll.toMessage(this.script.getChatData()); if (fatigued > this.actor.characteristics.wp.bonus) { this.actor.addCondition("unconscious") - this.script.scriptNotification(`Fell Unconscious`) + this.script.scriptNotification(`Tombe Incoscient`) } else { fatigued = Math.max(0, fatigued) if (fatigued) this.actor.addCondition("fatigued", fatigued) - this.script.scriptNotification(`Gained ${fatigued} conditions`) + this.script.scriptNotification(`Subit ${fatigued} état Fatigué`) } \ No newline at end of file diff --git a/scripts/V9xm4X1x3lPYTQaI.js b/scripts/V9xm4X1x3lPYTQaI.js index 200cae7..549adb9 100644 --- a/scripts/V9xm4X1x3lPYTQaI.js +++ b/scripts/V9xm4X1x3lPYTQaI.js @@ -1,6 +1,6 @@ if (args.extendedTest?.getFlag("wfrp4e", "fear")) { - this.script.scriptNotification("Immune to Fear"); + this.script.scriptNotification("Immunisé à la Peur"); args.extendedTest.delete(); args.abort = true; } \ No newline at end of file diff --git a/scripts/V9zm2hKUVLVZtAcN.js b/scripts/V9zm2hKUVLVZtAcN.js index f0c1db7..c376d84 100644 --- a/scripts/V9zm2hKUVLVZtAcN.js +++ b/scripts/V9zm2hKUVLVZtAcN.js @@ -10,13 +10,13 @@ let characteristics = { "wp" : 10, "fel" : 10 } -let skills = ["Charm", "Channelling", "Entertain (Prophecy)", "Intuition"] +let skills = ["Charme", "Focalisation", "Divertissement (Prophecie)", "Intuition"] let skillAdvancements = [0, 0, 20, 10] -let talents = ["Detect Artefact", "Menacing", "Sixth Sense"] -let traits = ["Dooming", "Spellcaster (Lore of Life)", "Ward"] +let talents = ["Détection d’artefact", "Menaçant", "Sixième Sens"] +let traits = ["Destinée", "Lanceur de sorts (Domaine de la Vie)", "Protection"] let trappings = [] let items = []; -let spells = ["Forest of Thorns"]; +let spells = ["Forêt d'épines"]; let updateObj = this.actor.toObject(); @@ -50,7 +50,7 @@ for (let talent of talents) } else { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) } } @@ -68,13 +68,13 @@ for (let trait of traits) } catch { } if (!traitItem) { - ui.notifications.warn(`Could not find ${trait}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${trait}`, {permanent : true}) } traitItem = traitItem.toObject() if (Number.isNumeric(traitVal)) { - traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? 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 diff --git a/scripts/VNOKTzCrFbZ6PJUj.js b/scripts/VNOKTzCrFbZ6PJUj.js index ab82da5..0674596 100644 --- a/scripts/VNOKTzCrFbZ6PJUj.js +++ b/scripts/VNOKTzCrFbZ6PJUj.js @@ -1 +1 @@ -return !["Charm Animal", "Endurance", "Outdoor Survival"].includes(args.skill?.name) \ No newline at end of file +return !["Emprise sur les animaux", "Résistance", "Survie en extérieur"].includes(args.skill?.name) \ No newline at end of file diff --git a/scripts/VbL0TgaBAmYjrezZ.js b/scripts/VbL0TgaBAmYjrezZ.js index eb99900..2f61494 100644 --- a/scripts/VbL0TgaBAmYjrezZ.js +++ b/scripts/VbL0TgaBAmYjrezZ.js @@ -1,2 +1,2 @@ -const talents = await Promise.all(["Hardy"].map(game.wfrp4e.utility.findTalent)) +const talents = await Promise.all(["Dur à cuire"].map(game.wfrp4e.utility.findTalent)) this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/VlFUDaKUYoBYKYn0.js b/scripts/VlFUDaKUYoBYKYn0.js index 9c3af2a..b75c5c1 100644 --- a/scripts/VlFUDaKUYoBYKYn0.js +++ b/scripts/VlFUDaKUYoBYKYn0.js @@ -3,5 +3,5 @@ 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.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) + this.script.scriptMessage("Gain d'1 Point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")}) } \ No newline at end of file diff --git a/scripts/VqTrKPtxv9hpn0Hr.js b/scripts/VqTrKPtxv9hpn0Hr.js index f63598a..c785745 100644 --- a/scripts/VqTrKPtxv9hpn0Hr.js +++ b/scripts/VqTrKPtxv9hpn0Hr.js @@ -1 +1 @@ -return args.skill?.name != "Language (Magick)" \ No newline at end of file +return args.skill?.name != "Langue (Magick)" \ No newline at end of file diff --git a/scripts/VzO0ZDcTWvaBn4vm.js b/scripts/VzO0ZDcTWvaBn4vm.js index ab2caf1..22bb444 100644 --- a/scripts/VzO0ZDcTWvaBn4vm.js +++ b/scripts/VzO0ZDcTWvaBn4vm.js @@ -8,6 +8,6 @@ if (args.test.preData.skillName?.includes(game.i18n.localize("NAME.Language")) | args.test.result.description = game.i18n.localize("ROLL.MarginalFailure"); } args.test.result.outcome = "failure" - args.test.result.other.push(`${this.effect.name}: Maximum -0 SL`) + args.test.result.other.push(`${this.effect.name}: Maximum -0 DR`) } } \ No newline at end of file diff --git a/scripts/W9nyUNQStMr1pUHJ.js b/scripts/W9nyUNQStMr1pUHJ.js index 8a0c850..9e2119c 100644 --- a/scripts/W9nyUNQStMr1pUHJ.js +++ b/scripts/W9nyUNQStMr1pUHJ.js @@ -1,5 +1,5 @@ if (args.opposedTest.result.hitloc.value == this.item.system.location.key) { args.actor.addCondition("bleeding", 1); - this.script.scriptNotification("Added Bleeding") -} \ No newline at end of file + this.script.scriptNotification("Ajout de Hémorragique"); +} diff --git a/scripts/WB6sIpLEPC8YPX67.js b/scripts/WB6sIpLEPC8YPX67.js index 48584b2..2c65a63 100644 --- a/scripts/WB6sIpLEPC8YPX67.js +++ b/scripts/WB6sIpLEPC8YPX67.js @@ -1,6 +1,6 @@ if (args.options.dodge) { args.abort = true; - this.script.scriptNotification("Cannot Dodge!") + this.script.scriptNotification("Ne peut pas esquiver!") } return ["t", "int", "wp", "fel"].includes(args.characteristic) \ No newline at end of file diff --git a/scripts/WO5n7Vbx8AgoVrwC.js b/scripts/WO5n7Vbx8AgoVrwC.js index 18d9585..5b1294e 100644 --- a/scripts/WO5n7Vbx8AgoVrwC.js +++ b/scripts/WO5n7Vbx8AgoVrwC.js @@ -10,10 +10,10 @@ "wp" : 5, "fel" : 5 } - let skills = ["Intuition", "Lore (Local)", "Perception"] + let skills = ["Intuition", "Savoir (Local)", "Perception"] let skillAdvancements = [10, 10, 10] let talents = [] - let trappings = ["Mail Coat", "Mail Chausses", "Mail Coif", "Hand Weapon"] + let trappings = ["Cotte de Mailles", "Chausses de Mailles", "Coiffe de Mailles", "Arme simple"] let items = [] let updateObj = this.actor.toObject(); @@ -48,7 +48,7 @@ } else { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) } } @@ -65,7 +65,7 @@ } else { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true}) } } diff --git a/scripts/WiYtNU2Y5BJfIpeM.js b/scripts/WiYtNU2Y5BJfIpeM.js index 837c65a..3af96fd 100644 --- a/scripts/WiYtNU2Y5BJfIpeM.js +++ b/scripts/WiYtNU2Y5BJfIpeM.js @@ -6,7 +6,7 @@ if (location) if (dropped.length) { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + this.script.scriptNotification(`Lache ${dropped.map(i => i.name).join(", ")}!`) for(let weapon of dropped) { await weapon.system.toggleEquip(); diff --git a/scripts/XO9m2AvFRAAeEuty.js b/scripts/XO9m2AvFRAAeEuty.js index 67412d0..1f60a0f 100644 --- a/scripts/XO9m2AvFRAAeEuty.js +++ b/scripts/XO9m2AvFRAAeEuty.js @@ -1,5 +1,5 @@ if (args.test.options.fieldDressing && args.test.result.reversed) { args.test.data.result.SL = "+" + Math.min(1, Number(args.test.data.result.SL)) - args.test.result.other.push(`${this.effect.name}: SL limited to 1`) + args.test.result.other.push(`${this.effect.name}: DR limité à 1`) } \ No newline at end of file diff --git a/scripts/XcvDYNZgJ2rpAdDV.js b/scripts/XcvDYNZgJ2rpAdDV.js index ba3519f..407b12a 100644 --- a/scripts/XcvDYNZgJ2rpAdDV.js +++ b/scripts/XcvDYNZgJ2rpAdDV.js @@ -1,7 +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 +let fatigued = this.actor.hasCondition("fatigued") +if (!fatigued) { + this.actor.addCondition("fatigued") + ui.notifications.notify("Etat Fatigué ajouté à " + this.actor.name + " qui ne peut être enlevé tant que le symptôme de Malaise est présent.") +} \ No newline at end of file diff --git a/scripts/Xe8ijqWU3bbtq7ZY.js b/scripts/Xe8ijqWU3bbtq7ZY.js index f232698..86ba86b 100644 --- a/scripts/Xe8ijqWU3bbtq7ZY.js +++ b/scripts/Xe8ijqWU3bbtq7ZY.js @@ -1,5 +1,5 @@ if (args.opposedTest.defenderTest.actor.Species.toLowerCase().includes("skaven")) { args.addImpact = true; - args.opposedTest.result.other.push("Impact against Skaven") + args.opposedTest.result.other.push("Impact contre les Skavens") } \ No newline at end of file diff --git a/scripts/Y8J66v8VTKUASGuK.js b/scripts/Y8J66v8VTKUASGuK.js index 956a94a..db00064 100644 --- a/scripts/Y8J66v8VTKUASGuK.js +++ b/scripts/Y8J66v8VTKUASGuK.js @@ -1,9 +1,9 @@ if (!this.actor.effects.find(e => e.isCondition)) { - return this.script.scriptNotification("No Conditions on this Actor") + return this.script.scriptNotification("Aucun état sur cet acteur") } -let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choose a Condition") +let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choisissez un état") if (choice[0]) { diff --git a/scripts/YDqpKJVy8ijEKdLX.js b/scripts/YDqpKJVy8ijEKdLX.js index 3cc93cf..8038377 100644 --- a/scripts/YDqpKJVy8ijEKdLX.js +++ b/scripts/YDqpKJVy8ijEKdLX.js @@ -1 +1 @@ -return !(this.actor.attacker && (args.skill?.name.includes("Melee (Basic)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic"))) \ No newline at end of file +return !(this.actor.attacker && (args.skill?.name.includes("Corps à corps (Base)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic"))) \ No newline at end of file diff --git a/scripts/YQ2LnLxp0xgy3meI.js b/scripts/YQ2LnLxp0xgy3meI.js index 8fe36d5..64fbd33 100644 --- a/scripts/YQ2LnLxp0xgy3meI.js +++ b/scripts/YQ2LnLxp0xgy3meI.js @@ -1,3 +1,3 @@ if (args.test.preData.options?.corruption && args.test.failed) { - args.test?.result?.other.push("Gain additional +1 Corruption from " + this.effect.name) + args.test?.result?.other.push("Reçoit 1 Point de Corruption de " + this.effect.name) } \ No newline at end of file diff --git a/scripts/YRUTliBzAQvncGNX.js b/scripts/YRUTliBzAQvncGNX.js index c29c046..3018f09 100644 --- a/scripts/YRUTliBzAQvncGNX.js +++ b/scripts/YRUTliBzAQvncGNX.js @@ -1,2 +1,2 @@ this.actor.addCondition("fatigued"); -this.script.scriptNotification("Added Fatigued") \ No newline at end of file +this.script.scriptNotification("Ajout de Fatigué") \ No newline at end of file diff --git a/scripts/YaKnYEbmmZZtByJc.js b/scripts/YaKnYEbmmZZtByJc.js index 65dd7e3..fd78e57 100644 --- a/scripts/YaKnYEbmmZZtByJc.js +++ b/scripts/YaKnYEbmmZZtByJc.js @@ -1,5 +1,5 @@ if (args.opposedTest.attackerTest.options.ballockKnife) { args.weaponProperties.impale = true; - args.extraMessages.push(`${this.item.name}: Impale Added`) + args.extraMessages.push(`${this.item.name}: Ajout de Empalement`) } \ No newline at end of file diff --git a/scripts/YwLEw4BiKq4EMy57.js b/scripts/YwLEw4BiKq4EMy57.js index 277a43a..b354f07 100644 --- a/scripts/YwLEw4BiKq4EMy57.js +++ b/scripts/YwLEw4BiKq4EMy57.js @@ -5,10 +5,10 @@ if (args.actor.characteristics.fel.value <= 0) fel_gain += (await new Roll("2d10").roll()).total } -let msg = `${this.actor.prototypeToken.name} gains ${i_gain} Intelligence` +let msg = `${this.actor.prototypeToken.name} gagne ${i_gain} en Intelligence` if (fel_gain) - msg += ` and ${fel_gain} Fellowship` + msg += ` et ${fel_gain} en Sociabilité` let newInt = i_gain + args.actor.characteristics.int.modifier diff --git a/scripts/Z52yZDm6lP6fOP3O.js b/scripts/Z52yZDm6lP6fOP3O.js index 07e9c66..ecede41 100644 --- a/scripts/Z52yZDm6lP6fOP3O.js +++ b/scripts/Z52yZDm6lP6fOP3O.js @@ -1,6 +1,6 @@ let ablaze = this.actor.hasCondition("ablaze") if (ablaze) { - this.script.scriptNotification("Immune to Ablaze"); + this.script.scriptNotification("Immunisé à En Flammes"); ablaze.delete() } \ No newline at end of file diff --git a/scripts/Z6OmmC0irJzxSnMH.js b/scripts/Z6OmmC0irJzxSnMH.js index 83bc8f3..a7d2b34 100644 --- a/scripts/Z6OmmC0irJzxSnMH.js +++ b/scripts/Z6OmmC0irJzxSnMH.js @@ -15,20 +15,20 @@ if (wounds.value > 0) { wounds.value = wounds.max } - message += `${this.actor.name} regains ${regen} Wounds.` + message += `${this.actor.name} guérit de ${regen} Points de Blessure.` if (regen == 10) { - message += `
Additionally, they regenerate a Critical Wound.` + message += `
De plus, il guérit d'une Blessure Critique.` } } else if (regen >= 8) { - message += `${this.actor.name} rolled a ${regen} and regains 1 Wound.` + message += `${this.actor.name} a obtenu un ${regen} et guérit 1 Point de Blessure.` wounds.value += 1 if (regen == 10) { - message += `
Additionally, they regenerate a Critical Wound.` + message += `
De plus, il guérit d'une Blessure Critique.` } } else diff --git a/scripts/Z6jNlyZMECkW4Hon.js b/scripts/Z6jNlyZMECkW4Hon.js index e9b08d4..5374de2 100644 --- a/scripts/Z6jNlyZMECkW4Hon.js +++ b/scripts/Z6jNlyZMECkW4Hon.js @@ -1,13 +1,13 @@ -let spells = await game.wfrp4e.utility.findAll("spell", "Loading Spells", true); +let spells = await game.wfrp4e.utility.findAll("spell", "Chargement des sorts", true); let choice = await ItemDialog.create(spells, 1); if (choice[0]) { - this.script.scriptMessage(`Chose @UUID[${choice[0].uuid}]{${choice[0].name}}`) + this.script.scriptMessage(`Choisir @UUID[${choice[0].uuid}]{${choice[0].name}}`) let spell = (await fromUuid(choice[0].uuid)).toObject(); // Might be an index so retrieve item object for sure setProperty(spell, "flags.wfrp4e.boonOfTzeentch", true); - spell.system.wind.value = "Channelling (Dhar)"; + spell.system.wind.value = "Focalisation (Dhar)"; spell.system.memorized.value = true; this.actor.createEmbeddedDocuments("Item", [spell], {fromEffect: this.effect.id}) } \ No newline at end of file diff --git a/scripts/ZCuOjLAeENKN1Q4L.js b/scripts/ZCuOjLAeENKN1Q4L.js index 88928db..315c53d 100644 --- a/scripts/ZCuOjLAeENKN1Q4L.js +++ b/scripts/ZCuOjLAeENKN1Q4L.js @@ -1,7 +1,7 @@ let halve; if (args.opposedTest.attackerTest.item?.type != "spell") { - halve = await Dialog.confirm({title : this.effect.name, content : "Halve Damage? (Halves Damage from all fire)"}) + halve = await Dialog.confirm({title : this.effect.name, content : "Diviser les Dégâts? (Divise les dégats de Feu)"}) } else { @@ -11,5 +11,5 @@ else if (halve) { args.totalWoundLoss /= 2; - args.modifiers.other.push({label : this.effect.name, details : "Halved", value : "× 0.5"}) + args.modifiers.other.push({label : this.effect.name, details : "Divisé", value : "× 0.5"}) } \ No newline at end of file diff --git a/scripts/ZNW3ubbKIYXAyE48.js b/scripts/ZNW3ubbKIYXAyE48.js index 8669753..7ed4b06 100644 --- a/scripts/ZNW3ubbKIYXAyE48.js +++ b/scripts/ZNW3ubbKIYXAyE48.js @@ -1,8 +1,8 @@ -let wounds = this.actor.itemTypes.disease.filter(i => i.name == "Festering Wound" && i.system.duration.active); +let wounds = this.actor.itemTypes.disease.filter(i => i.name == "Blessure Purulente" && i.system.duration.active); let selected; if (wounds.length == 0) { - return this.script.scriptNotification("No Festering Wounds!"); + return this.script.scriptNotification("Aucune Blessure Purulente!"); } else if (wounds.length == 1) { @@ -23,7 +23,7 @@ if (selected) if (SL >= 0) { selected.update({"system.duration.value" : selected.system.duration.value - SL}) - this.script.scriptMessage(`${selected.name} duration reduced by ${SL}!`) + this.script.scriptMessage(`${selected.name} durée réduite de ${SL}!`) } } } \ No newline at end of file diff --git a/scripts/ZNu4B0OdjkM9lmtu.js b/scripts/ZNu4B0OdjkM9lmtu.js index 2177c29..45b796e 100644 --- a/scripts/ZNu4B0OdjkM9lmtu.js +++ b/scripts/ZNu4B0OdjkM9lmtu.js @@ -1,4 +1,4 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS") let data = item.toObject(); -data.name = data.name += " (Vision)" +data.name = data.name += " (Vue)" this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/Ze9E2zR1GFGWGMVH.js b/scripts/Ze9E2zR1GFGWGMVH.js index 1cc8e6f..1550f81 100644 --- a/scripts/Ze9E2zR1GFGWGMVH.js +++ b/scripts/Ze9E2zR1GFGWGMVH.js @@ -1 +1 @@ -return ["Pick Lock", "Sleight of Hand", "Channelling (Ulgu)"].includes(args.skill?.name) \ No newline at end of file +return ["Crochetage", "Escamotage", "Focalisation (Ulgu)"].includes(args.skill?.name) \ No newline at end of file diff --git a/scripts/oPg4se8iQRD14kmB.js b/scripts/oPg4se8iQRD14kmB.js index a61008d..d1d3012 100644 --- a/scripts/oPg4se8iQRD14kmB.js +++ b/scripts/oPg4se8iQRD14kmB.js @@ -9,7 +9,7 @@ let filters = [ } ] -let items = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 1, "Choose an appropriate Polearm or Two-Handed Weapon") +let items = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 1, "Choisissez une Arme d'Hast ou à Deux Mains") items = items.map(i => i.toObject()) items.forEach(i => equip(i)) diff --git a/scripts/oV81zgbZsuTFG6L2.js b/scripts/oV81zgbZsuTFG6L2.js index c49d598..368a83a 100644 --- a/scripts/oV81zgbZsuTFG6L2.js +++ b/scripts/oV81zgbZsuTFG6L2.js @@ -2,4 +2,4 @@ let caster = this.effect.sourceActor; this.actor.modifyWounds(caster.system.characteristics.fel.bonus); -this.script.scriptMessage(`Healed ${caster.system.characteristics.fel.bonus} Wounds`); \ No newline at end of file +this.script.scriptMessage(`Guérison de ${caster.system.characteristics.fel.bonus} Blessures`); \ No newline at end of file diff --git a/scripts/oWa7RkScnl6lR5vd.js b/scripts/oWa7RkScnl6lR5vd.js index cba5818..4440e93 100644 --- a/scripts/oWa7RkScnl6lR5vd.js +++ b/scripts/oWa7RkScnl6lR5vd.js @@ -6,6 +6,6 @@ if (args.test.characteristicKey == "wp") let data = item.toObject(); this.actor.createEmbeddedDocuments("Item", [data]) - this.script.scriptMessage(`Willpower Test failed, ${this.actor.prototypeToken.name} gains @UUID[Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP] for [[1d10]] hours`) + this.script.scriptMessage(`Test de Force Mentale échoué, ${this.actor.prototypeToken.name} @UUID[Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP] pour [[1d10]] heures`) } } \ No newline at end of file diff --git a/scripts/okW06V9UiPC4Vcrn.js b/scripts/okW06V9UiPC4Vcrn.js index f8d4264..944bb80 100644 --- a/scripts/okW06V9UiPC4Vcrn.js +++ b/scripts/okW06V9UiPC4Vcrn.js @@ -10,10 +10,10 @@ let characteristics = { "wp" : 5, "fel" : 5 } -let skills = ["Cool", "Dodge"] +let skills = ["Calme", "Esquive"] let skillAdvancements = [10, 10] -let talents = ["Combat Reflexes", "Resolute"] -let trappings = ["Leather Jack", "Leather Leggings", "Leather Skullcap", "Hand Weapon", "Spear", "Shield"] +let talents = ["Vigilance", "Déterminé"] +let trappings = ["Veste de cuir", "Jambières de cuir", "Callote de cuir", "Arme simple", "Lance", "Bouclier"] let items = []; let updateObj = this.actor.toObject(); @@ -48,7 +48,7 @@ for (let talent of talents) } else { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) } } @@ -65,7 +65,7 @@ for (let trapping of trappings) } else { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true}) } } diff --git a/scripts/pNPjXEoQGHLKzq0r.js b/scripts/pNPjXEoQGHLKzq0r.js index 26641f9..f8f8a86 100644 --- a/scripts/pNPjXEoQGHLKzq0r.js +++ b/scripts/pNPjXEoQGHLKzq0r.js @@ -1,4 +1,4 @@ -let talent = this.actor.has("Arcane Magic (Light)", "talent") +let talent = this.actor.has("Magie des Arcanes (Lumière)", "talent") let demon = this.actor.has(game.i18n.localize("NAME.Daemonic")) if (!talent) diff --git a/scripts/pR4Q2OnPxXtwRVli.js b/scripts/pR4Q2OnPxXtwRVli.js index 31251d6..492f95a 100644 --- a/scripts/pR4Q2OnPxXtwRVli.js +++ b/scripts/pR4Q2OnPxXtwRVli.js @@ -2,11 +2,11 @@ let criticals = this.actor.itemTypes.critical; if (criticals.length) { - this.script.scriptNotification("Cannot suffer Critical Wounds"); + this.script.scriptNotification("Ne peut subir de Blessures Critiques"); this.actor.deleteEmbeddedDocuments("Item", criticals.map(i => i.id)) } if (getProperty(args.data, "system.status.wounds.value") == 0) { - this.script.scriptNotification(`Dormant for ${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds`) + this.script.scriptNotification(`Endormi pour ${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds`) } \ No newline at end of file diff --git a/scripts/q0LvphC8RDSyR0oY.js b/scripts/q0LvphC8RDSyR0oY.js index 3e6ac9e..5141713 100644 --- a/scripts/q0LvphC8RDSyR0oY.js +++ b/scripts/q0LvphC8RDSyR0oY.js @@ -3,6 +3,6 @@ let choice = await ItemDialog.create(ItemDialog.objectToArray({ t : game.wfrp4e.config.characteristics.t, ag : game.wfrp4e.config.characteristics.ag, wp : game.wfrp4e.config.characteristics.wp -}, this.effect.img), 1, "Choose Characteristic"); +}, this.effect.img), 1, "Choisir une caractéristique"); this.effect.updateSource({"flags.wfrp4e.characteristic" : choice[0].id}) \ No newline at end of file diff --git a/scripts/qAEZgtu5CrfUkxhx.js b/scripts/qAEZgtu5CrfUkxhx.js index c5c12b1..2e1e4ea 100644 --- a/scripts/qAEZgtu5CrfUkxhx.js +++ b/scripts/qAEZgtu5CrfUkxhx.js @@ -7,10 +7,10 @@ if (args.test.options.staunchBleeding) { staunch = Math.min(1, Number(args.test.result.SL)) + 1 } - args.test.result.other.push(`${this.actor.name} removed ${staunch} Bleeding conditions from the patient.`) + args.test.result.other.push(`${this.actor.name} guérit ${staunch} états Hémorragiques du patient.`) } else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0) { - args.test.result.other.push(`The patient contracts a @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Minor Infection}.`) + args.test.result.other.push(`Le patient est victime d'une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`) } } \ No newline at end of file diff --git a/scripts/qT0WBPxLMMO9gvCd.js b/scripts/qT0WBPxLMMO9gvCd.js index fd89c3b..6b7dc68 100644 --- a/scripts/qT0WBPxLMMO9gvCd.js +++ b/scripts/qT0WBPxLMMO9gvCd.js @@ -1,4 +1,4 @@ -if (!this.actor.has("Night Vision") && !this.actor.has("Night Vision", "talent") && !this.actor.hasCondition("blinded")) +if (!this.actor.has("Vision Nocturne") && !this.actor.has("Vision Nocturne", "talent") && !this.actor.hasCondition("blinded")) { this.actor.addCondition("blinded", 1, {"flags.wfrp4e.nightshroud" : true}) } \ No newline at end of file diff --git a/scripts/qmOt7h17hGAKqQe0.js b/scripts/qmOt7h17hGAKqQe0.js index cd2dd07..9c3eef5 100644 --- a/scripts/qmOt7h17hGAKqQe0.js +++ b/scripts/qmOt7h17hGAKqQe0.js @@ -1,16 +1,16 @@ let choice = await Dialog.wait({ title: this.effect.name, - content: `

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

`, + content: `

${this.effect.name}: Est-ce que l'attaque magique ou à distance provient de l'extérieur du Dome?

`, buttons: { yes: { - label: "Yes", + label: "Oui", callback: () => { return true; } }, no: { - label: "No", + label: "Non", callback: () => { return false; } diff --git a/scripts/qu194dVXm9Vx1TGk.js b/scripts/qu194dVXm9Vx1TGk.js index c99393f..756fd99 100644 --- a/scripts/qu194dVXm9Vx1TGk.js +++ b/scripts/qu194dVXm9Vx1TGk.js @@ -1,10 +1,10 @@ -if (args.test.options.useOnesSupportive && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) -{ +if (args.test.options.useOnesSupportive && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) { -let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) -let ones = Number(args.test.result.roll.toString().split("").pop()) + let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) + 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.result.other.push(`${this.effect.name}: Used unit dice as SL`) + if (ones > SL) { + args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus) + args.test.result.other.push(`${this.effect.name}: Utilise le dé d'unité comme DR`) + } } \ No newline at end of file diff --git a/scripts/qxzhPtysAjPWspKf.js b/scripts/qxzhPtysAjPWspKf.js index 934561e..90bcbd0 100644 --- a/scripts/qxzhPtysAjPWspKf.js +++ b/scripts/qxzhPtysAjPWspKf.js @@ -1,4 +1,4 @@ -if (this.actor.has("Undead") || this.actor.has("Daemonic")) +if (this.actor.has("Mort-vivant") || this.actor.has("Démoniaque")) { - this.script.scriptNotification(`Cannot enter ${this.effect.name}!`); + this.script.scriptNotification(`Ne peut entrer ${this.effect.name}!`); } \ No newline at end of file diff --git a/scripts/rCh3ltUrUMovd2Kc.js b/scripts/rCh3ltUrUMovd2Kc.js index 4b1b1b1..5145c61 100644 --- a/scripts/rCh3ltUrUMovd2Kc.js +++ b/scripts/rCh3ltUrUMovd2Kc.js @@ -1,5 +1,5 @@ if (this.actor.hasCondition("surprised")) { - this.script.scriptNotification("Cannot be surprised"); + this.script.scriptNotification("Ne peut être surpris"); this.actor.removeCondition("surprised"); } \ No newline at end of file diff --git a/scripts/rF0Z3hTUUnSxL3Mq.js b/scripts/rF0Z3hTUUnSxL3Mq.js index 93d9ab0..38216c0 100644 --- a/scripts/rF0Z3hTUUnSxL3Mq.js +++ b/scripts/rF0Z3hTUUnSxL3Mq.js @@ -5,7 +5,7 @@ let nightVision = (await fromUuid("Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm let tracker = (await fromUuid("Compendium.wfrp4e-core.items.ClOlztW6hH8rslbp")).toObject() let weapon = (await fromUuid("Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM")).toObject() -armour.name = "Armour (Hide)" +armour.name = "Armure (Caché)" armour.system.specification.value = 2 bite.system.specification.value = 3 fear.system.specification.value = 2 @@ -26,12 +26,12 @@ let regenerate = (await fromUuid("Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR" let size = (await fromUuid("Compendium.wfrp4e-core.items.8slW8CJ2oVTxeQ6q")).toObject()//{Size (Large)} blessed.system.specification.value = "Ulric" -size.system.specification.value = "Large" +size.system.specification.value = "Grande" let optional = [belligerent, bestial, big, blessed, champion, die, fast, frenzy, immunity, regenerate, size]; -let chosen = await ItemDialog.create(optional, "unlimited", "Choose Optional Traits"); +let chosen = await ItemDialog.create(optional, "unlimited", "Choisissez un Trai optionnel"); items = items.concat(chosen || []) -this.script.scriptNotification(`Adding ${items.map(i => i.name).join(", ")}`); +this.script.scriptNotification(`Ajout de ${items.map(i => i.name).join(", ")}`); this.actor.createEmbeddedDocuments("Item", items, {fromEffect : this.effect.id}) diff --git a/scripts/ramav4ymrDDkPKK4.js b/scripts/ramav4ymrDDkPKK4.js index 639558d..f15a01f 100644 --- a/scripts/ramav4ymrDDkPKK4.js +++ b/scripts/ramav4ymrDDkPKK4.js @@ -1,9 +1,9 @@ if (this.actor.hasCondition("bleeding")) { this.actor.removeCondition("bleeding"); - this.script.scriptNotification("Removed 1 Bleeding Condition") + this.script.scriptNotification("Suppression d'1 état Hémmoragique") } else { - this.script.scriptNotification("No Bleeding Conditions"); + this.script.scriptNotification("Aucun état Hémorragique"); } \ No newline at end of file diff --git a/scripts/red2bt4PGgIWAdTR.js b/scripts/red2bt4PGgIWAdTR.js index c4ba998..3abf986 100644 --- a/scripts/red2bt4PGgIWAdTR.js +++ b/scripts/red2bt4PGgIWAdTR.js @@ -5,10 +5,10 @@ if (this.item.system.quantity.value) let effectData = this.item.effects.contents[0].convertToApplied(); let minutes = Math.ceil(CONFIG.Dice.randomUniform() * 10) * 10; effectData.duration.seconds = 60 * minutes - this.script.scriptMessage(`Duration: ${minutes} minutes`, {whisper : ChatMessage.getWhisperRecipients("GM")}) + this.script.scriptMessage(`Durée: ${minutes} minutes`, {whisper : ChatMessage.getWhisperRecipients("GM")}) actor.applyEffect({effectData : [effectData]}) } else { - this.script.scriptNotification("None left!", "error") + this.script.scriptNotification("Aucun disponible!", "error") } \ No newline at end of file diff --git a/scripts/rnioLwiJP7ps5Jwy.js b/scripts/rnioLwiJP7ps5Jwy.js index 7163d7f..2a24ede 100644 --- a/scripts/rnioLwiJP7ps5Jwy.js +++ b/scripts/rnioLwiJP7ps5Jwy.js @@ -1,4 +1,4 @@ -if (args.item.type == "skill" && args.item.name == "Melee (Basic)") +if (args.item.type == "skill" && args.item.name == "Corps à corps (Base)") { args.item.system.modifier.value += 30; } \ No newline at end of file diff --git a/scripts/rpxQU26BU7nwjtqY.js b/scripts/rpxQU26BU7nwjtqY.js index 85e811c..3ed305a 100644 --- a/scripts/rpxQU26BU7nwjtqY.js +++ b/scripts/rpxQU26BU7nwjtqY.js @@ -1,5 +1,5 @@ let location = this.item.system.location.key -let test = await this.actor.setupCharacteristic("dex", {context : {failure : `${this.effect.name}: Drop the item!`}, skipTargets: true, appendTitle : " - " + this.effect.name, fields : {difficulty : "average"}}) +let test = await this.actor.setupCharacteristic("dex", {context : {failure : `${this.effect.name}: Lâche l'objet!`}, skipTargets: true, appendTitle : " - " + this.effect.name, fields : {difficulty : "average"}}) await test.roll(); @@ -9,7 +9,7 @@ if (location && test.failed) if (dropped.length) { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + this.script.scriptNotification(`Laché ${dropped.map(i => i.name).join(", ")}!`) for(let weapon of dropped) { await weapon.system.toggleEquip(); diff --git a/scripts/sB4KB9bT3nQhAoqG.js b/scripts/sB4KB9bT3nQhAoqG.js index 4401b71..2b55ef5 100644 --- a/scripts/sB4KB9bT3nQhAoqG.js +++ b/scripts/sB4KB9bT3nQhAoqG.js @@ -1,12 +1,12 @@ // This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor let mainEffect = this.item.effects.contents[0]; -if (mainEffect.name.includes("")) +if (mainEffect.name.includes("")) { - let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choose Lore"); + let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choisissez le Savoir"); if (choice.length) { - mainEffect.update({name : mainEffect.name.replace("", choice[0].name)}) + mainEffect.update({name : mainEffect.name.replace("", choice[0].name)}) this.item.update({name : this.item.name += ` (${choice[0].name})`}) } } diff --git a/scripts/sKO8TcLIkCTnFvXu.js b/scripts/sKO8TcLIkCTnFvXu.js index d3d0cb5..3040b9c 100644 --- a/scripts/sKO8TcLIkCTnFvXu.js +++ b/scripts/sKO8TcLIkCTnFvXu.js @@ -1,2 +1,2 @@ args.abort = true; -this.script.scriptNotification(`Cannot use ${this.item.system.location.value}!`, "error") \ No newline at end of file +this.script.scriptNotification(`Ne peut utiliser ${this.item.system.location.value}!`, "error") \ No newline at end of file diff --git a/scripts/sNSfDBIA2k17hPYI.js b/scripts/sNSfDBIA2k17hPYI.js index fd7fc3e..61f51c7 100644 --- a/scripts/sNSfDBIA2k17hPYI.js +++ b/scripts/sNSfDBIA2k17hPYI.js @@ -2,5 +2,5 @@ let ablaze = this.actor.hasCondition("ablaze"); if (ablaze) { ablaze?.delete(); - this.script.scriptNotification("Ignore Ablaze"); + this.script.scriptNotification("Ignore En Flammes"); } diff --git a/scripts/sWyO1DNaqb2EdHoW.js b/scripts/sWyO1DNaqb2EdHoW.js index 295c7b5..61e1c1b 100644 --- a/scripts/sWyO1DNaqb2EdHoW.js +++ b/scripts/sWyO1DNaqb2EdHoW.js @@ -7,5 +7,5 @@ if (!this.actor.items.getName(game.i18n.localize("NAME.Frenzy"))) // Either fren this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id}) } -this.script.scriptMessage(`

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

`, +this.script.scriptMessage(`

En buvant cette potion, ${this.actor.prototypeToken.name} est devenu sujet à la Frénesie. Cette Frénésie dure [[1d10]] Rounds, et ne peut pas se terminer avant.

`, {whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) \ No newline at end of file diff --git a/scripts/sZwLitzwKBTaFca3.js b/scripts/sZwLitzwKBTaFca3.js index 4d00d6e..34341d3 100644 --- a/scripts/sZwLitzwKBTaFca3.js +++ b/scripts/sZwLitzwKBTaFca3.js @@ -1,4 +1,4 @@ let item = await fromUuid("Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN") let data = item.toObject(); -data.name = data.name.replace("Target", "Greenskins, Undead, Chaos") +data.name = data.name.replace("Cible", "Peaux vertes, Mort-vivant, Chaos") this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/sbK1a7txpSoXFzyB.js b/scripts/sbK1a7txpSoXFzyB.js index 079b4dc..2396c93 100644 --- a/scripts/sbK1a7txpSoXFzyB.js +++ b/scripts/sbK1a7txpSoXFzyB.js @@ -1,10 +1,10 @@ -if (args.test.options.useOnesArgumentative && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) -{ +if (args.test.options.useOnesArgumentative && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) { -let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) -let ones = Number(args.test.result.roll.toString().split("").pop()) + let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10) + 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.result.other.push(`${this.effect.name}: Used unit dice as SL`) + if (ones > SL) { + args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus) + args.test.result.other.push(`${this.effect.name}: Utilise le dé d'unité comme DR`) + } } \ No newline at end of file diff --git a/scripts/sgS9rblPkQB36C8S.js b/scripts/sgS9rblPkQB36C8S.js index 49348b1..78a09ae 100644 --- a/scripts/sgS9rblPkQB36C8S.js +++ b/scripts/sgS9rblPkQB36C8S.js @@ -14,11 +14,11 @@ let index = game.packs return i }) -let choice = await ItemDialog.create(index, 1, "Choose a Trade Skill") +let choice = await ItemDialog.create(index, 1, "Choisissez une compétence Métier") let text; if (!choice[0]) { - let custom = await ValueDialog.create("Enter Custom Trade Skill", "Custom Trade"); + let custom = await ValueDialog.create("Saisissez une spécialisation de Métier", "Custom Trade"); text = custom || "" } else diff --git a/scripts/shkBUtUuMPDKvFm7.js b/scripts/shkBUtUuMPDKvFm7.js index 641a6b6..601e774 100644 --- a/scripts/shkBUtUuMPDKvFm7.js +++ b/scripts/shkBUtUuMPDKvFm7.js @@ -1,4 +1,4 @@ -let test = await this.actor.setupSkill("Dodge", {fields : {difficulty : "average"}}) +let test = await this.actor.setupSkill("Esquive", {fields : {difficulty : "average"}}) let caster = this.effect.sourceActor let fallen = this.effect.sourceTest.result.SL + caster.characteristics.wp.bonus @@ -6,5 +6,5 @@ await test.roll(); if (test.failed) { this.actor.addCondition("prone") - this.script.scriptMessage(`${this.actor.prototypeToken.name} falls ${fallen} yards`) + this.script.scriptMessage(`${this.actor.prototypeToken.name} tombe de ${fallen} mètres`) } \ No newline at end of file diff --git a/scripts/sx7Ikn8WW00gBFb4.js b/scripts/sx7Ikn8WW00gBFb4.js index d413850..72ec0cd 100644 --- a/scripts/sx7Ikn8WW00gBFb4.js +++ b/scripts/sx7Ikn8WW00gBFb4.js @@ -2,11 +2,11 @@ let location = (Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? "r" : "l") + " if (location == "lArm") { - this.script.scriptNotification("Rolled Left") + this.script.scriptNotification("Résultat : gauche") } else if (location == "rArm") { - this.script.scriptNotification("Rolled Right") + this.script.scriptNotification("Résultat : Droite") } this.effect.updateSource({"flags.wfrp4e.location" : location}); @@ -17,7 +17,7 @@ if (location) if (dropped.length) { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + this.script.scriptNotification(`Laché ${dropped.map(i => i.name).join(", ")}!`) for(let weapon of dropped) { await weapon.system.toggleEquip(); @@ -27,6 +27,6 @@ if (location) let roll = await new Roll("1d10").roll() -roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Duration)`})); +roll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Durée)`})); this.effect.updateSource({"duration.rounds" : roll.total}) \ No newline at end of file diff --git a/scripts/syqqBkyP5tGqZ78t.js b/scripts/syqqBkyP5tGqZ78t.js index 265c5fd..1aa106f 100644 --- a/scripts/syqqBkyP5tGqZ78t.js +++ b/scripts/syqqBkyP5tGqZ78t.js @@ -1,8 +1,8 @@ -this.actor.has("Immunity to Psychology")?.delete(); +this.actor.has("Immunité Psychologique")?.delete(); let roll = await new Roll("1d10").roll(); roll.toMessage(this.script.getChatData()); -this.script.scriptNotification(`Removed Immunity to Psychology, Adding ${roll.total} Broken Conditions`) +this.script.scriptNotification(`Immunité Psychologique a été supprimé de l'acteur, ajout de ${roll.total} états Brisé`) this.actor.addCondition("broken", roll.total, {"flags.wfrp4e.blasted-mind" : true}) \ No newline at end of file diff --git a/scripts/t56mnblo1kv3gM1M.js b/scripts/t56mnblo1kv3gM1M.js index ce5fba9..906ab3a 100644 --- a/scripts/t56mnblo1kv3gM1M.js +++ b/scripts/t56mnblo1kv3gM1M.js @@ -1 +1 @@ -return args.skill?.name.includes("Melee (Basic)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic"); \ No newline at end of file +return args.skill?.name.includes("Corps à corps (Base)") || (args.type == "weapon" && args.item?.system.weaponGroup.value == "basic"); \ No newline at end of file diff --git a/scripts/tCIT1a12Gt6k2ohA.js b/scripts/tCIT1a12Gt6k2ohA.js index e054b71..47daae0 100644 --- a/scripts/tCIT1a12Gt6k2ohA.js +++ b/scripts/tCIT1a12Gt6k2ohA.js @@ -5,7 +5,7 @@ if (this.item.name.includes("(")) } else { - resistance = await ValueDialog.create("Enter Resistance", "Resistance") + resistance = await ValueDialog.create("Entrez la Résistance", "Résistance") if (resistance) { @@ -13,7 +13,7 @@ else this.effect.updateSource({name : this.effect.name + ` (${resistance})`}) } } -this.item.updateSource({"system.tests.value" : this.item.system.tests.value.replace("the associated Threat", resistance)}) +this.item.updateSource({"system.tests.value" : this.item.system.tests.value.replace("menace associée", resistance)}) if (resistance && !this.effect.name.includes("(")) { diff --git a/scripts/tGVEV6TLl310mFLP.js b/scripts/tGVEV6TLl310mFLP.js index 686b84a..8ca630f 100644 --- a/scripts/tGVEV6TLl310mFLP.js +++ b/scripts/tGVEV6TLl310mFLP.js @@ -3,5 +3,5 @@ if (args.applyAP && nonmagical) { 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 + ")"); + args.modifiers.ap.details.push("" + this.effect.name + ": Ignore les PA non-magiques (" + nonmagical + ")"); } \ No newline at end of file diff --git a/scripts/tNTO1LVN7JqHf4YN.js b/scripts/tNTO1LVN7JqHf4YN.js index f35b126..b3c20cc 100644 --- a/scripts/tNTO1LVN7JqHf4YN.js +++ b/scripts/tNTO1LVN7JqHf4YN.js @@ -3,6 +3,6 @@ if (args.test.characteristicKey == "wp") if (args.test.failed) { this.actor.createEmbeddedDocuments("ActiveEffect", [game.wfrp4e.config.symptomEffects["malaise"]]) - this.script.scriptMessage(`Willpower Test failed, ${this.actor.prototypeToken.name} gains @Condition[Malaise] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients("GM")}) + this.script.scriptMessage(`Test de Force Mentale échoué, ${this.actor.prototypeToken.name} subit @Condition[Malaise] pour [[1d10]] heures`, {whisper: ChatMessage.getWhisperRecipients("GM")}) } } \ No newline at end of file diff --git a/scripts/tUwP7TjrOOOnaCYJ.js b/scripts/tUwP7TjrOOOnaCYJ.js index c502cf0..847aba0 100644 --- a/scripts/tUwP7TjrOOOnaCYJ.js +++ b/scripts/tUwP7TjrOOOnaCYJ.js @@ -1,10 +1,10 @@ let fatigued = this.actor.hasCondition("fatigued") if (fatigued) { - this.script.scriptNotification(`Cleared ${fatigued.conditionValue} Fatigued Conditions`) + this.script.scriptNotification(`Suppression de ${fatigued.conditionValue} états Fatigué`) fatigued.delete(); } else { - this.script.scriptNotification(`No Fatigued Conditions`) + this.script.scriptNotification(`Aucun état Fatigué`) } \ No newline at end of file diff --git a/scripts/tcZug8ehU6lyYBd9.js b/scripts/tcZug8ehU6lyYBd9.js index 3ac13c4..1b51877 100644 --- a/scripts/tcZug8ehU6lyYBd9.js +++ b/scripts/tcZug8ehU6lyYBd9.js @@ -1 +1 @@ -return args.skill?.name != "Ranged (Blackpowder)" \ No newline at end of file +return args.skill?.name != "Projectiles (Poudre noire)" \ No newline at end of file diff --git a/scripts/tn6SwmjAuNzqE6dx.js b/scripts/tn6SwmjAuNzqE6dx.js index a7bacb4..e3cc68b 100644 --- a/scripts/tn6SwmjAuNzqE6dx.js +++ b/scripts/tn6SwmjAuNzqE6dx.js @@ -1,5 +1,5 @@ let damage = 0 -let test = await this.actor.setupSkill("Dodge", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); +let test = await this.actor.setupSkill("Esquive", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}); await test.roll(); if (test.succeeded) diff --git a/scripts/toSrgcvWq9b5eN0K.js b/scripts/toSrgcvWq9b5eN0K.js index f3fabed..01c486e 100644 --- a/scripts/toSrgcvWq9b5eN0K.js +++ b/scripts/toSrgcvWq9b5eN0K.js @@ -1,4 +1,4 @@ let location = await game.wfrp4e.tables.rollTable("hitloc", {hideDSN: true}) this.item.updateSource({name : `${this.item.name} (${location.description})`}) -this.script.scriptMessage(`Location: ${location.description}`, { whisper: ChatMessage.getWhisperRecipients("GM") }) \ No newline at end of file +this.script.scriptMessage(`Localisation: ${location.description}`, { whisper: ChatMessage.getWhisperRecipients("GM") }) \ No newline at end of file diff --git a/scripts/uACa6u4JLNMRgFlr.js b/scripts/uACa6u4JLNMRgFlr.js index b4b0244..187f0c5 100644 --- a/scripts/uACa6u4JLNMRgFlr.js +++ b/scripts/uACa6u4JLNMRgFlr.js @@ -1,2 +1,2 @@ -const talents = await Promise.all(["Furious Assault", "Sea Legs"].map(game.wfrp4e.utility.findTalent)) +const talents = await Promise.all(["Assaut féroce", "Pied marin"].map(game.wfrp4e.utility.findTalent)) this.actor.createEmbeddedDocuments("Item", talents, {fromEffect : this.effect.id}) \ No newline at end of file diff --git a/scripts/uLBDnWC3S0lRitbj.js b/scripts/uLBDnWC3S0lRitbj.js index e858a83..7bf367c 100644 --- a/scripts/uLBDnWC3S0lRitbj.js +++ b/scripts/uLBDnWC3S0lRitbj.js @@ -9,7 +9,7 @@ if (opposedResult?.winner == "attacker") { this.actor.addCondition("unconscious") await this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) - this.script.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) + this.script.scriptMessage("Reçoit un Point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")}) } else { diff --git a/scripts/ucF4aiJ1gpDB333G.js b/scripts/ucF4aiJ1gpDB333G.js index 7d00add..6c8bb05 100644 --- a/scripts/ucF4aiJ1gpDB333G.js +++ b/scripts/ucF4aiJ1gpDB333G.js @@ -1,5 +1,5 @@ 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) { - args.test.result.other.push(`${this.effect.name}: Fall distance damage reduced by ${Number(args.test.result.SL) + 1} yards`) + args.test.result.other.push(`${this.effect.name}: Dommages de chutes réduit de ${Number(args.test.result.SL) + 1} mètres`) args.test.result.catfall = true; // Prevent duplicate messages } \ No newline at end of file diff --git a/scripts/ugL5IBB6R2yWyMWd.js b/scripts/ugL5IBB6R2yWyMWd.js index 1616e69..97340d8 100644 --- a/scripts/ugL5IBB6R2yWyMWd.js +++ b/scripts/ugL5IBB6R2yWyMWd.js @@ -1,6 +1,6 @@ if (args.totalWoundLoss > 0) { - let apply = await Dialog.confirm({title : this.effect.name, content : `

Appy ${this.effect.name} Damage? Attacker must have used bare hands or a melee weapon made of metal.`}) + let apply = await Dialog.confirm({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 faite de métal.`}) if (apply) { @@ -17,7 +17,7 @@ if (args.totalWoundLoss > 0) damage -= (APused + args.opposedTest.attacker.system.characteristics.t.bonus) let msg = await args.opposedTest.attacker.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL}); - msg += ` (ignored ${metalAP} metal AP on ${game.wfrp4e.config.locations[loc]})` + msg += ` (${metalAP} PA métalliques ignorés sur ${game.wfrp4e.config.locations[loc]})` this.script.scriptMessage(msg) } } \ No newline at end of file diff --git a/scripts/upfK6GM33qZCZjll.js b/scripts/upfK6GM33qZCZjll.js index 91935c0..f2e0c11 100644 --- a/scripts/upfK6GM33qZCZjll.js +++ b/scripts/upfK6GM33qZCZjll.js @@ -1 +1 @@ -return args.item?.name != "Play (Lute)" \ No newline at end of file +return args.item?.name != "Musicien (Luth)" \ No newline at end of file diff --git a/scripts/uwdQvZtzy2HVeEzx.js b/scripts/uwdQvZtzy2HVeEzx.js index 685fa84..f181413 100644 --- a/scripts/uwdQvZtzy2HVeEzx.js +++ b/scripts/uwdQvZtzy2HVeEzx.js @@ -8,7 +8,7 @@ if (args.totalWoundLoss > 0) await test.roll(); if (test.failed) { - this.script.scriptMessage("" + args.actor.name + " takes a @Table[critbody]{Critical Hit} to the torse", {whisper: ChatMessage.getWhisperRecipients("GM")}) + this.script.scriptMessage("" + args.actor.name + " subit un @Table[critbody]{Blessure Critique} au torse", {whisper: ChatMessage.getWhisperRecipients("GM")}) } }) } diff --git a/scripts/v4CCxVaVGf9i8U7X.js b/scripts/v4CCxVaVGf9i8U7X.js index abab0d3..cd216b9 100644 --- a/scripts/v4CCxVaVGf9i8U7X.js +++ b/scripts/v4CCxVaVGf9i8U7X.js @@ -1,9 +1,9 @@ let cured = await Dialog.wait({ title : this.effect.name, - content : "

Enter the number of diseases/poisons cured

", + content : "

Entrez le nombre de Poisons/Maladies soignés

", buttons : { confirm : { - label : "Confirm", + label : "Confirmer", callback : (dlg) => { let input = dlg.find("input"); value = parseInt(input[0].value); diff --git a/scripts/v5xrDWcrTNFJkyQB.js b/scripts/v5xrDWcrTNFJkyQB.js index da60300..c2c9e3d 100644 --- a/scripts/v5xrDWcrTNFJkyQB.js +++ b/scripts/v5xrDWcrTNFJkyQB.js @@ -1,7 +1,7 @@ let choice1 = [ { type : "skill", - name : "Ranged (Bow)", + name : "Projectiles (Arc)", diff : { system : { advances : { @@ -12,11 +12,11 @@ let choice1 = [ }, { type : "weapon", - name : "Longbow", + name : "Arc long", }, { type : "ammunition", - name : "Arrow", + name : "Flèche", } ] let choice2 = [ @@ -26,7 +26,7 @@ let choice = await Dialog.wait({ title : "Option", content : `

- Add Option? + Ajouter l'ption?

  1. Ranged (Bow) +10 and a Longbow with 12 Arrows
  2. @@ -34,13 +34,13 @@ let choice = await Dialog.wait({ `, buttons : { 1 : { - label : "Yes", + label : "Oui", callback : () => { return choice1; } }, 2 : { - label : "No", + label : "Non", callback : () => { return choice2; } @@ -72,7 +72,7 @@ for (let c of choice) items.push(mergeObject(item, (c.diff || {}))) } else - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) } } diff --git a/scripts/vFUVWZ1l8wpTjLcx.js b/scripts/vFUVWZ1l8wpTjLcx.js index b33c270..bf87dfe 100644 --- a/scripts/vFUVWZ1l8wpTjLcx.js +++ b/scripts/vFUVWZ1l8wpTjLcx.js @@ -7,7 +7,7 @@ if (caster) let wp = caster.system.characteristics.wp if (this.actor.system.characteristics.wp.value >= wp.value) { - this.script.scriptNotification("Target has higher Willpower, no effect") + this.script.scriptNotification("La cible a une Force Mentale supérieure, aucun effet") return } this.actor.applyBasicDamage(wp.bonus, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL }) diff --git a/scripts/vSDMygIT9nNvEGWG.js b/scripts/vSDMygIT9nNvEGWG.js index 88b2106..df2b0c4 100644 --- a/scripts/vSDMygIT9nNvEGWG.js +++ b/scripts/vSDMygIT9nNvEGWG.js @@ -6,7 +6,7 @@ if (Math.ceil(CONFIG.Dice.randomUniform() * 10) == 1) { this.item.setFlag("wfrp4e", "brittle", true) ChatMessage.create({ content: ` - ${this.item.name} has run out of poison. It will shatter the next time it is used.`, + ${this.item.name} n'a plus de Poison. Il se brisera à sa prochaine utilisation.`, whisper: ChatMessage.getWhisperRecipients("GM"), blind: true }) diff --git a/scripts/vc4bELo0cWYoILfB.js b/scripts/vc4bELo0cWYoILfB.js index c8a93da..0fbbbd9 100644 --- a/scripts/vc4bELo0cWYoILfB.js +++ b/scripts/vc4bELo0cWYoILfB.js @@ -1,4 +1,4 @@ -let choice = await ItemDialog.create(this.actor.itemTypes.disease, 1, "Choose a disease to heal (must be naturally occuring)") +let choice = await ItemDialog.create(this.actor.itemTypes.disease, 1, "Choisissez une Maladie à soigner (doit avoir été contracté naturellement)") -this.script.scriptMessage(`Cured ${choice[0]?.name}`); +this.script.scriptMessage(`Guérison de ${choice[0]?.name}`); choice[0].delete() \ No newline at end of file diff --git a/scripts/vuzRRj5d9XdNYx3o.js b/scripts/vuzRRj5d9XdNYx3o.js index c5c1635..34bcd89 100644 --- a/scripts/vuzRRj5d9XdNYx3o.js +++ b/scripts/vuzRRj5d9XdNYx3o.js @@ -2,5 +2,5 @@ let broken = this.actor.hasCondition("broken") if (broken) { broken.delete(); - this.script.scriptNotification("Removed Broken") + this.script.scriptNotification("Etat Brisé supprimé") } \ No newline at end of file diff --git a/scripts/vvdo1NxjmGVkmFCT.js b/scripts/vvdo1NxjmGVkmFCT.js index 22edf7f..3ef6cb4 100644 --- a/scripts/vvdo1NxjmGVkmFCT.js +++ b/scripts/vvdo1NxjmGVkmFCT.js @@ -15,7 +15,7 @@ if (location) if (dropped.length) { - this.script.scriptNotification(`Dropped ${dropped.map(i => i.name).join(", ")}!`) + this.script.scriptNotification(`Lache ${dropped.map(i => i.name).join(", ")}!`) for(let weapon of dropped) { await weapon.system.toggleEquip(); diff --git a/scripts/wbM7tpw4TxvadcWm.js b/scripts/wbM7tpw4TxvadcWm.js index 88dec95..5358e6e 100644 --- a/scripts/wbM7tpw4TxvadcWm.js +++ b/scripts/wbM7tpw4TxvadcWm.js @@ -5,12 +5,12 @@ for(let item of items) if (item.system.properties.qualities.durable) { await item.update({"system.qualities.value" : []}); - msg += `

    ${item.name} loses all Qualities

    ` + msg += `

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

    ` } else { - msg += `

    ${item.name} crumbles into dust!

    ` - await item.update({name : item.name + " (Dust)"}) + msg += `

    ${item.name} tombe en poussière!

    ` + await item.update({name : item.name + " (Poussières)"}) } } if(msg) diff --git a/scripts/whUSkaR1yem21bXp.js b/scripts/whUSkaR1yem21bXp.js index c2c2f1b..37a1864 100644 --- a/scripts/whUSkaR1yem21bXp.js +++ b/scripts/whUSkaR1yem21bXp.js @@ -10,10 +10,10 @@ let characteristics = { "wp" : 0, "fel" : 10 } -let skills = ["Melee (Basic)", "Track"] +let skills = ["Corps à corps (Base)", "Pistage"] let skillAdvancements = [8, 7] -let talents = ["Berserk Charge", "Careful Strike", "Strike to Injure"] -let traits = ["Flight (8)", "Fury", "Swarm", "Tracker"] +let talents = ["Charge Berserk", "Frappe précise", "Frappe blessante"] +let traits = ["Vol (8)", "Rage", "Essaim", "Pisteur"] let trappings = [] let items = []; let spells = []; @@ -50,7 +50,7 @@ for (let talent of talents) } else { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) } } @@ -68,13 +68,13 @@ for (let trait of traits) } catch { } if (!traitItem) { - ui.notifications.warn(`Could not find ${trait}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${trait}`, {permanent : true}) } traitItem = traitItem.toObject() if (Number.isNumeric(traitVal)) { - traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? 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 diff --git a/scripts/wsqNM4NHnwaAAQym.js b/scripts/wsqNM4NHnwaAAQym.js index a07f054..a58738b 100644 --- a/scripts/wsqNM4NHnwaAAQym.js +++ b/scripts/wsqNM4NHnwaAAQym.js @@ -1,6 +1,6 @@ args.applyAP = false; - this.script.scriptNotification("This test only applies to criminals, otherwise close the dialog."); + this.script.scriptNotification("Ce test ne s'applique seulement qu'aux criminels. Fermez cette fenêtre si ce n'est pas le cas."); this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => { await test.roll(); diff --git a/scripts/wyTCozh9qGTx6yK0.js b/scripts/wyTCozh9qGTx6yK0.js index c2afa63..2bf2400 100644 --- a/scripts/wyTCozh9qGTx6yK0.js +++ b/scripts/wyTCozh9qGTx6yK0.js @@ -1,5 +1,5 @@ if (args.options.terror || args.extendedTest?.getFlag("wfrp4e", "fear")) { args.abort = true; - this.script.scriptNotification("Does not need to make Fear or Terror tests"); + this.script.scriptNotification("N'a pas besoin de faire de test de Peur ou de Terreur"); } \ No newline at end of file diff --git a/scripts/x2RLUUNB7BiIDYCP.js b/scripts/x2RLUUNB7BiIDYCP.js index 0ab5fe7..1f2d040 100644 --- a/scripts/x2RLUUNB7BiIDYCP.js +++ b/scripts/x2RLUUNB7BiIDYCP.js @@ -1,8 +1,8 @@ let difficulty = "" - if (this.effect.name.includes("Moderate")) + if (this.effect.name.includes("Modéré")) difficulty = "easy" - else if (this.effect.name.includes("Severe")) + else if (this.effect.name.includes("Sévère")) difficulty = "average" else difficulty = "veasy" diff --git a/scripts/x9iKFYYc4Ocy8PTS.js b/scripts/x9iKFYYc4Ocy8PTS.js index 9f078b6..88ca8b1 100644 --- a/scripts/x9iKFYYc4Ocy8PTS.js +++ b/scripts/x9iKFYYc4Ocy8PTS.js @@ -1,11 +1,11 @@ let item = this.effect.getCreatedItems()?.[0]; -ChatMessage.create({content : "Grace is beyond style", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) +ChatMessage.create({content : "La grâce est au delà du style", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true}) let choice = await ItemDialog.create(ItemDialog.objectToArray({ "nobles" : "Nobles", - "guilders" : "Guilders", - "servants" : "Servants" -}), 1, "Choose Group") + "guilders" : "Maitres de Guildes", + "servants" : "Serviteurs" +}), 1, "Choisissez un groupes") let name = choice[0]?.name diff --git a/scripts/xRd6oA1QWLVpfoBm.js b/scripts/xRd6oA1QWLVpfoBm.js index db785fb..9b5f8dd 100644 --- a/scripts/xRd6oA1QWLVpfoBm.js +++ b/scripts/xRd6oA1QWLVpfoBm.js @@ -1,4 +1,4 @@ -if (!this.actor.has("Night Vision")) +if (!this.actor.has("Vision Nocturne")) { let item = await fromUuid("Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm"); let data = item.toObject(); diff --git a/scripts/xS2su09zcza9du09.js b/scripts/xS2su09zcza9du09.js index 592e0c2..0f65f3f 100644 --- a/scripts/xS2su09zcza9du09.js +++ b/scripts/xS2su09zcza9du09.js @@ -1,8 +1,8 @@ -if (["Minor", "Moderate", "Major"].includes(this.item.system.specification.value)) +if (["Mineure", "Modérée", "Majeure"].includes(this.item.system.specification.value)) { return } -let choice = await ItemDialog.create(ItemDialog.objectToArray({minor : "Minor", moderate : "Moderate", major : "Major"}, this.item.img), 1, "Choose Corruption Severity"); +let choice = await ItemDialog.create(ItemDialog.objectToArray({minor : "Mineure", moderate : "Modérée", major : "Majeure"}, this.item.img), 1, "Choisissez la sévérite de la corruption"); this.item.updateSource({"system.specification.value" : choice[0]?.name || ""}) \ No newline at end of file diff --git a/scripts/xUpKYT7BZCSmAfUy.js b/scripts/xUpKYT7BZCSmAfUy.js index 6e013b0..02c1ec7 100644 --- a/scripts/xUpKYT7BZCSmAfUy.js +++ b/scripts/xUpKYT7BZCSmAfUy.js @@ -6,5 +6,5 @@ if (this.item.system.quantity.value) } else { - this.script.scriptNotification("None left!", "error") + this.script.scriptNotification("Quantité insuffisante!", "error") } \ No newline at end of file diff --git a/scripts/xgplXZMs459X7XXM.js b/scripts/xgplXZMs459X7XXM.js index af8f73d..92309e0 100644 --- a/scripts/xgplXZMs459X7XXM.js +++ b/scripts/xgplXZMs459X7XXM.js @@ -2,10 +2,9 @@ if (args.equipped) { this.actor.createEmbeddedDocuments("ActiveEffect", [this.item.effects.contents[1]?.convertToApplied()]) - this.script.scriptMessage(`${this.actor.name} dons the ${this.item.name}.
    - They suffer –20 to all attempts to resist Disease.
    - If they wear the mask for more than an hour or benefit from any of its effects, they are exposed to @Corruption[moderate]{Moderate Corruption}. - `, + this.script.scriptMessage(`${this.actor.name} porte ${this.item.name}.
    + Il subit -20 à tout ses tests pour résister aux maladies.
    + Si il porte le masque pendant plus d'une heure ou bénéficie de l'un de ses effets, il est exposé à une @Corruption[moderate]{Corruption Modérée}.`, {whisper: ChatMessage.getWhisperRecipients("GM")}) } @@ -14,7 +13,7 @@ else if (!args.equipped) { await this.item.effects.contents[0].delete(); await this.item.update({name : this.item.name += " (Used)"}) - this.script.scriptMessage(`${this.item.name} on ${this.actor.name} has been taken off and loses its properties. However, the effects last for [[1d10+4]] days, after which they should be manually removed.`, + this.script.scriptMessage(`${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.`, {whisper: ChatMessage.getWhisperRecipients("GM")} ) diff --git a/scripts/xobGBJbgFjQCrwvq.js b/scripts/xobGBJbgFjQCrwvq.js index b6b5f54..c1163a2 100644 --- a/scripts/xobGBJbgFjQCrwvq.js +++ b/scripts/xobGBJbgFjQCrwvq.js @@ -1,5 +1,5 @@ let roll; -if (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)) +if (this.actor.has(game.i18n.localize("NAME.Daemonic")) || this.actor.has(game.i18n.localize("NAME.Undead")) || ["Gobelin", "Orc", "Mort-vivant"].includes(this.actor.system.details.species.value)) { roll = await new Roll(`1d10 + ${this.effect.sourceTest.result.overcast.usage.other.current}`).roll() } @@ -11,7 +11,7 @@ else roll.toMessage(this.script.getChatData()) await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}) -if (this.actor.has("Undead") || args.actor.has("Daemonic")) +if (this.actor.has("Mort-vivant") || args.actor.has("Démoniaque")) { this.actor.addCondition("ablaze") } \ No newline at end of file diff --git a/scripts/yAL0YwZWVm8o1nxa.js b/scripts/yAL0YwZWVm8o1nxa.js index 75e6cf8..98e23e4 100644 --- a/scripts/yAL0YwZWVm8o1nxa.js +++ b/scripts/yAL0YwZWVm8o1nxa.js @@ -1,6 +1,6 @@ if (this.actor.hasCondition("dead") && !this.actor.gardenOfCorpses) { - this.script.scriptMessage("[[3d10]] @UUID[Compendium.wfrp4e-core.actors.T79RqnDOAQLn3I1s]{zombies} spring forth from the remains.", {whisper : ChatMessage.getWhisperRecipients("GM")}) + this.script.scriptMessage("[[3d10]] @UUID[Compendium.wfrp4e-core.actors.T79RqnDOAQLn3I1s]{zombies} sortent des décombres.", {whisper : ChatMessage.getWhisperRecipients("GM")}) this.actor.gardenOfCorpses = true; // local storage is sufficient to prevent multiple messages } \ No newline at end of file diff --git a/scripts/yFMvxecXAZ6T2O0S.js b/scripts/yFMvxecXAZ6T2O0S.js index 72cbdc7..2a597dd 100644 --- a/scripts/yFMvxecXAZ6T2O0S.js +++ b/scripts/yFMvxecXAZ6T2O0S.js @@ -4,6 +4,6 @@ if (args.totalWoundLoss >= 1) await roll.toMessage(this.script.getChatData()); if (roll.total == 9) { - this.script.scriptMessage(`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")}) + this.script.scriptMessage(`Deux @UUID[Compendium.wfrp4e-eis.actors.cLOGeMqUty61nYB9]{Horreurs bleus de Tzeentch} sortent du corps de ${this.actor.name}, le tuant au passage.`, {whisper : ChatMessage.getWhisperRecipients("GM")}) } } \ No newline at end of file diff --git a/scripts/yMMzZ7daCqRlGT3N.js b/scripts/yMMzZ7daCqRlGT3N.js index 7dd1c9b..98b1232 100644 --- a/scripts/yMMzZ7daCqRlGT3N.js +++ b/scripts/yMMzZ7daCqRlGT3N.js @@ -1,5 +1,5 @@ let item = args.opposedTest.attackerTest.item; if (!item.isMagical && (item.type == "weapon" || item.type == "trait")) { - args.modifiers.other.push({label : this.effect.name, details : "Remove Damage Rating", value : -1 * (args.totalWoundLoss - args.opposedTest.result.differenceSL)}) + args.modifiers.other.push({label : this.effect.name, details : "Suppression de la valeur de dommages", value : -1 * (args.totalWoundLoss - args.opposedTest.result.differenceSL)}) } diff --git a/scripts/yTmRoUstxHMso91c.js b/scripts/yTmRoUstxHMso91c.js index 9dcd76f..b7f2f03 100644 --- a/scripts/yTmRoUstxHMso91c.js +++ b/scripts/yTmRoUstxHMso91c.js @@ -1,4 +1,4 @@ -if (args.item.name == "Magic Resistance" && args.item.type == "trait") +if (args.item.name == "Résistance à la Magie" && args.item.type == "trait") { args.item.system.specification.value = Number(args.item.system.specification.value) + 1 } \ No newline at end of file diff --git a/scripts/ynoHNXXCGRS6fTqF.js b/scripts/ynoHNXXCGRS6fTqF.js index 9c5e860..901593f 100644 --- a/scripts/ynoHNXXCGRS6fTqF.js +++ b/scripts/ynoHNXXCGRS6fTqF.js @@ -7,7 +7,7 @@ if (args.actor.characteristics.i.value <= 0) i_gain += (await new Roll("2d10").roll()).total } -msg = `${this.actor.prototypeToken.name} gains ${i_gain} Initiative` +msg = `${this.actor.prototypeToken.name} gagne ${i_gain} en Initiative` let newValue = i_gain + args.actor.characteristics.i.modifier diff --git a/scripts/yzN7ZNlgCiSVJqsU.js b/scripts/yzN7ZNlgCiSVJqsU.js index ac583fa..1e442ba 100644 --- a/scripts/yzN7ZNlgCiSVJqsU.js +++ b/scripts/yzN7ZNlgCiSVJqsU.js @@ -3,5 +3,5 @@ let sourceItem = this.effect.sourceItem; if (sourceItem) { this.actor.applyEffect({effectUuids : [sourceItem.effects.contents[1].uuid]}) - this.script.scriptNotification("Applied after effects"); + this.script.scriptNotification("Appliqué après les effets"); } \ No newline at end of file diff --git a/scripts/z5HfNUrHy5MS3K7a.js b/scripts/z5HfNUrHy5MS3K7a.js index e635110..6abff4e 100644 --- a/scripts/z5HfNUrHy5MS3K7a.js +++ b/scripts/z5HfNUrHy5MS3K7a.js @@ -3,5 +3,5 @@ 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.scriptMessage("Gained a Corruption point", {whisper : ChatMessage.getWhisperRecipients("GM")}) + this.script.scriptMessage("Reçoit un Point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")}) } \ No newline at end of file diff --git a/scripts/zA6TDttpwMSMl7D8.js b/scripts/zA6TDttpwMSMl7D8.js index 898b642..ab9ff3b 100644 --- a/scripts/zA6TDttpwMSMl7D8.js +++ b/scripts/zA6TDttpwMSMl7D8.js @@ -5,7 +5,7 @@ this.actor.setupSkill(game.i18n.localize("NAME.ConsumeAlcohol"), {skipTargets: t // as a result of whatever potential futures they glimpse, // they can spend a Fortune Point within the next hour to reverse the dice of any failed Test. if (test.succeeded) { - this.script.scriptMessage(`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.`, + this.script.scriptMessage(`En raison des futurs potentiels entrevus, ${this.actor.prototypeToken.name} peut dépenser un Point de Chance durant la prochaine heure pour inverser le résultat d'un test échoué.`, { whisper: ChatMessage.getWhisperRecipients("GM"), blind: true diff --git a/scripts/zK38Rl5t9zbFi4Se.js b/scripts/zK38Rl5t9zbFi4Se.js index 029af27..8638ea5 100644 --- a/scripts/zK38Rl5t9zbFi4Se.js +++ b/scripts/zK38Rl5t9zbFi4Se.js @@ -1,5 +1,5 @@ if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 1); - this.script.scriptNotification("Added Bleeding") + this.script.scriptNotification("Ajout d'Hemorragique") } \ No newline at end of file diff --git a/scripts/zR4WAjzXHTZuiu5G.js b/scripts/zR4WAjzXHTZuiu5G.js index a366058..1bdc6d1 100644 --- a/scripts/zR4WAjzXHTZuiu5G.js +++ b/scripts/zR4WAjzXHTZuiu5G.js @@ -1,52 +1,44 @@ let actor = this.actor; - let effect = this.effect; - let bleedingAmt; - let bleedingRoll; - let msg = "" +let effect = this.effect; +let bleedingAmt; +let bleedingRoll; +let msg = "" - let damage = effect.conditionValue; - let scriptArgs = {msg, damage}; - await Promise.all(actor.runScripts("preApplyCondition", {effect, data : scriptArgs})) - msg = scriptArgs.msg; - damage = scriptArgs.damage; - msg += await actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, minimumOne : false, suppressMsg : true}) +let damage = effect.conditionValue; +let scriptArgs = { msg, damage }; +await Promise.all(actor.runScripts("preApplyCondition", { effect, data: scriptArgs })) +msg = scriptArgs.msg; +damage = scriptArgs.damage; +msg += await actor.applyBasicDamage(damage, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, minimumOne: false, suppressMsg: true }) - if (actor.status.wounds.value == 0 && !actor.hasCondition("unconscious")) - { - await actor.addCondition("unconscious") - msg += "
    " + game.i18n.format("BleedUnc", {name: actor.prototypeToken.name }) - } +if (actor.status.wounds.value == 0 && !actor.hasCondition("unconscious")) { + await actor.addCondition("unconscious") + msg += "
    " + game.i18n.format("BleedUnc", { name: actor.prototypeToken.name }) +} - if (actor.hasCondition("unconscious")) - { - bleedingAmt = effect.conditionValue; - bleedingRoll = (await new Roll("1d100").roll()).total; - if (bleedingRoll <= bleedingAmt * 10) - { - msg += "
    " + game.i18n.format("BleedFail", {name: actor.prototypeToken.name}) + " (" + game.i18n.localize("Rolled") + " " + bleedingRoll + ")"; - await actor.addCondition("dead") - } - else if (bleedingRoll % 11 == 0) - { - msg += "
    " + game.i18n.format("BleedCrit", { name: actor.prototypeToken.name } ) + " (" + game.i18n.localize("Rolled") + bleedingRoll + ")" - await actor.removeCondition("bleeding") - } - else - { - msg += "
    " + game.i18n.localize("BleedRoll") + ": " + bleedingRoll; - } - } +if (actor.hasCondition("unconscious")) { + bleedingAmt = effect.conditionValue; + bleedingRoll = (await new Roll("1d100").roll()).total; + if (bleedingRoll <= bleedingAmt * 10) { + msg += "
    " + game.i18n.format("BleedFail", { name: actor.prototypeToken.name }) + " (" + game.i18n.localize("Rolled") + " " + bleedingRoll + ")"; + await actor.addCondition("dead") + } + else if (bleedingRoll % 11 == 0) { + msg += "
    " + game.i18n.format("BleedCrit", { name: actor.prototypeToken.name }) + " (" + game.i18n.localize("Rolled") + bleedingRoll + ")" + await actor.removeCondition("bleeding") + } + else { + msg += "
    " + game.i18n.localize("BleedRoll") + ": " + bleedingRoll; + } +} - await Promise.all(actor.runScripts("applyCondition", {effect, data : {bleedingRoll}})) - if (args.suppressMessage) - { - let messageData = game.wfrp4e.utility.chatDataSetup(msg); - messageData.speaker = {alias: this.effect.name} - messageData.flavor = this.effect.name; - return messageData - } - else - { - return this.script.scriptMessage(msg) - } - \ No newline at end of file +await Promise.all(actor.runScripts("applyCondition", { effect, data: { bleedingRoll } })) +if (args.suppressMessage) { + let messageData = game.wfrp4e.utility.chatDataSetup(msg); + messageData.speaker = { alias: this.effect.name } + messageData.flavor = this.effect.name; + return messageData +} +else { + return this.script.scriptMessage(msg) +} diff --git a/scripts/zadppy7FEbXvgUON.js b/scripts/zadppy7FEbXvgUON.js index 8b87ec9..f2e2c97 100644 --- a/scripts/zadppy7FEbXvgUON.js +++ b/scripts/zadppy7FEbXvgUON.js @@ -10,10 +10,10 @@ "wp" : 0, "fel" : 5 } - let skills = ["Perception", "Sleight of Hand", "Stealth (Urban)"] + let skills = ["Perception", "Escamotage", "Discrétion (Urbaine)"] let skillAdvancements = [10, 10, 10] - let talents = ["Criminal", "Etiquette (Criminals)"] - let trappings = ["Rope, 10 yards", "Lockpick", "Mask"] + let talents = ["Criminel", "Etiquette (Criminels)"] + let trappings = ["Corde, 10 mètres", "Outils de crochetage", "Masque"] let items = [] let updateObj = this.actor.toObject(); @@ -48,7 +48,7 @@ } else { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true}) } } @@ -65,7 +65,7 @@ } else { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true}) } } diff --git a/scripts/zi8Z3NlwVj3IfgAW.js b/scripts/zi8Z3NlwVj3IfgAW.js index 70c5434..cfd8a70 100644 --- a/scripts/zi8Z3NlwVj3IfgAW.js +++ b/scripts/zi8Z3NlwVj3IfgAW.js @@ -6,5 +6,5 @@ if (this.item.system.quantity.value) } else { - this.script.scriptNotification("None left!", "error") + this.script.scriptNotification("Quantité insuffisante!", "error") } \ No newline at end of file diff --git a/scripts/zzk2uRSFjFHB5kjw.js b/scripts/zzk2uRSFjFHB5kjw.js index df8f9a1..b9b36c2 100644 --- a/scripts/zzk2uRSFjFHB5kjw.js +++ b/scripts/zzk2uRSFjFHB5kjw.js @@ -1,9 +1,8 @@ - let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10) - if (args.test.isFumble && roll == 1 && !args.test.result.misfire) - { - args.test.result.misfire = game.i18n.localize("Misfire") + " (Rolled 1)" - args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage) - } - else if (args.test.isFumble && roll != 1) - args.test.result.other.push("Misfire Roll: " + roll) \ No newline at end of file +let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10) +if (args.test.isFumble && roll == 1 && !args.test.result.misfire) { + args.test.result.misfire = game.i18n.localize("Misfire") + " (Résultat 1)" + args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage) +} +else if (args.test.isFumble && roll != 1) + args.test.result.other.push("Misfire Roll: " + roll) \ No newline at end of file