optolith-database-schema 0.1.4 → 0.1.5

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 (196) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/lib/types/Advantage.d.ts +3 -0
  3. package/lib/types/ArcaneBardTradition.d.ts +2 -2
  4. package/lib/types/ArcaneDancerTradition.d.ts +2 -2
  5. package/lib/types/Ceremony.d.ts +2 -2
  6. package/lib/types/DerivedCharacteristic.d.ts +2 -2
  7. package/lib/types/Disadvantage.d.ts +3 -0
  8. package/lib/types/LiturgicalChant.d.ts +2 -2
  9. package/lib/types/Ritual.d.ts +2 -2
  10. package/lib/types/Spell.d.ts +2 -2
  11. package/lib/types/_Activatable.d.ts +689 -14
  12. package/lib/types/_Activatable.js +44 -0
  13. package/lib/types/_Enhancements.d.ts +2 -2
  14. package/lib/types/_Identifier.d.ts +127 -96
  15. package/lib/types/_Identifier.js +110 -88
  16. package/lib/types/_Influence.d.ts +2 -0
  17. package/lib/types/_Prerequisite.d.ts +93 -397
  18. package/lib/types/_Prerequisite.js +1 -136
  19. package/lib/types/magicalActions/AnimistPower.d.ts +5 -0
  20. package/lib/types/magicalActions/GeodeRitual.d.ts +2 -2
  21. package/lib/types/prerequisites/ConditionalPrerequisites.d.ts +10 -0
  22. package/lib/types/prerequisites/ConditionalPrerequisites.js +1 -0
  23. package/lib/types/prerequisites/DisplayOption.d.ts +19 -0
  24. package/lib/types/prerequisites/DisplayOption.js +1 -0
  25. package/lib/types/prerequisites/PrerequisiteGroups.d.ts +32 -0
  26. package/lib/types/prerequisites/PrerequisiteGroups.js +1 -0
  27. package/lib/types/prerequisites/single/ActivatablePrerequisite.d.ts +95 -0
  28. package/lib/types/prerequisites/single/ActivatablePrerequisite.js +1 -0
  29. package/lib/types/prerequisites/single/AnimistPowerPrerequisite.d.ts +28 -0
  30. package/lib/types/prerequisites/single/AnimistPowerPrerequisite.js +1 -0
  31. package/lib/types/prerequisites/single/CommonSuggestedByRCPPrerequisite.d.ts +3 -0
  32. package/lib/types/prerequisites/single/CommonSuggestedByRCPPrerequisite.js +1 -0
  33. package/lib/types/prerequisites/single/CulturePrerequisite.d.ts +11 -0
  34. package/lib/types/prerequisites/single/CulturePrerequisite.js +1 -0
  35. package/lib/types/prerequisites/single/EnhancementPrerequisite.d.ts +36 -0
  36. package/lib/types/prerequisites/single/EnhancementPrerequisite.js +1 -0
  37. package/lib/types/prerequisites/single/InfluencePrerequisite.d.ts +18 -0
  38. package/lib/types/prerequisites/single/InfluencePrerequisite.js +1 -0
  39. package/lib/types/prerequisites/single/PactPrerequisite.d.ts +32 -0
  40. package/lib/types/prerequisites/single/PactPrerequisite.js +1 -0
  41. package/lib/types/prerequisites/single/PrimaryAttributePrerequisite.d.ts +22 -0
  42. package/lib/types/prerequisites/single/PrimaryAttributePrerequisite.js +1 -0
  43. package/lib/types/prerequisites/single/PublicationPrerequisite.d.ts +13 -0
  44. package/lib/types/prerequisites/single/PublicationPrerequisite.js +1 -0
  45. package/lib/types/prerequisites/single/RacePrerequisite.d.ts +14 -0
  46. package/lib/types/prerequisites/single/RacePrerequisite.js +1 -0
  47. package/lib/types/prerequisites/single/RatedPrerequisite.d.ts +99 -0
  48. package/lib/types/prerequisites/single/RatedPrerequisite.js +1 -0
  49. package/lib/types/prerequisites/single/RulePrerequisite.d.ts +10 -0
  50. package/lib/types/prerequisites/single/RulePrerequisite.js +1 -0
  51. package/lib/types/prerequisites/single/SexPrerequisite.d.ts +11 -0
  52. package/lib/types/prerequisites/single/SexPrerequisite.js +1 -0
  53. package/lib/types/prerequisites/single/SocialStatusPrerequisite.d.ts +16 -0
  54. package/lib/types/prerequisites/single/SocialStatusPrerequisite.js +1 -0
  55. package/lib/types/prerequisites/single/StatePrerequisite.d.ts +11 -0
  56. package/lib/types/prerequisites/single/StatePrerequisite.js +1 -0
  57. package/lib/types/prerequisites/single/TextPrerequisite.d.ts +31 -0
  58. package/lib/types/prerequisites/single/TextPrerequisite.js +1 -0
  59. package/lib/types/prerequisites/single/TraditionPrerequisite.d.ts +33 -0
  60. package/lib/types/prerequisites/single/TraditionPrerequisite.js +1 -0
  61. package/lib/types/specialAbility/AdvancedCombatSpecialAbility.d.ts +7 -0
  62. package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.d.ts +3 -0
  63. package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.d.ts +3 -0
  64. package/lib/types/specialAbility/AdvancedSkillSpecialAbility.d.ts +3 -0
  65. package/lib/types/specialAbility/AncestorGlyph.d.ts +3 -0
  66. package/lib/types/specialAbility/BlessedTradition.d.ts +5 -2
  67. package/lib/types/specialAbility/BrawlingSpecialAbility.d.ts +3 -0
  68. package/lib/types/specialAbility/CeremonialItemSpecialAbility.d.ts +3 -0
  69. package/lib/types/specialAbility/CombatSpecialAbility.d.ts +7 -0
  70. package/lib/types/specialAbility/CombatStyleSpecialAbility.d.ts +3 -0
  71. package/lib/types/specialAbility/CommandSpecialAbility.d.ts +3 -0
  72. package/lib/types/specialAbility/FamiliarSpecialAbility.d.ts +3 -0
  73. package/lib/types/specialAbility/FatePointSexSpecialAbility.d.ts +3 -0
  74. package/lib/types/specialAbility/FatePointSpecialAbility.d.ts +3 -0
  75. package/lib/types/specialAbility/GeneralSpecialAbility.d.ts +3 -0
  76. package/lib/types/specialAbility/KarmaSpecialAbility.d.ts +3 -0
  77. package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.d.ts +3 -0
  78. package/lib/types/specialAbility/LycantropicGift.d.ts +3 -0
  79. package/lib/types/specialAbility/MagicStyleSpecialAbility.d.ts +3 -0
  80. package/lib/types/specialAbility/MagicalSpecialAbility.d.ts +3 -0
  81. package/lib/types/specialAbility/MagicalTradition.d.ts +3 -0
  82. package/lib/types/specialAbility/PactGift.d.ts +5 -2
  83. package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.d.ts +3 -0
  84. package/lib/types/specialAbility/Sermon.d.ts +3 -0
  85. package/lib/types/specialAbility/SexSpecialAbility.d.ts +3 -0
  86. package/lib/types/specialAbility/SikaryanDrainSpecialAbility.d.ts +3 -0
  87. package/lib/types/specialAbility/SkillStyleSpecialAbility.d.ts +3 -0
  88. package/lib/types/specialAbility/VampiricGift.d.ts +3 -0
  89. package/lib/types/specialAbility/Vision.d.ts +3 -0
  90. package/lib/types/specialAbility/sub/Language.d.ts +2 -2
  91. package/lib/types/specialAbility/sub/TradeSecret.d.ts +2 -0
  92. package/lib/types/traditionArtifacts/ArcaneOrbEnchantment.d.ts +15 -0
  93. package/lib/types/traditionArtifacts/AttireEnchantment.d.ts +15 -0
  94. package/lib/types/traditionArtifacts/BowlEnchantment.d.ts +15 -0
  95. package/lib/types/traditionArtifacts/CauldronEnchantment.d.ts +15 -0
  96. package/lib/types/traditionArtifacts/ChronicleEnchantment.d.ts +15 -0
  97. package/lib/types/traditionArtifacts/DaggerRitual.d.ts +15 -0
  98. package/lib/types/traditionArtifacts/FoolsHatEnchantment.d.ts +15 -0
  99. package/lib/types/traditionArtifacts/InstrumentEnchantment.d.ts +15 -0
  100. package/lib/types/traditionArtifacts/Krallenkettenzauber.d.ts +15 -0
  101. package/lib/types/traditionArtifacts/OrbEnchantment.d.ts +15 -0
  102. package/lib/types/traditionArtifacts/RingEnchantment.d.ts +15 -0
  103. package/lib/types/traditionArtifacts/SickleRitual.d.ts +15 -0
  104. package/lib/types/traditionArtifacts/SpellSwordEnchantment.d.ts +15 -0
  105. package/lib/types/traditionArtifacts/StaffEnchantment.d.ts +15 -0
  106. package/lib/types/traditionArtifacts/ToyEnchantment.d.ts +15 -0
  107. package/lib/types/traditionArtifacts/Trinkhornzauber.d.ts +15 -0
  108. package/lib/types/traditionArtifacts/WandEnchantment.d.ts +15 -0
  109. package/lib/types/traditionArtifacts/WeaponEnchantment.d.ts +15 -0
  110. package/package.json +2 -2
  111. package/schema/Advantage.schema.json +6 -0
  112. package/schema/ArcaneBardTradition.schema.json +1 -1
  113. package/schema/ArcaneDancerTradition.schema.json +1 -1
  114. package/schema/Ceremony.schema.json +1 -1
  115. package/schema/DerivedCharacteristic.schema.json +1 -1
  116. package/schema/Disadvantage.schema.json +6 -0
  117. package/schema/LiturgicalChant.schema.json +1 -1
  118. package/schema/Ritual.schema.json +1 -1
  119. package/schema/Spell.schema.json +1 -1
  120. package/schema/_Activatable.schema.json +1196 -43
  121. package/schema/_Enhancements.schema.json +1 -1
  122. package/schema/_Identifier.schema.json +325 -188
  123. package/schema/_Influence.schema.json +4 -0
  124. package/schema/_Prerequisite.schema.json +887 -675
  125. package/schema/magicalActions/AnimistPower.schema.json +4 -0
  126. package/schema/magicalActions/GeodeRitual.schema.json +1 -1
  127. package/schema/prerequisites/ConditionalPrerequisites.schema.json +15 -0
  128. package/schema/prerequisites/DisplayOption.schema.json +48 -0
  129. package/schema/prerequisites/PrerequisiteGroups.schema.json +246 -0
  130. package/schema/prerequisites/single/ActivatablePrerequisite.schema.json +142 -0
  131. package/schema/prerequisites/single/AnimistPowerPrerequisite.schema.json +40 -0
  132. package/schema/prerequisites/single/CommonSuggestedByRCPPrerequisite.schema.json +18 -0
  133. package/schema/prerequisites/single/CulturePrerequisite.schema.json +27 -0
  134. package/schema/prerequisites/single/EnhancementPrerequisite.schema.json +54 -0
  135. package/schema/prerequisites/single/InfluencePrerequisite.schema.json +33 -0
  136. package/schema/prerequisites/single/PactPrerequisite.schema.json +46 -0
  137. package/schema/prerequisites/single/PrimaryAttributePrerequisite.schema.json +58 -0
  138. package/schema/prerequisites/single/PublicationPrerequisite.schema.json +27 -0
  139. package/schema/prerequisites/single/RacePrerequisite.schema.json +31 -0
  140. package/schema/prerequisites/single/RatedPrerequisite.schema.json +184 -0
  141. package/schema/prerequisites/single/RulePrerequisite.schema.json +26 -0
  142. package/schema/prerequisites/single/SexPrerequisite.schema.json +27 -0
  143. package/schema/prerequisites/single/SocialStatusPrerequisite.schema.json +30 -0
  144. package/schema/prerequisites/single/StatePrerequisite.schema.json +27 -0
  145. package/schema/prerequisites/single/TextPrerequisite.schema.json +63 -0
  146. package/schema/prerequisites/single/TraditionPrerequisite.schema.json +96 -0
  147. package/schema/source/Publication.schema.json +1 -1
  148. package/schema/specialAbility/AdvancedCombatSpecialAbility.schema.json +9 -0
  149. package/schema/specialAbility/AdvancedKarmaSpecialAbility.schema.json +6 -0
  150. package/schema/specialAbility/AdvancedMagicalSpecialAbility.schema.json +6 -0
  151. package/schema/specialAbility/AdvancedSkillSpecialAbility.schema.json +6 -0
  152. package/schema/specialAbility/AncestorGlyph.schema.json +6 -0
  153. package/schema/specialAbility/BlessedTradition.schema.json +7 -1
  154. package/schema/specialAbility/BrawlingSpecialAbility.schema.json +6 -0
  155. package/schema/specialAbility/CeremonialItemSpecialAbility.schema.json +6 -0
  156. package/schema/specialAbility/CombatSpecialAbility.schema.json +9 -0
  157. package/schema/specialAbility/CombatStyleSpecialAbility.schema.json +6 -0
  158. package/schema/specialAbility/CommandSpecialAbility.schema.json +6 -0
  159. package/schema/specialAbility/FamiliarSpecialAbility.schema.json +6 -0
  160. package/schema/specialAbility/FatePointSexSpecialAbility.schema.json +6 -0
  161. package/schema/specialAbility/FatePointSpecialAbility.schema.json +6 -0
  162. package/schema/specialAbility/GeneralSpecialAbility.schema.json +6 -0
  163. package/schema/specialAbility/KarmaSpecialAbility.schema.json +6 -0
  164. package/schema/specialAbility/LiturgicalStyleSpecialAbility.schema.json +6 -0
  165. package/schema/specialAbility/LycantropicGift.schema.json +6 -0
  166. package/schema/specialAbility/MagicStyleSpecialAbility.schema.json +6 -0
  167. package/schema/specialAbility/MagicalSpecialAbility.schema.json +6 -0
  168. package/schema/specialAbility/MagicalTradition.schema.json +6 -0
  169. package/schema/specialAbility/PactGift.schema.json +7 -1
  170. package/schema/specialAbility/ProtectiveWardingCircleSpecialAbility.schema.json +6 -0
  171. package/schema/specialAbility/Sermon.schema.json +6 -0
  172. package/schema/specialAbility/SexSpecialAbility.schema.json +6 -0
  173. package/schema/specialAbility/SikaryanDrainSpecialAbility.schema.json +6 -0
  174. package/schema/specialAbility/SkillStyleSpecialAbility.schema.json +6 -0
  175. package/schema/specialAbility/VampiricGift.schema.json +6 -0
  176. package/schema/specialAbility/Vision.schema.json +6 -0
  177. package/schema/specialAbility/sub/Language.schema.json +1 -1
  178. package/schema/specialAbility/sub/TradeSecret.schema.json +3 -0
  179. package/schema/traditionArtifacts/ArcaneOrbEnchantment.schema.json +17 -1
  180. package/schema/traditionArtifacts/AttireEnchantment.schema.json +17 -1
  181. package/schema/traditionArtifacts/BowlEnchantment.schema.json +17 -1
  182. package/schema/traditionArtifacts/CauldronEnchantment.schema.json +17 -1
  183. package/schema/traditionArtifacts/ChronicleEnchantment.schema.json +17 -1
  184. package/schema/traditionArtifacts/DaggerRitual.schema.json +17 -1
  185. package/schema/traditionArtifacts/FoolsHatEnchantment.schema.json +17 -1
  186. package/schema/traditionArtifacts/InstrumentEnchantment.schema.json +17 -1
  187. package/schema/traditionArtifacts/Krallenkettenzauber.schema.json +17 -1
  188. package/schema/traditionArtifacts/OrbEnchantment.schema.json +17 -1
  189. package/schema/traditionArtifacts/RingEnchantment.schema.json +17 -1
  190. package/schema/traditionArtifacts/SickleRitual.schema.json +17 -1
  191. package/schema/traditionArtifacts/SpellSwordEnchantment.schema.json +17 -1
  192. package/schema/traditionArtifacts/StaffEnchantment.schema.json +17 -1
  193. package/schema/traditionArtifacts/ToyEnchantment.schema.json +17 -1
  194. package/schema/traditionArtifacts/Trinkhornzauber.schema.json +17 -1
  195. package/schema/traditionArtifacts/WandEnchantment.schema.json +17 -1
  196. package/schema/traditionArtifacts/WeaponEnchantment.schema.json +17 -1
@@ -1,413 +1,109 @@
1
1
  /**
2
2
  * @title Prerequisites
3
3
  */
4
- import { Identifier } from "./_Identifier";
5
- import { BinarySex } from "./_Sex";
6
- export declare namespace Prerequisite {
4
+ import { AdvantageDisadvantagePrerequisiteGroup, AnimistPowerPrerequisiteGroup, ArcaneTraditionPrerequisiteGroup, DerivedCharacteristicPrerequisiteGroup, EnhancementPrerequisiteGroup, GeneralPrerequisiteGroup, GeodeRitualPrerequisiteGroup, InfluencePrerequisiteGroup, LanguagePrerequisiteGroup, LiturgyPrerequisiteGroup, PersonalityTraitPrerequisiteGroup, ProfessionPrerequisiteGroup, PublicationPrerequisiteGroup, SpellworkPrerequisiteGroup } from "./prerequisites/PrerequisiteGroups";
5
+ /**
6
+ * @title Prerequisite Collection Types
7
+ */
8
+ declare namespace PrerequisiteCollection {
7
9
  /**
8
- * @title Single Prerequisites
10
+ * A prerequisite group has no influence on validation logic. It serves as a
11
+ * single unit for displaying purposes, where the source uses a prerequisites
12
+ * item that cannot be represented as a single prerequisite.
9
13
  */
10
- export namespace Single {
11
- namespace DisplayOption {
12
- /**
13
- * @title Display Option
14
- */
15
- type T = {
16
- tag: "Hide";
17
- } | {
18
- tag: "ReplaceWith";
19
- /**
20
- * All translations for the entry, identified by IETF language tag (BCP47).
21
- * @minProperties 1
22
- */
23
- translations: {
24
- /**
25
- * @patternProperties ^[a-z]{2}-[A-Z]{2}$
26
- */
27
- [localeId: string]: string;
28
- };
29
- };
30
- }
31
- namespace Sex {
32
- /**
33
- * Requires a specific sex.
34
- * @title Sex Prerequisite
35
- */
36
- type T = {
37
- tag: "Sex";
38
- id: BinarySex;
39
- display_option?: DisplayOption.T;
40
- };
41
- }
42
- namespace Race {
43
- /**
44
- * Requires a specific culture or one of a specific set of cultures.
45
- * @title Race Prerequisite
46
- */
47
- export type T = {
48
- tag: "Culture";
49
- id: Identifier;
50
- active: boolean;
51
- display_option?: DisplayOption.T;
52
- };
53
- type Identifier = SingleIdentifier | MultipleIdentifiers;
54
- /**
55
- * @minimum 1
56
- */
57
- type SingleIdentifier = number;
58
- /**
59
- * @minItems 2
60
- */
61
- type MultipleIdentifiers = SingleIdentifier[];
62
- export {};
63
- }
64
- namespace Culture {
65
- /**
66
- * Requires a specific race or one of a specific set of races. You can also
67
- * provide an object to say whether the hero must meet one of the races or
68
- * if the entry does not allow one of the races.
69
- * @title Culture Prerequisite
70
- */
71
- export type T = {
72
- tag: "Culture";
73
- id: Identifier;
74
- display_option?: DisplayOption.T;
75
- };
76
- type Identifier = SingleIdentifier | MultipleIdentifiers;
77
- /**
78
- * @minimum 1
79
- */
80
- type SingleIdentifier = number;
81
- /**
82
- * @minItems 2
83
- */
84
- type MultipleIdentifiers = SingleIdentifier[];
85
- export {};
86
- }
87
- namespace Rule {
88
- /**
89
- * @title Rule Prerequisite
90
- */
91
- export type T = {
92
- tag: "Rule";
93
- id: Identifier;
94
- display_option?: DisplayOption.T;
95
- };
96
- type Identifier = {
97
- tag: "FocusRule";
98
- /**
99
- * @integer
100
- * @minimum 1
101
- */
102
- value: number;
103
- } | {
104
- tag: "OptionalRule";
105
- /**
106
- * @integer
107
- * @minimum 1
108
- */
109
- value: number;
110
- };
111
- export {};
112
- }
113
- namespace Publication {
114
- /**
115
- * @title Publication Prerequisite
116
- */
117
- type T = {
118
- tag: "Publication";
119
- /**
120
- * @integer
121
- * @minimum 1
122
- */
123
- id: number;
124
- display_option?: DisplayOption.T;
125
- };
126
- }
127
- namespace PrimaryAttribute {
128
- /**
129
- * @title Primary Attribute Prerequisite
130
- */
131
- type T = {
132
- tag: "PrimaryAttribute";
133
- /**
134
- * Is the required primary attribute for spellcasters or blessed ones?
135
- */
136
- category: Category;
137
- /**
138
- * Required value of the attribute
139
- * @integer
140
- * @minimum 9
141
- */
142
- value: number;
143
- display_option?: DisplayOption.T;
144
- };
145
- type Category = {
146
- tag: "Blessed";
147
- } | {
148
- tag: "Magical";
149
- };
150
- }
151
- namespace Pact {
14
+ export type Group<T> = {
15
+ tag: "Group";
16
+ /**
17
+ * @minItems 2
18
+ */
19
+ list: T[];
20
+ /**
21
+ * All translations for the entry, identified by IETF language tag (BCP47).
22
+ * @minProperties 1
23
+ */
24
+ translations: {
152
25
  /**
153
- * Requires a specific pact.
154
- * @title Pact Prerequisite
26
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
27
+ * @minLength 1
155
28
  */
156
- type T = {
157
- tag: "Pact";
158
- /**
159
- * The required pact category's identifier.
160
- * @integer
161
- * @minimum 1
162
- */
163
- category_id: number;
164
- /**
165
- * The required domains' identifiers.
166
- */
167
- domain_id?: DomainId[];
168
- /**
169
- * The required pact level.
170
- * @integer
171
- * @minimum 1
172
- */
173
- level?: number;
174
- display_option?: DisplayOption.T;
175
- };
29
+ [localeId: string]: string;
30
+ };
31
+ };
32
+ type SingleAndGrouped<T> = T | Group<T>;
33
+ export type Plain<T> = {
34
+ tag: "Plain";
35
+ /**
36
+ * @minItems 1
37
+ */
38
+ list: SingleAndGrouped<T>[];
39
+ };
40
+ export type ByLevel<T> = Plain<T> | {
41
+ tag: "ByLevel";
42
+ /**
43
+ * @minItems 1
44
+ */
45
+ list: {
176
46
  /**
177
- * A domain's identifier.
178
47
  * @integer
179
48
  * @minimum 1
180
49
  */
181
- type DomainId = number;
182
- }
183
- namespace SocialStatus {
184
- /**
185
- * Requires a minimum social status.
186
- * @title Social Status Prerequisite
187
- */
188
- type T = {
189
- tag: "SocialStatus";
190
- /**
191
- * The minimum social status' identifier.
192
- * @integer
193
- * @minimum 2
194
- * @maximum 5
195
- */
196
- id: number;
197
- display_option?: DisplayOption.T;
198
- };
199
- }
200
- namespace Influence {
201
- /**
202
- * @title Influence Prerequisite
203
- */
204
- type T = {
205
- tag: "Influence";
206
- /**
207
- * The influence's identifier.
208
- * @integer
209
- * @minimum 1
210
- */
211
- id: number;
212
- /**
213
- * If the referenced influence must or must not be chosen.
214
- */
215
- active: boolean;
216
- display_option?: DisplayOption.T;
217
- };
218
- }
219
- namespace Activatable {
220
- /**
221
- * Requires a specific advantage, disadvantage, special ability.
222
- * @title Activatable Prerequisite
223
- */
224
- type T = {
225
- tag: "Activatable";
226
- /**
227
- * The activatable entry's identifier.
228
- * @integer
229
- * @minimum 1
230
- */
231
- id: Identifier.Group.Activatable;
232
- /**
233
- * If the required entry should be required to be active or inactive.
234
- */
235
- active: boolean;
236
- /**
237
- * The required minimum level of the entry.
238
- * @integer
239
- * @minimum 1
240
- */
241
- level?: number;
242
- display_option?: DisplayOption.T;
243
- };
244
- }
245
- namespace Rated {
246
- /**
247
- * @title Rated Prerequisite
248
- */
249
- type T = {
250
- tag: "Rated";
251
- /**
252
- * The rated entry's identifier.
253
- * @integer
254
- * @minimum 1
255
- */
256
- id: Identifier.Group.Rated;
257
- /**
258
- * The required minimum value.
259
- * @integer
260
- * @minimum 0
261
- */
262
- value: number;
263
- display_option?: DisplayOption.T;
264
- };
265
- }
266
- namespace Enhancement {
267
- /**
268
- * Requires a specific enhancement from a skill.
269
- * @title Enhancement Prerequisite
270
- */
271
- type T = {
272
- tag: "Enhancement";
273
- /**
274
- * The required skill's identifier.
275
- */
276
- skill: {
277
- tag: SkillCategoryWithEnhancements;
278
- /**
279
- * The skill's identifier.
280
- * @integer
281
- * @minimum 1
282
- */
283
- id: number;
284
- };
285
- /**
286
- * The required enhancement's identifier.
287
- */
288
- enhancement: {
289
- /**
290
- * The enhancement's identifier.
291
- * @integer
292
- * @minimum 1
293
- */
294
- id: number;
295
- };
296
- display_option?: DisplayOption.T;
297
- };
298
- enum SkillCategoryWithEnhancements {
299
- Spell = "Spell",
300
- Ritual = "Ritual",
301
- LiturgicalChant = "LiturgicalChant",
302
- Ceremony = "Ceremony"
303
- }
304
- }
305
- namespace EnhancementInternal {
306
- /**
307
- * Requires a specific enhancement from a skill. This can only be used by an
308
- * enhancement to require another enhancement from the same skill.
309
- * @title Internal Enhancement Prerequisite
310
- */
311
- type T = {
312
- tag: "EnhancementInternal";
313
- /**
314
- * The enhancement's identifier.
315
- * @integer
316
- * @minimum 1
317
- */
318
- id: number;
319
- };
320
- }
321
- namespace Ineligible {
322
- /**
323
- * This is a placeholder for required things that can never happen with the
324
- * current set of crunch elements and rules, e. g. if a race is required
325
- * that does not yet exist as a crunch element.
326
- *
327
- * A display option must be set.
328
- * @title Ineligible Prerequisite
329
- */
330
- type T = {
331
- tag: "Ineligible";
332
- display_option: DisplayOption.T;
333
- };
334
- }
335
- }
336
- /**
337
- * @title Grouped Prerequisites
338
- */
339
- namespace Group {
340
- type DerivedCharacteristic = Single.Rule.T;
341
- type Publication = Single.Publication.T;
342
- type ArcaneTradition = Single.Sex.T | Single.Culture.T;
343
- type Spellwork = Single.Rule.T | Single.Rated.T;
344
- type Liturgy = Single.Rule.T;
345
- type Language = Single.Ineligible.T | Single.Race.T | Single.Activatable.T;
346
- type GeodeRitual = Single.Influence.T;
347
- type Enhancement = Single.EnhancementInternal.T;
348
- }
349
- /**
350
- * @title Prerequisite Collection Types
351
- */
352
- namespace Collection {
353
- type Plain<T> = {
354
- tag: "Plain";
355
- /**
356
- * @minItems 1
357
- */
358
- value: T[];
359
- };
360
- type ByLevel<T> = {
361
- tag: "Plain";
50
+ level: number;
362
51
  /**
363
52
  * @minItems 1
364
53
  */
365
- value: T[];
366
- } | {
367
- tag: "ByLevel";
368
- /**
369
- * @minItems 1
370
- */
371
- value: {
372
- /**
373
- * @integer
374
- * @minimum 1
375
- */
376
- level: number;
377
- prerequisites: T[];
378
- }[];
379
- };
380
- }
381
- /**
382
- * @title Grouped Prerequisite Collections
383
- */
384
- export namespace GroupCollection {
385
- type DerivedCharacteristic = Collection.Plain<Group.DerivedCharacteristic>;
386
- type Publication = Collection.Plain<Group.Publication>;
387
- /**
388
- * @title Arcane Tradition Prerequisites
389
- */
390
- type ArcaneTradition = Collection.Plain<Group.ArcaneTradition>;
391
- /**
392
- * @title Spellwork Prerequisites
393
- */
394
- type Spellwork = Collection.Plain<Group.Spellwork>;
395
- /**
396
- * @title Liturgy Prerequisites
397
- */
398
- type Liturgy = Collection.Plain<Group.Liturgy>;
399
- /**
400
- * @title Language Prerequisites
401
- */
402
- type Language = Collection.ByLevel<Group.Language>;
403
- /**
404
- * @title Geode Ritual Prerequisites
405
- */
406
- type GeodeRitual = Collection.Plain<Group.GeodeRitual>;
407
- /**
408
- * @title Enhancement Prerequisites
409
- */
410
- type Enhancement = Collection.Plain<Group.Enhancement>;
411
- }
54
+ prerequisites: SingleAndGrouped<T>[];
55
+ }[];
56
+ };
412
57
  export {};
413
58
  }
59
+ export declare type DerivedCharacteristicPrerequisites = PrerequisiteCollection.Plain<DerivedCharacteristicPrerequisiteGroup>;
60
+ export declare type PublicationPrerequisites = PrerequisiteCollection.Plain<PublicationPrerequisiteGroup>;
61
+ /**
62
+ * @title General Prerequisites
63
+ */
64
+ export declare type GeneralPrerequisites = PrerequisiteCollection.ByLevel<GeneralPrerequisiteGroup>;
65
+ /**
66
+ * @title Profession Prerequisites
67
+ */
68
+ export declare type ProfessionPrerequisites = PrerequisiteCollection.Plain<ProfessionPrerequisiteGroup>;
69
+ /**
70
+ * @title Advantage/Disadvantage Prerequisites
71
+ */
72
+ export declare type AdvantageDisadvantagePrerequisites = PrerequisiteCollection.ByLevel<AdvantageDisadvantagePrerequisiteGroup>;
73
+ /**
74
+ * @title Arcane Tradition Prerequisites
75
+ */
76
+ export declare type ArcaneTraditionPrerequisites = PrerequisiteCollection.Plain<ArcaneTraditionPrerequisiteGroup>;
77
+ /**
78
+ * @title Personality Trait Prerequisites
79
+ */
80
+ export declare type PersonalityTraitPrerequisites = PrerequisiteCollection.Plain<PersonalityTraitPrerequisiteGroup>;
81
+ /**
82
+ * @title Spellwork Prerequisites
83
+ */
84
+ export declare type SpellworkPrerequisites = PrerequisiteCollection.Plain<SpellworkPrerequisiteGroup>;
85
+ /**
86
+ * @title Liturgy Prerequisites
87
+ */
88
+ export declare type LiturgyPrerequisites = PrerequisiteCollection.Plain<LiturgyPrerequisiteGroup>;
89
+ /**
90
+ * @title Influence Prerequisites
91
+ */
92
+ export declare type InfluencePrerequisites = PrerequisiteCollection.Plain<InfluencePrerequisiteGroup>;
93
+ /**
94
+ * @title Language Prerequisites
95
+ */
96
+ export declare type LanguagePrerequisites = PrerequisiteCollection.ByLevel<LanguagePrerequisiteGroup>;
97
+ /**
98
+ * @title Animist Power Prerequisites
99
+ */
100
+ export declare type AnimistPowerPrerequisites = PrerequisiteCollection.Plain<AnimistPowerPrerequisiteGroup>;
101
+ /**
102
+ * @title Geode Ritual Prerequisites
103
+ */
104
+ export declare type GeodeRitualPrerequisites = PrerequisiteCollection.Plain<GeodeRitualPrerequisiteGroup>;
105
+ /**
106
+ * @title Enhancement Prerequisites
107
+ */
108
+ export declare type EnhancementPrerequisites = PrerequisiteCollection.Plain<EnhancementPrerequisiteGroup>;
109
+ export {};
@@ -1,139 +1,4 @@
1
1
  /**
2
2
  * @title Prerequisites
3
3
  */
4
- export var Prerequisite;
5
- (function (Prerequisite) {
6
- /**
7
- * @title Single Prerequisites
8
- */
9
- let Single;
10
- (function (Single) {
11
- // "IncreasableMultiEntry": {
12
- // "title": "Increasable Prerequisite",
13
- // "description": "Require a specific attribute, skill, combat technique, spell or chant from a set to be on a minimum value. Note that liturgical chants are required to be active automatically, so to require them to be active you can set the value to 0.",
14
- // "type": "object",
15
- // "properties": {
16
- // "tag": { "const": "IncreasableMultiEntry" },
17
- // "id": {
18
- // "type": "object",
19
- // "properties": {
20
- // "tag": { "$ref": "_Id.schema.json#/definitions/Rated" },
21
- // "value": {
22
- // "type": "array",
23
- // "items": { "type": "integer", "minimum": 1 },
24
- // "uniqueItems": true,
25
- // "minItems": 2
26
- // }
27
- // },
28
- // "required": ["tag", "value"],
29
- // "additionalProperties": false
30
- // },
31
- // "value": {
32
- // "description": "The required minimum value.",
33
- // "type": "integer",
34
- // "minimum": 0
35
- // },
36
- // "display_option": { "$ref": "#/definitions/Single/DisplayOption" }
37
- // },
38
- // "required": ["tag", "id", "value"],
39
- // "additionalProperties": false
40
- // },
41
- // "AnimistPower": {
42
- // "title": "Animist Power Prerequisite",
43
- // "description": "Requires a specific animist power to be on a minimum value.",
44
- // "type": "object",
45
- // "properties": {
46
- // "tag": { "const": "AnimistPower" },
47
- // "id": { "type": "integer", "minimum": 1 },
48
- // "level": {
49
- // "description": "The level to which the minimum value applies.",
50
- // "type": "integer",
51
- // "minimum": 0
52
- // },
53
- // "value": {
54
- // "description": "The required minimum value.",
55
- // "type": "integer",
56
- // "minimum": 0
57
- // }
58
- // },
59
- // "required": ["tag", "id", "value"],
60
- // "additionalProperties": false
61
- // },
62
- // "MinimumSkillRating": {
63
- // "type": "object",
64
- // "properties": {
65
- // "tag": { "const": "MinimumSkillRating" },
66
- // "number": {
67
- // "description": "The minimum number of skills that need to be on the defined minimum skill rating.",
68
- // "type": "integer",
69
- // "minimum": 1
70
- // },
71
- // "value": {
72
- // "description": "The minimum skill rating the defined minimum number of skills need to be on.",
73
- // "type": "integer",
74
- // "minimum": 1
75
- // },
76
- // "targets": {
77
- // "oneOf": [
78
- // {
79
- // "type": "object",
80
- // "properties": {
81
- // "type": {
82
- // "const": "Skills"
83
- // },
84
- // "id": {
85
- // "type": "array",
86
- // "items": { "type": "integer", "minimum": 1 },
87
- // "minItems": 1
88
- // }
89
- // },
90
- // "required": ["type", "id"],
91
- // "additionalProperties": false
92
- // },
93
- // {
94
- // "type": "object",
95
- // "properties": {
96
- // "type": {
97
- // "const": "Spellworks"
98
- // },
99
- // "property": {
100
- // "type": "integer",
101
- // "minimum": 1
102
- // }
103
- // },
104
- // "required": ["type", "property"],
105
- // "additionalProperties": false
106
- // },
107
- // {
108
- // "type": "object",
109
- // "properties": {
110
- // "type": {
111
- // "const": "Liturgies"
112
- // },
113
- // "aspect": {
114
- // "type": "integer",
115
- // "minimum": 1
116
- // }
117
- // },
118
- // "required": ["type", "aspect"],
119
- // "additionalProperties": false
120
- // }
121
- // ]
122
- // },
123
- // "display_option": { "$ref": "#/definitions/Single/DisplayOption" }
124
- // },
125
- // "required": ["tag", "number", "value", "targets"],
126
- // "additionalProperties": false
127
- // },
128
- let Enhancement;
129
- (function (Enhancement) {
130
- let SkillCategoryWithEnhancements;
131
- (function (SkillCategoryWithEnhancements) {
132
- SkillCategoryWithEnhancements["Spell"] = "Spell";
133
- SkillCategoryWithEnhancements["Ritual"] = "Ritual";
134
- SkillCategoryWithEnhancements["LiturgicalChant"] = "LiturgicalChant";
135
- SkillCategoryWithEnhancements["Ceremony"] = "Ceremony";
136
- })(SkillCategoryWithEnhancements = Enhancement.SkillCategoryWithEnhancements || (Enhancement.SkillCategoryWithEnhancements = {}));
137
- })(Enhancement = Single.Enhancement || (Single.Enhancement = {}));
138
- })(Single = Prerequisite.Single || (Prerequisite.Single = {}));
139
- })(Prerequisite || (Prerequisite = {}));
4
+ export {};
@@ -142,6 +142,11 @@ export declare type AnimistPower = {
142
142
  full: string;
143
143
  abbr: string;
144
144
  };
145
+ /**
146
+ * A prerequisites text.
147
+ * @deprecated
148
+ */
149
+ prerequisites?: string;
145
150
  errata?: Errata;
146
151
  };
147
152
  };
@@ -5,7 +5,7 @@ import { SlowSkillCastingTimeUnit } from "../SkillModificationLevel";
5
5
  import { Errata } from "../source/_Erratum";
6
6
  import { PublicationRefs } from "../source/_PublicationRef";
7
7
  import { Cost, Duration, Effect, TargetCategory } from "../_ActivatableSkill";
8
- import { Prerequisite } from "../_Prerequisite";
8
+ import { GeodeRitualPrerequisites } from "../_Prerequisite";
9
9
  import { SkillCheck } from "../_SkillCheck";
10
10
  /**
11
11
  * @title Geode Ritual
@@ -35,7 +35,7 @@ export declare type GeodeRitual = {
35
35
  * @minimum 1
36
36
  */
37
37
  property_id: number;
38
- prerequisites?: Prerequisite.GroupCollection.GeodeRitual;
38
+ prerequisites?: GeodeRitualPrerequisites;
39
39
  src: PublicationRefs;
40
40
  /**
41
41
  * All translations for the entry, identified by IETF language tag (BCP47).
@@ -0,0 +1,10 @@
1
+ import { PreconditionGroup } from "./PrerequisiteGroups";
2
+ /**
3
+ * A list of preconditions for the prerequisite it is defined on, so that it
4
+ * only takes effect if the prerequisites in this list are matched.
5
+ *
6
+ * Usually appears at the `when` property of the parent prerequisite.
7
+ * @title Preconditions (`when`)
8
+ * @minItems 1
9
+ */
10
+ export declare type Preconditions = PreconditionGroup[];