optolith-database-schema 0.4.1 → 0.5.0

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.
Files changed (117) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/lib/config.d.ts +2 -0
  3. package/lib/config.js +2 -0
  4. package/lib/main.d.ts +1 -1
  5. package/lib/main.js +28 -19
  6. package/lib/types/Cantrip.d.ts +2 -3
  7. package/lib/types/Culture.d.ts +8 -11
  8. package/lib/types/Lessons_Curriculum.d.ts +5 -4
  9. package/lib/types/Lessons_Guideline.d.ts +1 -1
  10. package/lib/types/Patron.d.ts +28 -4
  11. package/lib/types/Profession.d.ts +7 -6
  12. package/lib/types/Race.d.ts +12 -14
  13. package/lib/types/TargetCategory.d.ts +2 -3
  14. package/lib/types/_Activatable.d.ts +21 -22
  15. package/lib/types/_ActivatableSelectOptionCategory.d.ts +1 -1
  16. package/lib/types/_ActivatableSkillCost.d.ts +28 -1
  17. package/lib/types/_ActivatableSkillDuration.d.ts +1 -1
  18. package/lib/types/_ActivatableSkillRange.d.ts +3 -0
  19. package/lib/types/_CommonnessRatedAdvantageDisadvantage.d.ts +2 -4
  20. package/lib/types/_DiseasePoison.d.ts +3 -3
  21. package/lib/types/_Identifier.d.ts +1175 -247
  22. package/lib/types/_Identifier.js +0 -228
  23. package/lib/types/_IdentifierGroup.d.ts +27 -0
  24. package/lib/types/_IdentifierGroup.js +1 -0
  25. package/lib/types/_Prerequisite.d.ts +38 -36
  26. package/lib/types/_ResponsiveText.d.ts +1 -1
  27. package/lib/types/_SimpleReferences.d.ts +50 -253
  28. package/lib/types/equipment/EquipmentPackage.d.ts +1 -1
  29. package/lib/types/equipment/item/Elixir.d.ts +75 -0
  30. package/lib/types/equipment/item/Elixir.js +5 -0
  31. package/lib/types/equipment/item/EquipmentOfBlessedOnes.d.ts +1 -1
  32. package/lib/types/equipment/item/Poison.d.ts +220 -47
  33. package/lib/types/equipment/item/Poison.js +10 -0
  34. package/lib/types/equipment/item/ToolOfTheTrade.d.ts +6 -2
  35. package/lib/types/equipment/item/_Herbary.d.ts +31 -0
  36. package/lib/types/equipment/item/_Herbary.js +22 -0
  37. package/lib/types/equipment/item/_MeleeWeapon.d.ts +2 -9
  38. package/lib/types/equipment/item/_RangedWeapon.d.ts +2 -3
  39. package/lib/types/magicalActions/AnimistPower.d.ts +0 -1
  40. package/lib/types/magicalActions/MagicalRune.d.ts +22 -3
  41. package/lib/types/magicalActions/_SkillReference.d.ts +3 -2
  42. package/lib/types/magicalActions/_SkillReference.js +5 -5
  43. package/lib/types/prerequisites/PrerequisiteGroups.d.ts +2 -20
  44. package/lib/types/prerequisites/single/ActivatablePrerequisite.d.ts +1 -62
  45. package/lib/types/prerequisites/single/AnimistPowerPrerequisite.d.ts +2 -3
  46. package/lib/types/prerequisites/single/CulturePrerequisite.d.ts +5 -2
  47. package/lib/types/prerequisites/single/EnhancementPrerequisite.d.ts +1 -1
  48. package/lib/types/prerequisites/single/InfluencePrerequisite.d.ts +2 -3
  49. package/lib/types/prerequisites/single/RacePrerequisite.d.ts +5 -2
  50. package/lib/types/prerequisites/single/RatedPrerequisite.d.ts +1 -18
  51. package/lib/types/prerequisites/single/RulePrerequisite.d.ts +1 -1
  52. package/lib/types/prerequisites/single/SocialStatusPrerequisite.d.ts +2 -4
  53. package/lib/types/prerequisites/single/StatePrerequisite.d.ts +2 -2
  54. package/lib/types/rule/CoreRule.d.ts +4 -7
  55. package/lib/types/source/_PublicationRef.d.ts +2 -3
  56. package/lib/types/specialAbility/BlessedTradition.d.ts +1 -1
  57. package/lib/types/specialAbility/CombatStyleSpecialAbility.d.ts +2 -1
  58. package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.d.ts +2 -1
  59. package/lib/types/specialAbility/MagicStyleSpecialAbility.d.ts +2 -1
  60. package/lib/types/specialAbility/MagicalTradition.d.ts +2 -3
  61. package/lib/types/specialAbility/PactGift.d.ts +1 -1
  62. package/lib/types/specialAbility/SkillStyleSpecialAbility.d.ts +2 -1
  63. package/lib/types/specialAbility/sub/_LanguageScript.d.ts +2 -4
  64. package/lib/validation/schema.js +1 -1
  65. package/package.json +2 -2
  66. package/schema/Cantrip.schema.json +1 -2
  67. package/schema/Culture.schema.json +51 -10
  68. package/schema/Lessons_Curriculum.schema.json +8 -12
  69. package/schema/Lessons_Guideline.schema.json +1 -1
  70. package/schema/Patron.schema.json +24 -6
  71. package/schema/Profession.schema.json +57 -15
  72. package/schema/Race.schema.json +121 -13
  73. package/schema/TargetCategory.schema.json +1 -2
  74. package/schema/_Activatable.schema.json +5 -181
  75. package/schema/_ActivatableSelectOptionCategory.schema.json +4 -4
  76. package/schema/_ActivatableSkillCost.schema.json +61 -0
  77. package/schema/_ActivatableSkillDuration.schema.json +1 -3
  78. package/schema/_ActivatableSkillRange.schema.json +19 -0
  79. package/schema/_DiseasePoison.schema.json +0 -2
  80. package/schema/_Identifier.schema.json +2099 -347
  81. package/schema/_IdentifierGroup.schema.json +601 -0
  82. package/schema/_Prerequisite.schema.json +1284 -1049
  83. package/schema/_ResponsiveText.schema.json +2 -2
  84. package/schema/_SimpleReferences.schema.json +54 -130
  85. package/schema/equipment/EquipmentPackage.schema.json +1 -1
  86. package/schema/equipment/item/Elixir.schema.json +123 -0
  87. package/schema/equipment/item/EquipmentOfBlessedOnes.schema.json +4 -1
  88. package/schema/equipment/item/Poison.schema.json +431 -68
  89. package/schema/equipment/item/ToolOfTheTrade.schema.json +15 -4
  90. package/schema/equipment/item/_Herbary.schema.json +42 -0
  91. package/schema/equipment/item/_MeleeWeapon.schema.json +1 -13
  92. package/schema/equipment/item/_RangedWeapon.schema.json +1 -2
  93. package/schema/magicalActions/AnimistPower.schema.json +0 -1
  94. package/schema/magicalActions/MagicalRune.schema.json +38 -3
  95. package/schema/magicalActions/_SkillReference.schema.json +15 -3
  96. package/schema/prerequisites/PrerequisiteGroups.schema.json +0 -96
  97. package/schema/prerequisites/single/ActivatablePrerequisite.schema.json +2 -87
  98. package/schema/prerequisites/single/AnimistPowerPrerequisite.schema.json +1 -2
  99. package/schema/prerequisites/single/CulturePrerequisite.schema.json +2 -1
  100. package/schema/prerequisites/single/EnhancementPrerequisite.schema.json +1 -1
  101. package/schema/prerequisites/single/InfluencePrerequisite.schema.json +1 -2
  102. package/schema/prerequisites/single/RacePrerequisite.schema.json +2 -1
  103. package/schema/prerequisites/single/RatedPrerequisite.schema.json +1 -28
  104. package/schema/prerequisites/single/RulePrerequisite.schema.json +1 -1
  105. package/schema/prerequisites/single/SocialStatusPrerequisite.schema.json +1 -3
  106. package/schema/prerequisites/single/StatePrerequisite.schema.json +1 -1
  107. package/schema/rule/CoreRule.schema.json +3 -5
  108. package/schema/source/_PublicationRef.schema.json +1 -2
  109. package/schema/specialAbility/BlessedTradition.schema.json +2 -2
  110. package/schema/specialAbility/CombatStyleSpecialAbility.schema.json +511 -1
  111. package/schema/specialAbility/LiturgicalStyleSpecialAbility.schema.json +511 -1
  112. package/schema/specialAbility/MagicStyleSpecialAbility.schema.json +511 -1
  113. package/schema/specialAbility/MagicalTradition.schema.json +1 -2
  114. package/schema/specialAbility/PactGift.schema.json +1 -1
  115. package/schema/specialAbility/SkillStyleSpecialAbility.schema.json +511 -1
  116. package/schema/specialAbility/sub/_LanguageScript.schema.json +1 -3
  117. package/schema/_CommonnessRatedAdvantageDisadvantage.schema.json +0 -22
@@ -181,8 +181,7 @@
181
181
  "properties": {
182
182
  "id": {
183
183
  "description": "The skill's identifier. An unique, increasing integer.",
184
- "type": "integer",
185
- "minimum": 1
184
+ "$ref": "./_Identifier.schema.json#/$defs/SkillIdentifier"
186
185
  },
187
186
  "skill_applications": {
188
187
  "description": "Registers new applications, which get enabled once this entry is\nactivated with its respective select option. It specifies an entry-unique\nidentifier and the skill it belongs to. A translation can be left out if\nits name equals the name of the origin select option.",
@@ -244,7 +243,7 @@
244
243
  "properties": {
245
244
  "id": {
246
245
  "description": "The combat technique's identifier.",
247
- "$ref": "./_Identifier.schema.json#/$defs/CombatTechniqueIdentifier"
246
+ "$ref": "./_IdentifierGroup.schema.json#/$defs/CombatTechniqueIdentifier"
248
247
  },
249
248
  "prerequisites": {
250
249
  "$ref": "./_Prerequisite.schema.json#/$defs/GeneralPrerequisites"
@@ -839,7 +838,7 @@
839
838
  "properties": {
840
839
  "id": {
841
840
  "description": "The identifier of the combat-related special ability of which the level\ndefines the penalty instead.",
842
- "$ref": "./_Identifier.schema.json#/$defs/CombatRelatedSpecialAbilityIdentifier"
841
+ "$ref": "./_IdentifierGroup.schema.json#/$defs/CombatRelatedSpecialAbilityIdentifier"
843
842
  }
844
843
  },
845
844
  "required": [
@@ -1560,7 +1559,7 @@
1560
1559
  "properties": {
1561
1560
  "id": {
1562
1561
  "description": "The option's identifier.",
1563
- "$ref": "./_Identifier.schema.json#/$defs/VolumePointsOptionReferenceIdentifier"
1562
+ "$ref": "./_IdentifierGroup.schema.json#/$defs/VolumePointsOptionReferenceIdentifier"
1564
1563
  }
1565
1564
  },
1566
1565
  "required": [
@@ -1801,187 +1800,12 @@
1801
1800
  "description": "The blessed aspect.",
1802
1801
  "$ref": "./_SimpleReferences.schema.json#/$defs/AspectReference"
1803
1802
  },
1804
- "AdvancedSpecialAbility": {
1805
- "description": "A reference to an advanced special ability.",
1806
- "oneOf": [
1807
- {
1808
- "type": "object",
1809
- "properties": {
1810
- "tag": {
1811
- "const": "General"
1812
- },
1813
- "general": {
1814
- "$ref": "./_SimpleReferences.schema.json#/$defs/AdvancedSpecialAbilityReference"
1815
- }
1816
- },
1817
- "required": [
1818
- "tag",
1819
- "general"
1820
- ],
1821
- "additionalProperties": false
1822
- },
1823
- {
1824
- "type": "object",
1825
- "properties": {
1826
- "tag": {
1827
- "const": "RestrictOptions"
1828
- },
1829
- "restrict_options": {
1830
- "$ref": "#/$defs/RestrictAdvancedSpecialAbilityOptions"
1831
- }
1832
- },
1833
- "required": [
1834
- "tag",
1835
- "restrict_options"
1836
- ],
1837
- "additionalProperties": false
1838
- },
1839
- {
1840
- "type": "object",
1841
- "properties": {
1842
- "tag": {
1843
- "const": "OneOf"
1844
- },
1845
- "one_of": {
1846
- "$ref": "#/$defs/OneOfAdvancedSpecialAbilityOptions"
1847
- }
1848
- },
1849
- "required": [
1850
- "tag",
1851
- "one_of"
1852
- ],
1853
- "additionalProperties": false
1854
- },
1855
- {
1856
- "type": "object",
1857
- "properties": {
1858
- "tag": {
1859
- "const": "DeriveFromExternalOption"
1860
- },
1861
- "derive_from_external_option": {
1862
- "$ref": "#/$defs/AdvancedSpecialAbilityDerivedFromExternalOption"
1863
- }
1864
- },
1865
- "required": [
1866
- "tag",
1867
- "derive_from_external_option"
1868
- ],
1869
- "additionalProperties": false
1870
- }
1871
- ]
1872
- },
1873
- "RestrictAdvancedSpecialAbilityOptions": {
1874
- "type": "object",
1875
- "properties": {
1876
- "id": {
1877
- "description": "The advanced special ability's numeric identifier.",
1878
- "type": "integer",
1879
- "minimum": 1
1880
- },
1881
- "option": {
1882
- "description": "Specify the select option(s) that only are allowed for the referenced\nadvanced special ability; others are disallowed.",
1883
- "type": "array",
1884
- "items": {
1885
- "$ref": "./_Identifier.schema.json#/$defs/AdvancedSpecialAbilityRestrictedOptionIdentifier"
1886
- },
1887
- "minItems": 1
1888
- }
1889
- },
1890
- "required": [
1891
- "id",
1892
- "option"
1893
- ],
1894
- "additionalProperties": false
1895
- },
1896
- "OneOfAdvancedSpecialAbilityOptions": {
1897
- "type": "object",
1898
- "properties": {
1899
- "options": {
1900
- "description": "The possible advanced special abilities.",
1901
- "$ref": "./_SimpleReferences.schema.json#/$defs/AdvancedSpecialAbilityReference"
1902
- },
1903
- "is_selection_required_on_purchase": {
1904
- "description": "Do have to choose the advanced special ability when buying the style\nspecial ability? Otherwise the decision can be made later.",
1905
- "type": "boolean"
1906
- },
1907
- "display_option": {
1908
- "$ref": "./prerequisites/DisplayOption.schema.json#/$defs/DisplayOption"
1909
- }
1910
- },
1911
- "required": [
1912
- "options",
1913
- "is_selection_required_on_purchase"
1914
- ],
1915
- "additionalProperties": false
1916
- },
1917
- "AdvancedSpecialAbilityDerivedFromExternalOption": {
1918
- "type": "object",
1919
- "properties": {
1920
- "external_entry": {
1921
- "description": "The possible advanced special abilities.",
1922
- "$ref": "./_Identifier.schema.json#/$defs/MagicalTraditionIdentifier"
1923
- },
1924
- "map": {
1925
- "description": "Map options from the external entry to allowed advanced special abilities.",
1926
- "type": "array",
1927
- "items": {
1928
- "$ref": "#/$defs/AdvancedSpecialAbilityDerivedFromExternalOptionMapping"
1929
- },
1930
- "minItems": 1
1931
- },
1932
- "display_option": {
1933
- "$ref": "./prerequisites/DisplayOption.schema.json#/$defs/DisplayOption"
1934
- }
1935
- },
1936
- "required": [
1937
- "external_entry",
1938
- "map"
1939
- ],
1940
- "additionalProperties": false
1941
- },
1942
- "AdvancedSpecialAbilityDerivedFromExternalOptionMapping": {
1943
- "description": "Mapping from an option of the external entry to an allowed advanced special\nability.",
1944
- "type": "object",
1945
- "properties": {
1946
- "from_option": {
1947
- "description": "The select option's identifier.",
1948
- "$ref": "./_Identifier.schema.json#/$defs/PatronIdentifier"
1949
- },
1950
- "to_advanced": {
1951
- "description": "The advanced special ability's identifier.",
1952
- "$ref": "./_SimpleReferences.schema.json#/$defs/AdvancedSpecialAbilityReference"
1953
- }
1954
- },
1955
- "required": [
1956
- "from_option",
1957
- "to_advanced"
1958
- ],
1959
- "additionalProperties": false
1960
- },
1961
1803
  "AdvancedSpecialAbilityDerivedExternalEntryId": {
1962
1804
  "$ref": "./_Identifier.schema.json#/$defs/MagicalTraditionIdentifier"
1963
1805
  },
1964
1806
  "AdvancedSpecialAbilityDerivedExternalEntryOptionId": {
1965
1807
  "$ref": "./_Identifier.schema.json#/$defs/PatronIdentifier"
1966
1808
  },
1967
- "AdvancedSpecialAbilities": {
1968
- "description": "The Advanced Special Abilities for the respective Style Special Ability.\nSometimes, only a specific select option or a set of select options of an\nentry is allowed, which can be modelled by the option property. It can also\nbe that you can choose from a set of special abilities, but then you can't\nspecify an option.",
1969
- "type": "array",
1970
- "items": [
1971
- {
1972
- "$ref": "#/$defs/AdvancedSpecialAbility"
1973
- },
1974
- {
1975
- "$ref": "#/$defs/AdvancedSpecialAbility"
1976
- },
1977
- {
1978
- "$ref": "#/$defs/AdvancedSpecialAbility"
1979
- }
1980
- ],
1981
- "minItems": 3,
1982
- "maxItems": 3,
1983
- "additionalItems": false
1984
- },
1985
1809
  "ApplicableCombatTechniques": {
1986
1810
  "oneOf": [
1987
1811
  {
@@ -2150,7 +1974,7 @@
2150
1974
  "type": "object",
2151
1975
  "properties": {
2152
1976
  "id": {
2153
- "$ref": "./_Identifier.schema.json#/$defs/CombatTechniqueIdentifier"
1977
+ "$ref": "./_IdentifierGroup.schema.json#/$defs/CombatTechniqueIdentifier"
2154
1978
  },
2155
1979
  "restrictions": {
2156
1980
  "type": "array",
@@ -514,7 +514,7 @@
514
514
  "type": "object",
515
515
  "properties": {
516
516
  "id": {
517
- "$ref": "./_Identifier.schema.json#/$defs/SkillIdentifier"
517
+ "$ref": "./_IdentifierGroup.schema.json#/$defs/SkillIdentifier"
518
518
  },
519
519
  "ap_value": {
520
520
  "description": "The AP value for the specified entry.",
@@ -797,7 +797,7 @@
797
797
  "description": "The list of specific entries.",
798
798
  "type": "array",
799
799
  "items": {
800
- "$ref": "./_Identifier.schema.json#/$defs/SkillIdentifier"
800
+ "$ref": "./_IdentifierGroup.schema.json#/$defs/SkillIdentifier"
801
801
  },
802
802
  "minItems": 1,
803
803
  "uniqueItems": true
@@ -883,7 +883,7 @@
883
883
  "type": "object",
884
884
  "properties": {
885
885
  "id": {
886
- "$ref": "./_Identifier.schema.json#/$defs/CombatTechniqueIdentifier"
886
+ "$ref": "./_IdentifierGroup.schema.json#/$defs/CombatTechniqueIdentifier"
887
887
  },
888
888
  "ap_value": {
889
889
  "description": "The AP value for the specified entry.",
@@ -1131,7 +1131,7 @@
1131
1131
  "properties": {
1132
1132
  "id": {
1133
1133
  "description": "The target entry's identifier.",
1134
- "$ref": "./_Identifier.schema.json#/$defs/ActivatableIdentifier"
1134
+ "$ref": "./_IdentifierGroup.schema.json#/$defs/ActivatableIdentifier"
1135
1135
  },
1136
1136
  "active": {
1137
1137
  "description": "Is the select option required (`true`) or prohibited (`false`)?",
@@ -142,6 +142,17 @@
142
142
  "description": "The part of the cost value that has to be spent permanently.",
143
143
  "type": "integer",
144
144
  "minimum": 1
145
+ },
146
+ "translations": {
147
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
148
+ "type": "object",
149
+ "patternProperties": {
150
+ "^[a-z]{2}-[A-Z]{2}$": {
151
+ "$ref": "#/$defs/ModifiableOneTimeCostTranslation"
152
+ }
153
+ },
154
+ "minProperties": 1,
155
+ "additionalProperties": false
145
156
  }
146
157
  },
147
158
  "required": [
@@ -149,6 +160,19 @@
149
160
  ],
150
161
  "additionalProperties": false
151
162
  },
163
+ "ModifiableOneTimeCostTranslation": {
164
+ "type": "object",
165
+ "properties": {
166
+ "replacement": {
167
+ "description": "A replacement string.",
168
+ "$ref": "./_ResponsiveText.schema.json#/$defs/ResponsiveTextReplace"
169
+ }
170
+ },
171
+ "required": [
172
+ "replacement"
173
+ ],
174
+ "additionalProperties": false
175
+ },
152
176
  "NonModifiableOneTimeCost": {
153
177
  "type": "object",
154
178
  "properties": {
@@ -433,6 +457,10 @@
433
457
  "type": "integer",
434
458
  "minimum": 1
435
459
  },
460
+ "per": {
461
+ "description": "The cost have to be per a specific countable entity, e.g. `8 KP per\nperson per 5 minutes`.",
462
+ "$ref": "#/$defs/NonModifiableSustainedCostPerCountable"
463
+ },
436
464
  "interval": {
437
465
  "description": "The sustain interval.",
438
466
  "$ref": "./_ActivatableSkillDuration.schema.json#/$defs/DurationUnitValue"
@@ -443,6 +471,39 @@
443
471
  "interval"
444
472
  ],
445
473
  "additionalProperties": false
474
+ },
475
+ "NonModifiableSustainedCostPerCountable": {
476
+ "type": "object",
477
+ "properties": {
478
+ "translations": {
479
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
480
+ "type": "object",
481
+ "patternProperties": {
482
+ "^[a-z]{2}-[A-Z]{2}$": {
483
+ "$ref": "#/$defs/NonModifiableSustainedCostPerCountableTranslation"
484
+ }
485
+ },
486
+ "minProperties": 1,
487
+ "additionalProperties": false
488
+ }
489
+ },
490
+ "required": [
491
+ "translations"
492
+ ],
493
+ "additionalProperties": false
494
+ },
495
+ "NonModifiableSustainedCostPerCountableTranslation": {
496
+ "type": "object",
497
+ "properties": {
498
+ "countable": {
499
+ "description": "The countable entity name.",
500
+ "$ref": "./_ResponsiveText.schema.json#/$defs/ResponsiveText"
501
+ }
502
+ },
503
+ "required": [
504
+ "countable"
505
+ ],
506
+ "additionalProperties": false
446
507
  }
447
508
  }
448
509
  }
@@ -136,9 +136,7 @@
136
136
  "additionalProperties": false
137
137
  }
138
138
  },
139
- "required": [
140
- "translations"
141
- ],
139
+ "required": [],
142
140
  "additionalProperties": false
143
141
  },
144
142
  "PermanentDurationTranslation": {
@@ -100,6 +100,25 @@
100
100
  ],
101
101
  "additionalProperties": false
102
102
  },
103
+ {
104
+ "type": "object",
105
+ "properties": {
106
+ "tag": {
107
+ "const": "Touch"
108
+ },
109
+ "touch": {
110
+ "type": "object",
111
+ "properties": {},
112
+ "required": [],
113
+ "additionalProperties": false
114
+ }
115
+ },
116
+ "required": [
117
+ "tag",
118
+ "touch"
119
+ ],
120
+ "additionalProperties": false
121
+ },
103
122
  {
104
123
  "type": "object",
105
124
  "properties": {
@@ -123,11 +123,9 @@
123
123
  "type": "object",
124
124
  "properties": {
125
125
  "default": {
126
- "description": "The default value. In the source, it's the text before the slash.",
127
126
  "$ref": "./_NonEmptyString.schema.json#/$defs/NonEmptyMarkdown"
128
127
  },
129
128
  "reduced": {
130
- "description": "The reduced value. In the source, it's the text after the slash. Some\nentries may not have a reduced value.",
131
129
  "$ref": "./_NonEmptyString.schema.json#/$defs/NonEmptyMarkdown"
132
130
  }
133
131
  },