Add all systems effects scripts + translations

This commit is contained in:
LeRatierBretonnien 2024-05-17 12:46:44 +02:00
parent 039df5c10a
commit a308181834
1421 changed files with 9940 additions and 547 deletions

View File

@ -1 +1 @@
MANIFEST-000697 MANIFEST-000701

View File

@ -1,7 +1,7 @@
2024/05/17-09:18:35.938297 7fe534c006c0 Recovering log #695 2024/05/17-11:04:57.796036 7f27116006c0 Recovering log #699
2024/05/17-09:18:35.991443 7fe534c006c0 Delete type=3 #693 2024/05/17-11:04:57.806593 7f27116006c0 Delete type=3 #697
2024/05/17-09:18:35.991560 7fe534c006c0 Delete type=0 #695 2024/05/17-11:04:57.806662 7f27116006c0 Delete type=0 #699
2024/05/17-09:19:36.697860 7fe52e2006c0 Level-0 table #700: started 2024/05/17-12:44:44.836364 7f270d8006c0 Level-0 table #704: started
2024/05/17-09:19:36.697941 7fe52e2006c0 Level-0 table #700: 0 bytes OK 2024/05/17-12:44:44.836392 7f270d8006c0 Level-0 table #704: 0 bytes OK
2024/05/17-09:19:36.704693 7fe52e2006c0 Delete type=0 #698 2024/05/17-12:44:44.842760 7f270d8006c0 Delete type=0 #702
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-12:44:44.863585 7f270d8006c0 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/17-08:21:24.883877 7fe5360006c0 Recovering log #691 2024/05/17-09:18:35.938297 7fe534c006c0 Recovering log #695
2024/05/17-08:21:24.937952 7fe5360006c0 Delete type=3 #689 2024/05/17-09:18:35.991443 7fe534c006c0 Delete type=3 #693
2024/05/17-08:21:24.938049 7fe5360006c0 Delete type=0 #691 2024/05/17-09:18:35.991560 7fe534c006c0 Delete type=0 #695
2024/05/17-09:04:58.970123 7fe52e2006c0 Level-0 table #696: started 2024/05/17-09:19:36.697860 7fe52e2006c0 Level-0 table #700: started
2024/05/17-09:04:58.970194 7fe52e2006c0 Level-0 table #696: 0 bytes OK 2024/05/17-09:19:36.697941 7fe52e2006c0 Level-0 table #700: 0 bytes OK
2024/05/17-09:04:58.976736 7fe52e2006c0 Delete type=0 #694 2024/05/17-09:19:36.704693 7fe52e2006c0 Delete type=0 #698
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:19:36.718677 7fe52e2006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal!suuYN87Al1ZZWtQQ' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000699 MANIFEST-000703

View File

@ -1,7 +1,7 @@
2024/05/17-09:18:35.994766 7fe5360006c0 Recovering log #697 2024/05/17-11:04:57.809771 7f27102006c0 Recovering log #701
2024/05/17-09:18:36.058245 7fe5360006c0 Delete type=3 #695 2024/05/17-11:04:57.819116 7f27102006c0 Delete type=3 #699
2024/05/17-09:18:36.058349 7fe5360006c0 Delete type=0 #697 2024/05/17-11:04:57.819179 7f27102006c0 Delete type=0 #701
2024/05/17-09:19:36.690166 7fe52e2006c0 Level-0 table #702: started 2024/05/17-12:44:44.850421 7f270d8006c0 Level-0 table #706: started
2024/05/17-09:19:36.690204 7fe52e2006c0 Level-0 table #702: 0 bytes OK 2024/05/17-12:44:44.850451 7f270d8006c0 Level-0 table #706: 0 bytes OK
2024/05/17-09:19:36.697272 7fe52e2006c0 Delete type=0 #700 2024/05/17-12:44:44.856700 7f270d8006c0 Delete type=0 #704
2024/05/17-09:19:36.697681 7fe52e2006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end) 2024/05/17-12:44:44.863623 7f270d8006c0 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/17-08:21:24.940735 7fe536a006c0 Recovering log #693 2024/05/17-09:18:35.994766 7fe5360006c0 Recovering log #697
2024/05/17-08:21:25.000891 7fe536a006c0 Delete type=3 #691 2024/05/17-09:18:36.058245 7fe5360006c0 Delete type=3 #695
2024/05/17-08:21:25.001036 7fe536a006c0 Delete type=0 #693 2024/05/17-09:18:36.058349 7fe5360006c0 Delete type=0 #697
2024/05/17-09:04:58.954314 7fe52e2006c0 Level-0 table #698: started 2024/05/17-09:19:36.690166 7fe52e2006c0 Level-0 table #702: started
2024/05/17-09:04:58.954354 7fe52e2006c0 Level-0 table #698: 0 bytes OK 2024/05/17-09:19:36.690204 7fe52e2006c0 Level-0 table #702: 0 bytes OK
2024/05/17-09:04:58.961425 7fe52e2006c0 Delete type=0 #696 2024/05/17-09:19:36.697272 7fe52e2006c0 Delete type=0 #700
2024/05/17-09:04:58.970001 7fe52e2006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end) 2024/05/17-09:19:36.697681 7fe52e2006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000697 MANIFEST-000701

View File

@ -1,7 +1,7 @@
2024/05/17-09:18:36.119253 7fe5360006c0 Recovering log #695 2024/05/17-11:04:57.835858 7f27102006c0 Recovering log #699
2024/05/17-09:18:36.181358 7fe5360006c0 Delete type=3 #693 2024/05/17-11:04:57.847048 7f27102006c0 Delete type=3 #697
2024/05/17-09:18:36.181531 7fe5360006c0 Delete type=0 #695 2024/05/17-11:04:57.847236 7f27102006c0 Delete type=0 #699
2024/05/17-09:19:36.704879 7fe52e2006c0 Level-0 table #700: started 2024/05/17-12:44:44.864033 7f270d8006c0 Level-0 table #704: started
2024/05/17-09:19:36.704925 7fe52e2006c0 Level-0 table #700: 0 bytes OK 2024/05/17-12:44:44.864082 7f270d8006c0 Level-0 table #704: 0 bytes OK
2024/05/17-09:19:36.711528 7fe52e2006c0 Delete type=0 #698 2024/05/17-12:44:44.871498 7f270d8006c0 Delete type=0 #702
2024/05/17-09:19:36.718713 7fe52e2006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal!cZtNgayIw2QFhC9u' @ 0 : 0; will stop at (end) 2024/05/17-12:44:44.871752 7f270d8006c0 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/17-08:21:25.076083 7fe536a006c0 Recovering log #691 2024/05/17-09:18:36.119253 7fe5360006c0 Recovering log #695
2024/05/17-08:21:25.129785 7fe536a006c0 Delete type=3 #689 2024/05/17-09:18:36.181358 7fe5360006c0 Delete type=3 #693
2024/05/17-08:21:25.129920 7fe536a006c0 Delete type=0 #691 2024/05/17-09:18:36.181531 7fe5360006c0 Delete type=0 #695
2024/05/17-09:04:58.977091 7fe52e2006c0 Level-0 table #696: started 2024/05/17-09:19:36.704879 7fe52e2006c0 Level-0 table #700: started
2024/05/17-09:04:58.977182 7fe52e2006c0 Level-0 table #696: 0 bytes OK 2024/05/17-09:19:36.704925 7fe52e2006c0 Level-0 table #700: 0 bytes OK
2024/05/17-09:04:58.984079 7fe52e2006c0 Delete type=0 #694 2024/05/17-09:19:36.711528 7fe52e2006c0 Delete type=0 #698
2024/05/17-09:04:58.984296 7fe52e2006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal!cZtNgayIw2QFhC9u' @ 0 : 0; will stop at (end) 2024/05/17-09:19:36.718713 7fe52e2006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal!cZtNgayIw2QFhC9u' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000697 MANIFEST-000701

View File

@ -1,7 +1,7 @@
2024/05/17-09:18:35.865103 7fe5360006c0 Recovering log #695 2024/05/17-11:04:57.782664 7f27102006c0 Recovering log #699
2024/05/17-09:18:35.934830 7fe5360006c0 Delete type=3 #693 2024/05/17-11:04:57.792823 7f27102006c0 Delete type=3 #697
2024/05/17-09:18:35.934985 7fe5360006c0 Delete type=0 #695 2024/05/17-11:04:57.792891 7f27102006c0 Delete type=0 #699
2024/05/17-09:19:36.676671 7fe52e2006c0 Level-0 table #700: started 2024/05/17-12:44:44.856874 7f270d8006c0 Level-0 table #704: started
2024/05/17-09:19:36.676749 7fe52e2006c0 Level-0 table #700: 0 bytes OK 2024/05/17-12:44:44.856907 7f270d8006c0 Level-0 table #704: 0 bytes OK
2024/05/17-09:19:36.683586 7fe52e2006c0 Delete type=0 #698 2024/05/17-12:44:44.863227 7f270d8006c0 Delete type=0 #702
2024/05/17-09:19:36.697623 7fe52e2006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal!yzw9I0r3hCK7PJnz' @ 0 : 0; will stop at (end) 2024/05/17-12:44:44.863636 7f270d8006c0 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/17-08:21:24.818854 7fe536a006c0 Recovering log #691 2024/05/17-09:18:35.865103 7fe5360006c0 Recovering log #695
2024/05/17-08:21:24.880933 7fe536a006c0 Delete type=3 #689 2024/05/17-09:18:35.934830 7fe5360006c0 Delete type=3 #693
2024/05/17-08:21:24.881044 7fe536a006c0 Delete type=0 #691 2024/05/17-09:18:35.934985 7fe5360006c0 Delete type=0 #695
2024/05/17-09:04:58.940179 7fe52e2006c0 Level-0 table #696: started 2024/05/17-09:19:36.676671 7fe52e2006c0 Level-0 table #700: started
2024/05/17-09:04:58.940238 7fe52e2006c0 Level-0 table #696: 0 bytes OK 2024/05/17-09:19:36.676749 7fe52e2006c0 Level-0 table #700: 0 bytes OK
2024/05/17-09:04:58.947190 7fe52e2006c0 Delete type=0 #694 2024/05/17-09:19:36.683586 7fe52e2006c0 Delete type=0 #698
2024/05/17-09:04:58.969926 7fe52e2006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal!yzw9I0r3hCK7PJnz' @ 0 : 0; will stop at (end) 2024/05/17-09:19:36.697623 7fe52e2006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal!yzw9I0r3hCK7PJnz' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000697 MANIFEST-000701

View File

@ -1,7 +1,7 @@
2024/05/17-09:18:35.800961 7fe534c006c0 Recovering log #695 2024/05/17-11:04:57.769897 7f27116006c0 Recovering log #699
2024/05/17-09:18:35.861612 7fe534c006c0 Delete type=3 #693 2024/05/17-11:04:57.779543 7f27116006c0 Delete type=3 #697
2024/05/17-09:18:35.861767 7fe534c006c0 Delete type=0 #695 2024/05/17-11:04:57.779674 7f27116006c0 Delete type=0 #699
2024/05/17-09:19:36.683771 7fe52e2006c0 Level-0 table #700: started 2024/05/17-12:44:44.827875 7f270d8006c0 Level-0 table #704: started
2024/05/17-09:19:36.683809 7fe52e2006c0 Level-0 table #700: 0 bytes OK 2024/05/17-12:44:44.827939 7f270d8006c0 Level-0 table #704: 0 bytes OK
2024/05/17-09:19:36.690012 7fe52e2006c0 Delete type=0 #698 2024/05/17-12:44:44.835981 7f270d8006c0 Delete type=0 #702
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-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)

View File

@ -1,7 +1,7 @@
2024/05/17-08:21:24.759453 7fe5360006c0 Recovering log #691 2024/05/17-09:18:35.800961 7fe534c006c0 Recovering log #695
2024/05/17-08:21:24.814916 7fe5360006c0 Delete type=3 #689 2024/05/17-09:18:35.861612 7fe534c006c0 Delete type=3 #693
2024/05/17-08:21:24.815076 7fe5360006c0 Delete type=0 #691 2024/05/17-09:18:35.861767 7fe534c006c0 Delete type=0 #695
2024/05/17-09:04:58.947462 7fe52e2006c0 Level-0 table #696: started 2024/05/17-09:19:36.683771 7fe52e2006c0 Level-0 table #700: started
2024/05/17-09:04:58.947511 7fe52e2006c0 Level-0 table #696: 0 bytes OK 2024/05/17-09:19:36.683809 7fe52e2006c0 Level-0 table #700: 0 bytes OK
2024/05/17-09:04:58.954096 7fe52e2006c0 Delete type=0 #694 2024/05/17-09:19:36.690012 7fe52e2006c0 Delete type=0 #698
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:19:36.697655 7fe52e2006c0 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-000340 MANIFEST-000344

View File

@ -1,8 +1,8 @@
2024/05/17-09:18:36.061831 7fe534c006c0 Recovering log #338 2024/05/17-11:04:57.822877 7f27116006c0 Recovering log #342
2024/05/17-09:18:36.115673 7fe534c006c0 Delete type=3 #336 2024/05/17-11:04:57.832725 7f27116006c0 Delete type=3 #340
2024/05/17-09:18:36.115838 7fe534c006c0 Delete type=0 #338 2024/05/17-11:04:57.832777 7f27116006c0 Delete type=0 #342
2024/05/17-09:19:36.711754 7fe52e2006c0 Level-0 table #343: started 2024/05/17-12:44:44.842930 7f270d8006c0 Level-0 table #347: started
2024/05/17-09:19:36.711813 7fe52e2006c0 Level-0 table #343: 0 bytes OK 2024/05/17-12:44:44.842995 7f270d8006c0 Level-0 table #347: 0 bytes OK
2024/05/17-09:19:36.718459 7fe52e2006c0 Delete type=0 #341 2024/05/17-12:44:44.850266 7f270d8006c0 Delete type=0 #345
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-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-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-12:44:44.864005 7f270d8006c0 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/17-08:21:25.004562 7fe5360006c0 Recovering log #334 2024/05/17-09:18:36.061831 7fe534c006c0 Recovering log #338
2024/05/17-08:21:25.072829 7fe5360006c0 Delete type=3 #332 2024/05/17-09:18:36.115673 7fe534c006c0 Delete type=3 #336
2024/05/17-08:21:25.072953 7fe5360006c0 Delete type=0 #334 2024/05/17-09:18:36.115838 7fe534c006c0 Delete type=0 #338
2024/05/17-09:04:58.961703 7fe52e2006c0 Level-0 table #339: started 2024/05/17-09:19:36.711754 7fe52e2006c0 Level-0 table #343: started
2024/05/17-09:04:58.961771 7fe52e2006c0 Level-0 table #339: 0 bytes OK 2024/05/17-09:19:36.711813 7fe52e2006c0 Level-0 table #343: 0 bytes OK
2024/05/17-09:04:58.969548 7fe52e2006c0 Delete type=0 #337 2024/05/17-09:19:36.718459 7fe52e2006c0 Delete type=0 #341
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: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: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:19:36.718776 7fe52e2006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal!yfZxl4I7XAuUF6r3' @ 0 : 0; will stop at (end)

Binary file not shown.

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", "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`)
}

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

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(`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})

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 Metal (" + 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: "Gained a Stunned Condition"}})
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(`Cannot enter ${this.effect.name}!`);

View File

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

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 = "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();

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

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("Cannot Dodge!")
}
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("None left!", "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>: Gained ${this.item.Advances} Advantage`)
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 }))
})

View File

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

View File

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

View File

@ -0,0 +1,2 @@
args.data.canReverse = true;
args.options.fieldDressing = true;

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