Add all systems effects scripts

This commit is contained in:
LeRatierBretonnien 2024-05-16 17:57:51 +02:00
parent b42df99b27
commit 0b286ac994
1282 changed files with 9990 additions and 384 deletions

View File

@ -2,8 +2,9 @@ Fini :
F Cheminade -> Items UA1 -> DONE
Faytoto -> acteurs UA1
Dwim -> RNHD actors
Highcrown -> Acteurs Ennemi Ombre -> DONE
En cours :
Highcrown -> Acteurs Ennemi Ombre (27/03/24 :en cours)
KeylaKhaine -> Acteurs Mort sur le Reik (27/03/24 :en cours)
Kyllian -> Acteurs Middenheim (15/05/24, en cours)

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
MANIFEST-000669
MANIFEST-000673

View File

@ -1,7 +1,7 @@
2024/05/12-19:57:00.248099 7f003e0006c0 Recovering log #667
2024/05/12-19:57:00.258537 7f003e0006c0 Delete type=3 #665
2024/05/12-19:57:00.258601 7f003e0006c0 Delete type=0 #667
2024/05/12-20:49:52.183624 7f00374006c0 Level-0 table #672: started
2024/05/12-20:49:52.183681 7f00374006c0 Level-0 table #672: 0 bytes OK
2024/05/12-20:49:52.190384 7f00374006c0 Delete type=0 #670
2024/05/12-20:49:52.197399 7f00374006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal!suuYN87Al1ZZWtQQ' @ 0 : 0; will stop at (end)
2024/05/14-23:48:30.544546 7f505e0006c0 Recovering log #671
2024/05/14-23:48:30.556244 7f505e0006c0 Delete type=3 #669
2024/05/14-23:48:30.556333 7f505e0006c0 Delete type=0 #671
2024/05/14-23:52:38.338843 7f50574006c0 Level-0 table #676: started
2024/05/14-23:52:38.338863 7f50574006c0 Level-0 table #676: 0 bytes OK
2024/05/14-23:52:38.344995 7f50574006c0 Delete type=0 #674
2024/05/14-23:52:38.345156 7f50574006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal!suuYN87Al1ZZWtQQ' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2024/05/12-17:23:23.760010 7f003fe006c0 Recovering log #663
2024/05/12-17:23:23.771077 7f003fe006c0 Delete type=3 #661
2024/05/12-17:23:23.771226 7f003fe006c0 Delete type=0 #663
2024/05/12-17:38:17.603956 7f00374006c0 Level-0 table #668: started
2024/05/12-17:38:17.604017 7f00374006c0 Level-0 table #668: 0 bytes OK
2024/05/12-17:38:17.611370 7f00374006c0 Delete type=0 #666
2024/05/12-17:38:17.619020 7f00374006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal!suuYN87Al1ZZWtQQ' @ 0 : 0; will stop at (end)
2024/05/12-19:57:00.248099 7f003e0006c0 Recovering log #667
2024/05/12-19:57:00.258537 7f003e0006c0 Delete type=3 #665
2024/05/12-19:57:00.258601 7f003e0006c0 Delete type=0 #667
2024/05/12-20:49:52.183624 7f00374006c0 Level-0 table #672: started
2024/05/12-20:49:52.183681 7f00374006c0 Level-0 table #672: 0 bytes OK
2024/05/12-20:49:52.190384 7f00374006c0 Delete type=0 #670
2024/05/12-20:49:52.197399 7f00374006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal!suuYN87Al1ZZWtQQ' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000671
MANIFEST-000675

View File

@ -1,7 +1,7 @@
2024/05/12-19:57:00.261517 7f003f4006c0 Recovering log #669
2024/05/12-19:57:00.271873 7f003f4006c0 Delete type=3 #667
2024/05/12-19:57:00.271979 7f003f4006c0 Delete type=0 #669
2024/05/12-20:49:52.155346 7f00374006c0 Level-0 table #674: started
2024/05/12-20:49:52.155386 7f00374006c0 Level-0 table #674: 0 bytes OK
2024/05/12-20:49:52.162269 7f00374006c0 Delete type=0 #672
2024/05/12-20:49:52.176604 7f00374006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end)
2024/05/14-23:48:30.559289 7f505fe006c0 Recovering log #673
2024/05/14-23:48:30.569004 7f505fe006c0 Delete type=3 #671
2024/05/14-23:48:30.569056 7f505fe006c0 Delete type=0 #673
2024/05/14-23:52:38.318581 7f50574006c0 Level-0 table #678: started
2024/05/14-23:52:38.318638 7f50574006c0 Level-0 table #678: 0 bytes OK
2024/05/14-23:52:38.325513 7f50574006c0 Delete type=0 #676
2024/05/14-23:52:38.325810 7f50574006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2024/05/12-17:23:23.774214 7f003f4006c0 Recovering log #665
2024/05/12-17:23:23.784867 7f003f4006c0 Delete type=3 #663
2024/05/12-17:23:23.785034 7f003f4006c0 Delete type=0 #665
2024/05/12-17:38:17.626800 7f00374006c0 Level-0 table #670: started
2024/05/12-17:38:17.626894 7f00374006c0 Level-0 table #670: 0 bytes OK
2024/05/12-17:38:17.634869 7f00374006c0 Delete type=0 #668
2024/05/12-17:38:17.641746 7f00374006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end)
2024/05/12-19:57:00.261517 7f003f4006c0 Recovering log #669
2024/05/12-19:57:00.271873 7f003f4006c0 Delete type=3 #667
2024/05/12-19:57:00.271979 7f003f4006c0 Delete type=0 #669
2024/05/12-20:49:52.155346 7f00374006c0 Level-0 table #674: started
2024/05/12-20:49:52.155386 7f00374006c0 Level-0 table #674: 0 bytes OK
2024/05/12-20:49:52.162269 7f00374006c0 Delete type=0 #672
2024/05/12-20:49:52.176604 7f00374006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000669
MANIFEST-000673

View File

@ -1,7 +1,7 @@
2024/05/12-19:57:00.287738 7f003f4006c0 Recovering log #667
2024/05/12-19:57:00.298489 7f003f4006c0 Delete type=3 #665
2024/05/12-19:57:00.298560 7f003f4006c0 Delete type=0 #667
2024/05/12-20:49:52.177056 7f00374006c0 Level-0 table #672: started
2024/05/12-20:49:52.177114 7f00374006c0 Level-0 table #672: 0 bytes OK
2024/05/12-20:49:52.183382 7f00374006c0 Delete type=0 #670
2024/05/12-20:49:52.197375 7f00374006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal!cZtNgayIw2QFhC9u' @ 0 : 0; will stop at (end)
2024/05/14-23:48:30.588953 7f505fe006c0 Recovering log #671
2024/05/14-23:48:30.598904 7f505fe006c0 Delete type=3 #669
2024/05/14-23:48:30.598970 7f505fe006c0 Delete type=0 #671
2024/05/14-23:52:38.332297 7f50574006c0 Level-0 table #676: started
2024/05/14-23:52:38.332334 7f50574006c0 Level-0 table #676: 0 bytes OK
2024/05/14-23:52:38.338769 7f50574006c0 Delete type=0 #674
2024/05/14-23:52:38.345148 7f50574006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal!cZtNgayIw2QFhC9u' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2024/05/12-17:23:23.805228 7f003f4006c0 Recovering log #663
2024/05/12-17:23:23.816434 7f003f4006c0 Delete type=3 #661
2024/05/12-17:23:23.816563 7f003f4006c0 Delete type=0 #663
2024/05/12-17:38:17.635091 7f00374006c0 Level-0 table #668: started
2024/05/12-17:38:17.635136 7f00374006c0 Level-0 table #668: 0 bytes OK
2024/05/12-17:38:17.641517 7f00374006c0 Delete type=0 #666
2024/05/12-17:38:17.641762 7f00374006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal!cZtNgayIw2QFhC9u' @ 0 : 0; will stop at (end)
2024/05/12-19:57:00.287738 7f003f4006c0 Recovering log #667
2024/05/12-19:57:00.298489 7f003f4006c0 Delete type=3 #665
2024/05/12-19:57:00.298560 7f003f4006c0 Delete type=0 #667
2024/05/12-20:49:52.177056 7f00374006c0 Level-0 table #672: started
2024/05/12-20:49:52.177114 7f00374006c0 Level-0 table #672: 0 bytes OK
2024/05/12-20:49:52.183382 7f00374006c0 Delete type=0 #670
2024/05/12-20:49:52.197375 7f00374006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal!cZtNgayIw2QFhC9u' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000669
MANIFEST-000673

View File

@ -1,7 +1,7 @@
2024/05/12-19:57:00.235722 7f003f4006c0 Recovering log #667
2024/05/12-19:57:00.245590 7f003f4006c0 Delete type=3 #665
2024/05/12-19:57:00.245724 7f003f4006c0 Delete type=0 #667
2024/05/12-20:49:52.132991 7f00374006c0 Level-0 table #672: started
2024/05/12-20:49:52.133062 7f00374006c0 Level-0 table #672: 0 bytes OK
2024/05/12-20:49:52.140350 7f00374006c0 Delete type=0 #670
2024/05/12-20:49:52.148293 7f00374006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal!yzw9I0r3hCK7PJnz' @ 0 : 0; will stop at (end)
2024/05/14-23:48:30.530779 7f505fe006c0 Recovering log #671
2024/05/14-23:48:30.541409 7f505fe006c0 Delete type=3 #669
2024/05/14-23:48:30.541472 7f505fe006c0 Delete type=0 #671
2024/05/14-23:52:38.311751 7f50574006c0 Level-0 table #676: started
2024/05/14-23:52:38.311798 7f50574006c0 Level-0 table #676: 0 bytes OK
2024/05/14-23:52:38.318370 7f50574006c0 Delete type=0 #674
2024/05/14-23:52:38.325791 7f50574006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal!yzw9I0r3hCK7PJnz' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2024/05/12-17:23:23.745187 7f003f4006c0 Recovering log #663
2024/05/12-17:23:23.756809 7f003f4006c0 Delete type=3 #661
2024/05/12-17:23:23.756929 7f003f4006c0 Delete type=0 #663
2024/05/12-17:38:17.611660 7f00374006c0 Level-0 table #668: started
2024/05/12-17:38:17.611724 7f00374006c0 Level-0 table #668: 0 bytes OK
2024/05/12-17:38:17.618646 7f00374006c0 Delete type=0 #666
2024/05/12-17:38:17.619051 7f00374006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal!yzw9I0r3hCK7PJnz' @ 0 : 0; will stop at (end)
2024/05/12-19:57:00.235722 7f003f4006c0 Recovering log #667
2024/05/12-19:57:00.245590 7f003f4006c0 Delete type=3 #665
2024/05/12-19:57:00.245724 7f003f4006c0 Delete type=0 #667
2024/05/12-20:49:52.132991 7f00374006c0 Level-0 table #672: started
2024/05/12-20:49:52.133062 7f00374006c0 Level-0 table #672: 0 bytes OK
2024/05/12-20:49:52.140350 7f00374006c0 Delete type=0 #670
2024/05/12-20:49:52.148293 7f00374006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal!yzw9I0r3hCK7PJnz' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000669
MANIFEST-000673

View File

@ -1,7 +1,7 @@
2024/05/12-19:57:00.221253 7f003e0006c0 Recovering log #667
2024/05/12-19:57:00.232421 7f003e0006c0 Delete type=3 #665
2024/05/12-19:57:00.232556 7f003e0006c0 Delete type=0 #667
2024/05/12-20:49:52.140566 7f00374006c0 Level-0 table #672: started
2024/05/12-20:49:52.140628 7f00374006c0 Level-0 table #672: 0 bytes OK
2024/05/12-20:49:52.147897 7f00374006c0 Delete type=0 #670
2024/05/12-20:49:52.148331 7f00374006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end)
2024/05/14-23:48:30.517212 7f505e0006c0 Recovering log #671
2024/05/14-23:48:30.526840 7f505e0006c0 Delete type=3 #669
2024/05/14-23:48:30.526888 7f505e0006c0 Delete type=0 #671
2024/05/14-23:52:38.305306 7f50574006c0 Level-0 table #676: started
2024/05/14-23:52:38.305336 7f50574006c0 Level-0 table #676: 0 bytes OK
2024/05/14-23:52:38.311573 7f50574006c0 Delete type=0 #674
2024/05/14-23:52:38.325771 7f50574006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2024/05/12-17:23:23.730267 7f003fe006c0 Recovering log #663
2024/05/12-17:23:23.741161 7f003fe006c0 Delete type=3 #661
2024/05/12-17:23:23.741293 7f003fe006c0 Delete type=0 #663
2024/05/12-17:38:17.597050 7f00374006c0 Level-0 table #668: started
2024/05/12-17:38:17.597119 7f00374006c0 Level-0 table #668: 0 bytes OK
2024/05/12-17:38:17.603670 7f00374006c0 Delete type=0 #666
2024/05/12-17:38:17.618985 7f00374006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end)
2024/05/12-19:57:00.221253 7f003e0006c0 Recovering log #667
2024/05/12-19:57:00.232421 7f003e0006c0 Delete type=3 #665
2024/05/12-19:57:00.232556 7f003e0006c0 Delete type=0 #667
2024/05/12-20:49:52.140566 7f00374006c0 Level-0 table #672: started
2024/05/12-20:49:52.140628 7f00374006c0 Level-0 table #672: 0 bytes OK
2024/05/12-20:49:52.147897 7f00374006c0 Delete type=0 #670
2024/05/12-20:49:52.148331 7f00374006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000312
MANIFEST-000316

View File

@ -1,8 +1,8 @@
2024/05/12-19:57:00.275118 7f003e0006c0 Recovering log #310
2024/05/12-19:57:00.285010 7f003e0006c0 Delete type=3 #308
2024/05/12-19:57:00.285145 7f003e0006c0 Delete type=0 #310
2024/05/12-20:49:52.162355 7f00374006c0 Level-0 table #315: started
2024/05/12-20:49:52.162382 7f00374006c0 Level-0 table #315: 0 bytes OK
2024/05/12-20:49:52.168680 7f00374006c0 Delete type=0 #313
2024/05/12-20:49:52.176626 7f00374006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end)
2024/05/12-20:49:52.176865 7f00374006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end)
2024/05/14-23:48:30.572338 7f505e0006c0 Recovering log #314
2024/05/14-23:48:30.582605 7f505e0006c0 Delete type=3 #312
2024/05/14-23:48:30.582656 7f505e0006c0 Delete type=0 #314
2024/05/14-23:52:38.325971 7f50574006c0 Level-0 table #319: started
2024/05/14-23:52:38.326024 7f50574006c0 Level-0 table #319: 0 bytes OK
2024/05/14-23:52:38.332122 7f50574006c0 Delete type=0 #317
2024/05/14-23:52:38.345133 7f50574006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end)
2024/05/14-23:52:38.345174 7f50574006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end)

View File

@ -1,8 +1,8 @@
2024/05/12-17:23:23.788971 7f003fe006c0 Recovering log #306
2024/05/12-17:23:23.801582 7f003fe006c0 Delete type=3 #304
2024/05/12-17:23:23.801758 7f003fe006c0 Delete type=0 #306
2024/05/12-17:38:17.619338 7f00374006c0 Level-0 table #311: started
2024/05/12-17:38:17.619401 7f00374006c0 Level-0 table #311: 0 bytes OK
2024/05/12-17:38:17.626389 7f00374006c0 Delete type=0 #309
2024/05/12-17:38:17.641726 7f00374006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end)
2024/05/12-17:38:17.641779 7f00374006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end)
2024/05/12-19:57:00.275118 7f003e0006c0 Recovering log #310
2024/05/12-19:57:00.285010 7f003e0006c0 Delete type=3 #308
2024/05/12-19:57:00.285145 7f003e0006c0 Delete type=0 #310
2024/05/12-20:49:52.162355 7f00374006c0 Level-0 table #315: started
2024/05/12-20:49:52.162382 7f00374006c0 Level-0 table #315: 0 bytes OK
2024/05/12-20:49:52.168680 7f00374006c0 Delete type=0 #313
2024/05/12-20:49:52.176626 7f00374006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end)
2024/05/12-20:49:52.176865 7f00374006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end)

Binary file not shown.

24
scriptPacker.js Normal file
View File

@ -0,0 +1,24 @@
import fs from "fs";
let path = "./scripts/"
let scripts = fs.readdirSync(path);
let count = 0;
let scriptObj = {};
for(let file of scripts)
{
let script = fs.readFileSync(path + file, {encoding:"utf8"});
scriptObj[file.split(".")[0]] = script;
count++;
}
let scriptLoader = `export default function()
{
Hooks.on("init", () =>
{
mergeObject(game.wfrp4e.config.effectScripts, ${JSON.stringify(scriptObj)});
});
}`
fs.writeFileSync("./loadScripts.js", scriptLoader)
console.log(`Packed ${count} scripts`);

View File

@ -0,0 +1,2 @@
let item = await fromUuid("Compendium.wfrp4e-core.items.weczkAMPlTjX7lqU")
this.actor.createEmbeddedDocuments("Item", [item])

View File

@ -0,0 +1 @@
return args.item?.system?.isRanged && args.data.targets[0]?.actor?.sizeNum < 3

View File

@ -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(`<p><strong>${this.actor.prototypeToken.name}</strong> has
<ul>
<li>gained 3 Poisoned Conditions that cannot be resisted at first</li>
<li>recovered ${this.actor.system.characteristics.t.bonus} Wounds</li>
<li>acquired the Regenerate Creature Trait.</li>
</ul>
Its up to Ranald if their regenerating can outpace their poisoning.</p>
<p>When all Poisoned Conditions are lost, so too is Regenerate.</p>`,
{ whisper: ChatMessage.getWhisperRecipients("GM"), blind: true })

View File

@ -0,0 +1 @@
this.actor.addCondition("blinded", 3)

View File

@ -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])

View File

@ -0,0 +1,5 @@
if (!args.flags.quietenedApplied)
{
args.fields.modifier += 10;
args.flags.quietenedApplied = true
}

View File

@ -0,0 +1 @@
return !args.options.terror && !args.extendedTest?.flags.wfrp4e?.fear

View File

@ -0,0 +1 @@
return !args.skill?.name.includes(game.i18n.localize("NAME.Row")) && !args.skill?.name.includes(game.i18n.localize("NAME.Sail"));

View File

@ -0,0 +1,22 @@
let spells = await game.wfrp4e.utility.findAll("spell", "Chargement des sorts")
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(`Impossible de trouver le sort ${lore}. Essayez à nouveau`)
}

View File

@ -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})

View File

@ -0,0 +1 @@
return !["t", "wp"].includes(args.characteristic)

View File

@ -0,0 +1,18 @@
let table = game.wfrp4e.tables.findTable("mutatephys");
if (!table)
{
return ui.notifications.error("La table des Mutations n'a pas été trouvée. Assurez vous que la table avec la clé `mutatephys` est bien importée dans le monde.")
}
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("L'item ne peut être trouvé: " + uuid)
}

View File

@ -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(`Lache ${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} (Durée)`}));
this.effect.updateSource({"duration.rounds" : roll.total})

View File

@ -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
}

View File

@ -0,0 +1,6 @@
if (args.applyAP && args.modifiers.ap.metal)
{
args.modifiers.ap.ignored += args.modifiers.ap.metal
args.modifiers.ap.details.push("<strong>" + this.effect.name + "</strong>: Ignore le Métal (" + args.modifiers.ap.metal + ")");
args.modifiers.ap.metal = 0
}

View File

@ -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})

View File

@ -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})

View File

@ -0,0 +1 @@
args.fields.modifier -= 20;

View File

@ -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")
}
})

View File

@ -0,0 +1,7 @@
if (!args.flags.strikeToStun)
{
args.flags.strikeToStun = true
args.fields.modifier += 20;
args.fields.hitLocation = "head";
}
args.fields.successBonus++;

View File

@ -0,0 +1 @@
return args.options.terror || args.extendedTest?.flags.wfrp4e?.fear

View File

@ -0,0 +1,6 @@
let type = this.item.getFlag("wfrp4e", "breath");
if (["fire", "electricity", "poison"].includes(type))
{
args.applyAP = false;
}

View File

@ -0,0 +1 @@
args.fields.modifier -= 20

View File

@ -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})
}

View File

@ -0,0 +1 @@
return !args.skill?.name.includes(game.i18n.localize("NAME.Language"));

View File

@ -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);

View File

@ -0,0 +1 @@
return args.characteristic != "t"

View File

@ -0,0 +1 @@
args.actor.details.move.run += 4

View File

@ -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}))

View File

@ -0,0 +1 @@
return args.characteristic != "wp"

View File

@ -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();
}

View File

@ -0,0 +1 @@
args.options.cardsharp = true;

View File

@ -0,0 +1,5 @@
if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0)
{
args.actor.addCondition("bleeding", 2);
}

View File

@ -0,0 +1 @@
return ["ws", "bs", "s", "ag", "t", "dex"].includes(args.characteristic)

View File

@ -0,0 +1,7 @@
let test = await args.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : " - " + this.effect.name, context : {failure: "Gain d'un état Assomé"}})
await test.roll();
if (test.failed)
{
args.actor.addCondition("stunned")
}

View File

@ -0,0 +1 @@
this.actor.status.addArmour(1, {source: this.effect, magical : true})

View File

@ -0,0 +1 @@
this.script.scriptNotification(`Ne peut saisir ${this.effect.name}!`);

View File

@ -0,0 +1,3 @@
let healed = parseInt(this.effect.sourceTest.result.SL)
this.actor.modifyWounds(healed)
this.script.scriptMessage(`Soins de ${healed} Blessures`)

View File

@ -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 = "Pied droit"
data.system.location.key = "rToe";
}
else if (this.item.system.location.key == "lLeg")
{
data.system.location.value = "Pied gauche"
data.system.location.key = "lToe";
}
this.actor.createEmbeddedDocuments("Item", [data])
}
this.effect.delete();

View File

@ -0,0 +1 @@
args.options.ballockKnife = true;

View File

@ -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)
}
})

View File

@ -0,0 +1,2 @@
if (args.effect.conditionId == "bleeding")
args.data.damage -= 1

View File

@ -0,0 +1 @@
return !args.skill?.name?.includes(game.i18n.localize("NAME.Sail"))

View File

@ -0,0 +1,10 @@
let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations), 1, "Choisir une localisation");
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})
}

View File

@ -0,0 +1 @@
return args.options.reload

View File

@ -0,0 +1 @@
return args.type != "channelling" && !args.skill?.name.includes(game.i18n.localize("NAME.Channelling"))

View File

@ -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
}

View File

@ -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})

View File

@ -0,0 +1 @@
game.wfrp4e.utility.postCorruptionTest(this.item.system.specification.value, {speaker : {alias: this.actor.prototypeToken.name}})

View File

@ -0,0 +1 @@
return args.skill?.name == game.i18n.localize("NAME.Bribery") || args.skill?.name.includes(game.i18n.localize("NAME.Stealth"));

View File

@ -0,0 +1 @@
return args.item?.system.attackType

View File

@ -0,0 +1 @@
return !["fel"].includes(args.characteristic)

View File

@ -0,0 +1 @@
return args.item?.name != game.i18n.localize("NAME.Navigation")

View File

@ -0,0 +1 @@
args.fields.slBonus += this.actor.system.characteristics.wp.bonus

View File

@ -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("Impossible d'Esquiver!")
}
return ["t", "int", "wp", "fel"].includes(args.characteristic)

View File

@ -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))
}
}

View File

@ -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);
}

View File

@ -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;
}
}

View File

@ -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})

View File

@ -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("Vide !", "error")
}

View File

@ -0,0 +1 @@
return args.skill?.name.includes(game.i18n.localize("NAME.Lore"));

View File

@ -0,0 +1,4 @@
if (args.test.isFumble)
{
args.test.result.other.push("@Table[doomrocket-fumble]")
}

View File

@ -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})

View File

@ -0,0 +1 @@
args.prefillModifiers.difficulty = "hard"

View File

@ -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(`<b>${this.effect.name}</b>: Gain de ${this.item.Advances} Avantages`)
this.actor.setAdvantage(this.item.Advances)
}
}

View File

@ -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 }))
})

Some files were not shown because too many files have changed in this diff Show More