5etools-utils 0.4.7 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5etools-utils",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "Shared utilities for the 5etools ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/Api.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "backgrounds.json",
4
- "version": "1.3.1",
4
+ "version": "1.3.2",
5
5
  "type": "object",
6
6
  "$defs": {
7
7
  "backgroundData": {
@@ -55,6 +55,9 @@
55
55
  "additionalSpells": {
56
56
  "$ref": "util.json#/$defs/additionalSpellsArray"
57
57
  },
58
+ "ability": {
59
+ "$ref": "util.json#/$defs/abilityScores"
60
+ },
58
61
  "fromFeature": {
59
62
  "description": "A lookup of other properties which should be tied to the \"Feature: ...\" entry. This is used when e.g. customizing a background during import to a VTT.",
60
63
  "type": "object",
@@ -167,6 +170,9 @@
167
170
  "additionalSpells": {
168
171
  "$ref": "util.json#/$defs/additionalSpellsArray"
169
172
  },
173
+ "ability": {
174
+ "$ref": "util.json#/$defs/abilityScores"
175
+ },
170
176
  "fromFeature": {
171
177
  "description": "A lookup of other properties which should be tied to the \"Feature: ...\" entry. This is used when e.g. customizing a background during import to a VTT.",
172
178
  "type": "object",
@@ -282,6 +288,9 @@
282
288
  "additionalSpells": {
283
289
  "$ref": "util.json#/$defs/additionalSpellsArray"
284
290
  },
291
+ "ability": {
292
+ "$ref": "util.json#/$defs/abilityScores"
293
+ },
285
294
  "fromFeature": {
286
295
  "description": "A lookup of other properties which should be tied to the \"Feature: ...\" entry. This is used when e.g. customizing a background during import to a VTT.",
287
296
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
4
4
  "$id": "class.json",
5
5
  "type": "object",
6
6
  "$defs": {
@@ -519,7 +519,7 @@
519
519
  "description": "Homebrew use only; adds custom subclasses to lists in spells.\nDoes not enable VTT import - see \"additionalSpells\".",
520
520
  "type": "array",
521
521
  "items": {
522
- "$ref": "#/$defs/spellRef"
522
+ "$ref": "../util.json#/$defs/spellListSpellRef"
523
523
  }
524
524
  },
525
525
  "subSubclassSpells": {
@@ -530,7 +530,7 @@
530
530
  "type": "array",
531
531
  "description": "For example, a druid circle, religious order, or other sub-subclass name",
532
532
  "items": {
533
- "$ref": "#/$defs/spellRef"
533
+ "$ref": "../util.json#/$defs/spellListSpellRef"
534
534
  }
535
535
  }
536
536
  }
@@ -676,7 +676,7 @@
676
676
  "description": "Homebrew use only; adds custom subclasses to lists in spells.\nDoes not enable VTT import - see \"additionalSpells\".",
677
677
  "type": "array",
678
678
  "items": {
679
- "$ref": "#/$defs/spellRef"
679
+ "$ref": "../util.json#/$defs/spellListSpellRef"
680
680
  }
681
681
  },
682
682
  "subSubclassSpells": {
@@ -687,7 +687,7 @@
687
687
  "type": "array",
688
688
  "description": "For example, a druid circle, religious order, or other sub-subclass name",
689
689
  "items": {
690
- "$ref": "#/$defs/spellRef"
690
+ "$ref": "../util.json#/$defs/spellListSpellRef"
691
691
  }
692
692
  }
693
693
  }
@@ -888,7 +888,7 @@
888
888
  "description": "Homebrew use only; adds custom subclasses to lists in spells.\nDoes not enable VTT import - see \"additionalSpells\".",
889
889
  "type": "array",
890
890
  "items": {
891
- "$ref": "#/$defs/spellRef"
891
+ "$ref": "../util.json#/$defs/spellListSpellRef"
892
892
  }
893
893
  },
894
894
  "subSubclassSpells": {
@@ -899,7 +899,7 @@
899
899
  "type": "array",
900
900
  "description": "For example, a druid circle, religious order, or other sub-subclass name",
901
901
  "items": {
902
- "$ref": "#/$defs/spellRef"
902
+ "$ref": "../util.json#/$defs/spellListSpellRef"
903
903
  }
904
904
  }
905
905
  }
@@ -1267,7 +1267,7 @@
1267
1267
  "description": "Homebrew use only",
1268
1268
  "type": "array",
1269
1269
  "items": {
1270
- "$ref": "#/$defs/spellRef"
1270
+ "$ref": "../util.json#/$defs/spellListSpellRef"
1271
1271
  }
1272
1272
  },
1273
1273
  "requirementsSpecial": {
@@ -1583,7 +1583,7 @@
1583
1583
  "description": "Homebrew use only",
1584
1584
  "type": "array",
1585
1585
  "items": {
1586
- "$ref": "#/$defs/spellRef"
1586
+ "$ref": "../util.json#/$defs/spellListSpellRef"
1587
1587
  }
1588
1588
  },
1589
1589
  "requirementsSpecial": {
@@ -1957,7 +1957,7 @@
1957
1957
  "description": "Homebrew use only",
1958
1958
  "type": "array",
1959
1959
  "items": {
1960
- "$ref": "#/$defs/spellRef"
1960
+ "$ref": "../util.json#/$defs/spellListSpellRef"
1961
1961
  }
1962
1962
  },
1963
1963
  "requirementsSpecial": {
@@ -1978,44 +1978,6 @@
1978
1978
  }
1979
1979
  },
1980
1980
  "additionalProperties": false
1981
- },
1982
- "spellRef": {
1983
- "description": "A reference to a spell or an existing spell list, linked by name and source. Assumes PHB as the source, if none is provided.",
1984
- "oneOf": [
1985
- {
1986
- "description": "Another class/subclass/subsubclass's spell list",
1987
- "type": "object",
1988
- "properties": {
1989
- "className": {
1990
- "type": "string"
1991
- },
1992
- "classSource": {
1993
- "type": "string"
1994
- },
1995
- "subclassName": {
1996
- "type": "string"
1997
- },
1998
- "subclassSource": {
1999
- "type": "string"
2000
- },
2001
- "subSubclassName": {
2002
- "type": "string"
2003
- },
2004
- "subSubclassSource": {
2005
- "type": "string"
2006
- }
2007
- },
2008
- "required": [
2009
- "className",
2010
- "classSource"
2011
- ],
2012
- "additionalProperties": false
2013
- },
2014
- {
2015
- "description": "A spell UID of the form \"fireball\" (PHB source assumed by default) or \"shape water|xge\"",
2016
- "type": "string"
2017
- }
2018
- ]
2019
1981
  }
2020
1982
  },
2021
1983
  "properties": {
@@ -29,89 +29,7 @@
29
29
  }
30
30
  },
31
31
  "ability": {
32
- "type": "array",
33
- "minItems": 1,
34
- "items": {
35
- "type": "object",
36
- "properties": {
37
- "str": {
38
- "type": "integer"
39
- },
40
- "dex": {
41
- "type": "integer"
42
- },
43
- "con": {
44
- "type": "integer"
45
- },
46
- "int": {
47
- "type": "integer"
48
- },
49
- "wis": {
50
- "type": "integer"
51
- },
52
- "cha": {
53
- "type": "integer"
54
- },
55
- "choose": {
56
- "type": "object",
57
- "properties": {
58
- "from": {
59
- "type": "array",
60
- "items": {
61
- "enum": [
62
- "str",
63
- "dex",
64
- "con",
65
- "int",
66
- "wis",
67
- "cha"
68
- ]
69
- },
70
- "uniqueItems": true
71
- },
72
- "count": {
73
- "type": "integer"
74
- },
75
- "amount": {
76
- "type": "integer"
77
- },
78
- "weighted": {
79
- "type": "object",
80
- "properties": {
81
- "from": {
82
- "type": "array",
83
- "items": {
84
- "enum": [
85
- "str",
86
- "dex",
87
- "con",
88
- "int",
89
- "wis",
90
- "cha"
91
- ]
92
- },
93
- "uniqueItems": true
94
- },
95
- "weights": {
96
- "type": "array",
97
- "items": {
98
- "type": "integer"
99
- }
100
- }
101
- }
102
- },
103
- "entry": {
104
- "$ref": "entry.json"
105
- }
106
- },
107
- "additionalProperties": false
108
- },
109
- "hidden": {
110
- "type": "boolean"
111
- }
112
- },
113
- "additionalProperties": false
114
- }
32
+ "$ref": "util.json#/$defs/abilityScores"
115
33
  },
116
34
  "srd": {
117
35
  "$ref": "util.json#/$defs/srd"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "1.10.5",
3
+ "version": "1.10.6",
4
4
  "type": "object",
5
5
  "description": "Homebrew for 5etools. Should include arrays titled similarly to the main site data, e.g. `spell` or `class`",
6
6
  "$defs": {
@@ -28,9 +28,7 @@
28
28
  },
29
29
  "minItems": 1,
30
30
  "uniqueItems": true
31
- }
32
- },
33
- "properties": {
31
+ },
34
32
  "_meta": {
35
33
  "description": "Metadata for the included data arrays",
36
34
  "type": "object",
@@ -291,6 +289,51 @@
291
289
  ],
292
290
  "additionalProperties": false
293
291
  },
292
+ "spellList": {
293
+ "type": "array",
294
+ "items": {
295
+ "$ref": "#/$defs/_spellListItem"
296
+ },
297
+ "minItems": 1,
298
+ "uniqueItems": true
299
+ },
300
+ "_spellListItem": {
301
+ "type": "object",
302
+ "properties": {
303
+ "name": {
304
+ "type": "string"
305
+ },
306
+ "source": {
307
+ "type": "string"
308
+ },
309
+ "spellListType": {
310
+ "type": "string",
311
+ "enum": [
312
+ "groups"
313
+ ]
314
+ },
315
+ "spells": {
316
+ "type": "array",
317
+ "items": {
318
+ "$ref": "util.json#/$defs/spellListSpellRef"
319
+ },
320
+ "minItems": 1,
321
+ "uniqueItems": true
322
+ }
323
+ },
324
+ "required": [
325
+ "name",
326
+ "source",
327
+ "spellListType",
328
+ "spells"
329
+ ],
330
+ "additionalProperties": false
331
+ }
332
+ },
333
+ "properties": {
334
+ "_meta": {
335
+ "$ref": "#/$defs/_meta"
336
+ },
294
337
  "$schema": {
295
338
  "description": "An optional key that allows you specify the schema you want to verify against in compatible IDEs.\nIt is advised that you leave this key out when submitting to the repo.",
296
339
  "type": "string",
@@ -555,6 +598,9 @@
555
598
  },
556
599
  "sense": {
557
600
  "$ref": "senses.json#/properties/sense"
601
+ },
602
+ "spellList": {
603
+ "$ref": "#/$defs/spellList"
558
604
  }
559
605
  },
560
606
  "additionalProperties": false,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "races.json",
4
- "version": "1.12.1",
4
+ "version": "1.12.2",
5
5
  "type": "object",
6
6
  "$defs": {
7
7
  "sharedData": {
@@ -29,7 +29,7 @@
29
29
  "$ref": "util.json#/$defs/reprintedAs"
30
30
  },
31
31
  "ability": {
32
- "$ref": "#/$defs/abilityScores"
32
+ "$ref": "util.json#/$defs/abilityScores"
33
33
  },
34
34
  "size": {
35
35
  "type": "array",
@@ -263,7 +263,7 @@
263
263
  "$ref": "util.json#/$defs/reprintedAs"
264
264
  },
265
265
  "ability": {
266
- "$ref": "#/$defs/abilityScores"
266
+ "$ref": "util.json#/$defs/abilityScores"
267
267
  },
268
268
  "size": {
269
269
  "type": "array",
@@ -510,82 +510,6 @@
510
510
  }
511
511
  ]
512
512
  },
513
- "abilityScores": {
514
- "type": "array",
515
- "items": {
516
- "type": "object",
517
- "properties": {
518
- "str": {
519
- "type": "integer"
520
- },
521
- "dex": {
522
- "type": "integer"
523
- },
524
- "con": {
525
- "type": "integer"
526
- },
527
- "int": {
528
- "type": "integer"
529
- },
530
- "wis": {
531
- "type": "integer"
532
- },
533
- "cha": {
534
- "type": "integer"
535
- },
536
- "choose": {
537
- "type": "object",
538
- "properties": {
539
- "from": {
540
- "type": "array",
541
- "items": {
542
- "enum": [
543
- "str",
544
- "dex",
545
- "con",
546
- "int",
547
- "wis",
548
- "cha"
549
- ]
550
- },
551
- "uniqueItems": true
552
- },
553
- "count": {
554
- "type": "integer"
555
- },
556
- "amount": {
557
- "type": "integer"
558
- },
559
- "weighted": {
560
- "type": "object",
561
- "properties": {
562
- "from": {
563
- "type": "array",
564
- "items": {
565
- "enum": [
566
- "str",
567
- "dex",
568
- "con",
569
- "int",
570
- "wis",
571
- "cha"
572
- ]
573
- },
574
- "uniqueItems": true
575
- },
576
- "weights": {
577
- "type": "array",
578
- "items": {
579
- "type": "integer"
580
- }
581
- }
582
- }
583
- }
584
- }
585
- }
586
- }
587
- }
588
- },
589
513
  "heightAndWeight": {
590
514
  "type": "object",
591
515
  "properties": {
@@ -664,7 +588,7 @@
664
588
  "$ref": "util.json#/$defs/reprintedAs"
665
589
  },
666
590
  "ability": {
667
- "$ref": "#/$defs/abilityScores"
591
+ "$ref": "util.json#/$defs/abilityScores"
668
592
  },
669
593
  "size": {
670
594
  "type": "array",
@@ -902,7 +826,7 @@
902
826
  "$ref": "util.json#/$defs/reprintedAs"
903
827
  },
904
828
  "ability": {
905
- "$ref": "#/$defs/abilityScores"
829
+ "$ref": "util.json#/$defs/abilityScores"
906
830
  },
907
831
  "size": {
908
832
  "type": "array",
@@ -1201,7 +1125,7 @@
1201
1125
  "$ref": "util.json#/$defs/reprintedAs"
1202
1126
  },
1203
1127
  "ability": {
1204
- "$ref": "#/$defs/abilityScores"
1128
+ "$ref": "util.json#/$defs/abilityScores"
1205
1129
  },
1206
1130
  "size": {
1207
1131
  "type": "array",
@@ -1451,7 +1375,7 @@
1451
1375
  "$ref": "util.json#/$defs/reprintedAs"
1452
1376
  },
1453
1377
  "ability": {
1454
- "$ref": "#/$defs/abilityScores"
1378
+ "$ref": "util.json#/$defs/abilityScores"
1455
1379
  },
1456
1380
  "size": {
1457
1381
  "type": "array",
@@ -3,7 +3,7 @@
3
3
  "$id": "util.json",
4
4
  "title": "Util",
5
5
  "description": "Utility definitions to be used in other schemas.",
6
- "version": "1.13.4",
6
+ "version": "1.13.6",
7
7
  "$defs": {
8
8
  "metaBlock": {
9
9
  "type": "object",
@@ -1201,6 +1201,91 @@
1201
1201
  "uniqueItems": true,
1202
1202
  "minItems": 1
1203
1203
  },
1204
+ "abilityScores": {
1205
+ "type": "array",
1206
+ "minItems": 1,
1207
+ "items": {
1208
+ "type": "object",
1209
+ "properties": {
1210
+ "str": {
1211
+ "type": "integer"
1212
+ },
1213
+ "dex": {
1214
+ "type": "integer"
1215
+ },
1216
+ "con": {
1217
+ "type": "integer"
1218
+ },
1219
+ "int": {
1220
+ "type": "integer"
1221
+ },
1222
+ "wis": {
1223
+ "type": "integer"
1224
+ },
1225
+ "cha": {
1226
+ "type": "integer"
1227
+ },
1228
+ "choose": {
1229
+ "type": "object",
1230
+ "properties": {
1231
+ "from": {
1232
+ "type": "array",
1233
+ "items": {
1234
+ "enum": [
1235
+ "str",
1236
+ "dex",
1237
+ "con",
1238
+ "int",
1239
+ "wis",
1240
+ "cha"
1241
+ ]
1242
+ },
1243
+ "uniqueItems": true
1244
+ },
1245
+ "count": {
1246
+ "type": "integer"
1247
+ },
1248
+ "amount": {
1249
+ "type": "integer"
1250
+ },
1251
+ "weighted": {
1252
+ "type": "object",
1253
+ "properties": {
1254
+ "from": {
1255
+ "type": "array",
1256
+ "items": {
1257
+ "enum": [
1258
+ "str",
1259
+ "dex",
1260
+ "con",
1261
+ "int",
1262
+ "wis",
1263
+ "cha"
1264
+ ]
1265
+ },
1266
+ "uniqueItems": true
1267
+ },
1268
+ "weights": {
1269
+ "type": "array",
1270
+ "items": {
1271
+ "type": "integer"
1272
+ }
1273
+ }
1274
+ }
1275
+ },
1276
+ "entry": {
1277
+ "$ref": "entry.json"
1278
+ }
1279
+ },
1280
+ "additionalProperties": false
1281
+ },
1282
+ "hidden": {
1283
+ "type": "boolean"
1284
+ }
1285
+ },
1286
+ "additionalProperties": false
1287
+ }
1288
+ },
1204
1289
  "additionalFeatsArray": {
1205
1290
  "type": "array",
1206
1291
  "items": {
@@ -3705,6 +3790,90 @@
3705
3790
  ]
3706
3791
  }
3707
3792
  },
3793
+ "spellListSpellRef": {
3794
+ "description": "A reference to a spell or an existing spell list, linked by name and source. Assumes PHB as the source, if none is provided.",
3795
+ "oneOf": [
3796
+ {
3797
+ "description": "Another class's spell list",
3798
+ "type": "object",
3799
+ "properties": {
3800
+ "className": {
3801
+ "type": "string"
3802
+ },
3803
+ "classSource": {
3804
+ "type": "string"
3805
+ }
3806
+ },
3807
+ "required": [
3808
+ "className",
3809
+ "classSource"
3810
+ ],
3811
+ "additionalProperties": false
3812
+ },
3813
+ {
3814
+ "description": "Another subclass's spell list",
3815
+ "type": "object",
3816
+ "properties": {
3817
+ "className": {
3818
+ "type": "string"
3819
+ },
3820
+ "classSource": {
3821
+ "type": "string"
3822
+ },
3823
+ "subclassName": {
3824
+ "type": "string"
3825
+ },
3826
+ "subclassSource": {
3827
+ "type": "string"
3828
+ }
3829
+ },
3830
+ "required": [
3831
+ "className",
3832
+ "classSource",
3833
+ "subclassName",
3834
+ "subclassSource"
3835
+ ],
3836
+ "additionalProperties": false
3837
+ },
3838
+ {
3839
+ "description": "Another sub-subclass's spell list",
3840
+ "type": "object",
3841
+ "properties": {
3842
+ "className": {
3843
+ "type": "string"
3844
+ },
3845
+ "classSource": {
3846
+ "type": "string"
3847
+ },
3848
+ "subclassName": {
3849
+ "type": "string"
3850
+ },
3851
+ "subclassSource": {
3852
+ "type": "string"
3853
+ },
3854
+ "subSubclassName": {
3855
+ "type": "string"
3856
+ },
3857
+ "subSubclassSource": {
3858
+ "type": "string"
3859
+ }
3860
+ },
3861
+ "required": [
3862
+ "className",
3863
+ "classSource",
3864
+ "subclassName",
3865
+ "subclassSource",
3866
+ "subSubclassName",
3867
+ "subSubclassSource"
3868
+ ],
3869
+ "additionalProperties": false
3870
+ },
3871
+ {
3872
+ "description": "A spell UID of the form \"fireball\" (PHB source assumed by default) or \"shape water|xge\"",
3873
+ "type": "string"
3874
+ }
3875
+ ]
3876
+ },
3708
3877
  "foundrySystemObject": {
3709
3878
  "type": "object"
3710
3879
  },