optolith-database-schema 0.0.1 → 0.0.2

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 (35) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/lib/types/Ceremony.d.ts +150 -0
  3. package/lib/types/Ceremony.js +4 -0
  4. package/lib/types/LiturgicalChant.d.ts +150 -0
  5. package/lib/types/LiturgicalChant.js +4 -0
  6. package/lib/types/Ritual.d.ts +134 -0
  7. package/lib/types/Ritual.js +4 -0
  8. package/lib/types/{SkillModificationIncrement.d.ts → SkillModificationLevel.d.ts} +58 -31
  9. package/lib/types/SkillModificationLevel.js +8 -0
  10. package/lib/types/Spell.d.ts +134 -0
  11. package/lib/types/Spell.js +4 -0
  12. package/lib/types/_ActivatableSkill.d.ts +42 -15
  13. package/lib/types/_ActivatableSkill.js +0 -5
  14. package/lib/types/_Enhancements.d.ts +66 -0
  15. package/lib/types/_Enhancements.js +4 -0
  16. package/lib/types/_Identifier.d.ts +80 -0
  17. package/lib/types/_Identifier.js +1 -0
  18. package/lib/types/_Prerequisite.d.ts +93 -1
  19. package/lib/types/_Prerequisite.js +183 -1
  20. package/lib/types/magicalActions/GeodeRitual.d.ts +3 -2
  21. package/lib/types/magicalActions/ZibiljaRitual.d.ts +2 -2
  22. package/package.json +1 -1
  23. package/schema/Ceremony.schema.json +239 -0
  24. package/schema/LiturgicalChant.schema.json +239 -0
  25. package/schema/Ritual.schema.json +219 -0
  26. package/schema/SkillModificationLevel.schema.json +138 -0
  27. package/schema/Spell.schema.json +219 -0
  28. package/schema/_ActivatableSkill.schema.json +174 -19
  29. package/schema/_Enhancements.schema.json +82 -0
  30. package/schema/_Identifier.schema.json +185 -0
  31. package/schema/_Prerequisite.schema.json +199 -1
  32. package/schema/magicalActions/GeodeRitual.schema.json +1 -1
  33. package/schema/magicalActions/ZibiljaRitual.schema.json +1 -1
  34. package/lib/types/SkillModificationIncrement.js +0 -4
  35. package/schema/SkillModificationIncrement.schema.json +0 -98
@@ -0,0 +1,219 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "Spell.schema.json",
4
+ "$ref": "#/definitions/Spell",
5
+ "definitions": {
6
+ "Spell": {
7
+ "title": "Spell",
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "description": "The spell's identifier. An unique, increasing integer.",
12
+ "type": "integer",
13
+ "minimum": 1
14
+ },
15
+ "check": {
16
+ "description": "Lists the linked three attributes used to make a skill check.",
17
+ "$ref": "./_SkillCheck.schema.json#/definitions/SkillCheck"
18
+ },
19
+ "check_penalty": {
20
+ "description": "In some cases, the target's Spirit or Toughness is applied as a penalty.",
21
+ "$ref": "./_SkillCheck.schema.json#/definitions/SkillCheckPenalty"
22
+ },
23
+ "parameters": {
24
+ "description": "Measurable parameters of a spell.",
25
+ "$ref": "./_ActivatableSkill.schema.json#/definitions/FastPerformanceParameters"
26
+ },
27
+ "target": {
28
+ "description": "The target category – the kind of creature or object – the skill affects.",
29
+ "$ref": "./_ActivatableSkill.schema.json#/definitions/TargetCategory/T"
30
+ },
31
+ "property_id": {
32
+ "description": "The property's identifier.",
33
+ "type": "integer",
34
+ "minimum": 1
35
+ },
36
+ "traditions": {
37
+ "description": "The tradition(s) the spell is available for. It may be *generally*\navailable to all traditions or it may be only familiar in specific\ntraditions.",
38
+ "oneOf": [
39
+ {
40
+ "type": "object",
41
+ "properties": {
42
+ "tag": {
43
+ "const": "General"
44
+ }
45
+ },
46
+ "required": [
47
+ "tag"
48
+ ],
49
+ "additionalProperties": false
50
+ },
51
+ {
52
+ "type": "object",
53
+ "properties": {
54
+ "tag": {
55
+ "const": "Specific"
56
+ },
57
+ "list": {
58
+ "description": "A list of specific traditions.",
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object",
62
+ "properties": {
63
+ "id": {
64
+ "description": "The magical tradition's identifier. If `is_placeholder` is `true`\nthen this is the magical tradition's placeholder identifier\ninstead.",
65
+ "type": "integer",
66
+ "minimum": 1
67
+ },
68
+ "is_placeholder": {
69
+ "description": "If set to `true`, the tradition is not available as a special ability\nyet.",
70
+ "const": true
71
+ }
72
+ },
73
+ "required": [
74
+ "id"
75
+ ],
76
+ "additionalProperties": false
77
+ },
78
+ "minItems": 1
79
+ }
80
+ },
81
+ "required": [
82
+ "tag",
83
+ "list"
84
+ ],
85
+ "additionalProperties": false
86
+ }
87
+ ]
88
+ },
89
+ "improvement_cost": {
90
+ "description": "States which column is used to improve the skill.",
91
+ "$ref": "./_ImprovementCost.schema.json#/definitions/ImprovementCost"
92
+ },
93
+ "prerequisites": {
94
+ "$ref": "./_Prerequisite.schema.json#/definitions/GroupCollection/Spellwork"
95
+ },
96
+ "src": {
97
+ "$ref": "./source/_PublicationRef.schema.json#/definitions/PublicationRefs"
98
+ },
99
+ "translations": {
100
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
101
+ "type": "object",
102
+ "patternProperties": {
103
+ "^[a-z]{2}-[A-Z]{2}$": {
104
+ "type": "object",
105
+ "properties": {
106
+ "name": {
107
+ "description": "The name of the spell.",
108
+ "type": "string",
109
+ "minLength": 1
110
+ },
111
+ "effect": {
112
+ "description": "The effect description may be either a plain text or a text that is\ndivided by a list of effects for each quality level. It may also be a\nlist for each two quality levels.",
113
+ "$ref": "./_ActivatableSkill.schema.json#/definitions/Effect/T"
114
+ },
115
+ "casting_time": {
116
+ "type": "object",
117
+ "properties": {
118
+ "full": {
119
+ "type": "string"
120
+ },
121
+ "abbr": {
122
+ "type": "string"
123
+ }
124
+ },
125
+ "required": [
126
+ "full",
127
+ "abbr"
128
+ ],
129
+ "additionalProperties": false
130
+ },
131
+ "cost": {
132
+ "type": "object",
133
+ "properties": {
134
+ "full": {
135
+ "type": "string"
136
+ },
137
+ "abbr": {
138
+ "type": "string"
139
+ }
140
+ },
141
+ "required": [
142
+ "full",
143
+ "abbr"
144
+ ],
145
+ "additionalProperties": false
146
+ },
147
+ "range": {
148
+ "type": "object",
149
+ "properties": {
150
+ "full": {
151
+ "type": "string"
152
+ },
153
+ "abbr": {
154
+ "type": "string"
155
+ }
156
+ },
157
+ "required": [
158
+ "full",
159
+ "abbr"
160
+ ],
161
+ "additionalProperties": false
162
+ },
163
+ "duration": {
164
+ "type": "object",
165
+ "properties": {
166
+ "full": {
167
+ "type": "string"
168
+ },
169
+ "abbr": {
170
+ "type": "string"
171
+ }
172
+ },
173
+ "required": [
174
+ "full",
175
+ "abbr"
176
+ ],
177
+ "additionalProperties": false
178
+ },
179
+ "target": {
180
+ "type": "string"
181
+ },
182
+ "errata": {
183
+ "$ref": "./source/_Erratum.schema.json#/definitions/Errata"
184
+ }
185
+ },
186
+ "required": [
187
+ "name",
188
+ "effect",
189
+ "casting_time",
190
+ "cost",
191
+ "range",
192
+ "duration",
193
+ "target"
194
+ ],
195
+ "additionalProperties": false
196
+ }
197
+ },
198
+ "minProperties": 1,
199
+ "additionalProperties": false
200
+ },
201
+ "enhancements": {
202
+ "$ref": "./_Enhancements.schema.json#/definitions/Enhancements"
203
+ }
204
+ },
205
+ "required": [
206
+ "id",
207
+ "check",
208
+ "parameters",
209
+ "target",
210
+ "property_id",
211
+ "traditions",
212
+ "improvement_cost",
213
+ "src",
214
+ "translations"
215
+ ],
216
+ "additionalProperties": false
217
+ }
218
+ }
219
+ }
@@ -165,7 +165,7 @@
165
165
  "minLength": 1
166
166
  }
167
167
  },
168
- "PerformanceParameters": {
168
+ "FastPerformanceParameters": {
169
169
  "oneOf": [
170
170
  {
171
171
  "type": "object",
@@ -174,7 +174,7 @@
174
174
  "const": "OneTime"
175
175
  },
176
176
  "casting_time": {
177
- "$ref": "#/definitions/CastingTime/T"
177
+ "$ref": "#/definitions/CastingTime/Fast"
178
178
  },
179
179
  "cost": {
180
180
  "$ref": "#/definitions/Cost/OneTime/T"
@@ -202,7 +202,66 @@
202
202
  "const": "Sustained"
203
203
  },
204
204
  "casting_time": {
205
- "$ref": "#/definitions/CastingTime/T"
205
+ "$ref": "#/definitions/CastingTime/Fast"
206
+ },
207
+ "cost": {
208
+ "$ref": "#/definitions/Cost/Sustained/T"
209
+ },
210
+ "range": {
211
+ "$ref": "#/definitions/Range/T"
212
+ },
213
+ "duration": {
214
+ "$ref": "#/definitions/Duration/Sustained/T"
215
+ }
216
+ },
217
+ "required": [
218
+ "tag",
219
+ "casting_time",
220
+ "cost",
221
+ "range"
222
+ ],
223
+ "additionalProperties": false
224
+ }
225
+ ]
226
+ },
227
+ "SlowPerformanceParameters": {
228
+ "oneOf": [
229
+ {
230
+ "type": "object",
231
+ "properties": {
232
+ "tag": {
233
+ "const": "OneTime"
234
+ },
235
+ "casting_time": {
236
+ "$ref": "#/definitions/CastingTime/Slow"
237
+ },
238
+ "cost": {
239
+ "$ref": "#/definitions/Cost/OneTime/T"
240
+ },
241
+ "range": {
242
+ "$ref": "#/definitions/Range/T"
243
+ },
244
+ "duration": {
245
+ "$ref": "#/definitions/Duration/OneTime/T"
246
+ }
247
+ },
248
+ "required": [
249
+ "tag",
250
+ "casting_time",
251
+ "cost",
252
+ "range",
253
+ "duration"
254
+ ],
255
+ "additionalProperties": false
256
+ },
257
+ {
258
+ "type": "object",
259
+ "properties": {
260
+ "tag": {
261
+ "const": "Sustained"
262
+ },
263
+ "casting_time": {
264
+ "$ref": "#/definitions/CastingTime/Slow"
206
265
  },
207
266
  "cost": {
208
267
  "$ref": "#/definitions/Cost/Sustained/T"
@@ -225,36 +284,138 @@
225
284
  ]
226
285
  },
227
286
  "CastingTime": {
228
- "T": {
287
+ "FastSkillCastingTime": {
288
+ "type": "object",
289
+ "properties": {
290
+ "tag": {
291
+ "const": "NonModifiable"
292
+ },
293
+ "value": {
294
+ "description": "The casting time value in actions.",
295
+ "type": "integer",
296
+ "minimum": 1
297
+ }
298
+ },
299
+ "required": [
300
+ "tag",
301
+ "value"
302
+ ],
303
+ "additionalProperties": false
304
+ },
305
+ "SlowSkillCastingTime": {
306
+ "type": "object",
307
+ "properties": {
308
+ "tag": {
309
+ "const": "NonModifiable"
310
+ },
311
+ "value": {
312
+ "description": "The (unitless) casting time value.",
313
+ "type": "integer",
314
+ "minimum": 1
315
+ },
316
+ "unit": {
317
+ "$ref": "./SkillModificationLevel.schema.json#/definitions/SlowSkillCastingTimeUnit"
318
+ }
319
+ },
320
+ "required": [
321
+ "tag",
322
+ "value",
323
+ "unit"
324
+ ],
325
+ "additionalProperties": false
326
+ },
327
+ "Fast": {
229
328
  "type": "object",
230
329
  "properties": {
231
330
  "default": {
232
331
  "description": "The default casting time definition.",
332
+ "oneOf": [
333
+ {
334
+ "type": "object",
335
+ "properties": {
336
+ "tag": {
337
+ "const": "Modifiable"
338
+ },
339
+ "initial_modification_level": {
340
+ "description": "The initial skill modification identifier/level.",
341
+ "type": "integer",
342
+ "maximum": 6,
343
+ "minimum": 1
344
+ }
345
+ },
346
+ "required": [
347
+ "tag",
348
+ "initial_modification_level"
349
+ ],
350
+ "additionalProperties": false
351
+ },
352
+ {
353
+ "$ref": "#/definitions/CastingTime/FastSkillCastingTime"
354
+ }
355
+ ]
356
+ },
357
+ "during_lovemaking": {
358
+ "description": "The casting time during lovemaking. In Aventurian Intimacy, you may only\nuse an activatable skill during lovemaking if it has a casting time used\nduring lovemaking.",
233
359
  "type": "object",
234
360
  "properties": {
235
- "initial_modification_level": {
236
- "description": "The initial skill modification identifier/level.",
361
+ "value": {
362
+ "description": "The (unitless) casting time value.",
237
363
  "type": "integer",
238
- "maximum": 6,
239
364
  "minimum": 1
240
365
  },
241
- "is_modifiable": {
242
- "description": "Is the casting time modifiable?",
243
- "type": "boolean"
366
+ "unit": {
367
+ "description": "The unit of the `value`.",
368
+ "$ref": "#/definitions/CastingTime/CastingTimeDuringLovemakingUnit"
244
369
  }
245
370
  },
246
371
  "required": [
247
- "initial_modification_level",
248
- "is_modifiable"
372
+ "value",
373
+ "unit"
249
374
  ],
250
375
  "additionalProperties": false
376
+ }
377
+ },
378
+ "required": [
379
+ "default"
380
+ ],
381
+ "additionalProperties": false
382
+ },
383
+ "Slow": {
384
+ "type": "object",
385
+ "properties": {
386
+ "default": {
387
+ "description": "The default casting time definition.",
388
+ "oneOf": [
389
+ {
390
+ "type": "object",
391
+ "properties": {
392
+ "tag": {
393
+ "const": "Modifiable"
394
+ },
395
+ "initial_modification_level": {
396
+ "description": "The initial skill modification identifier/level.",
397
+ "type": "integer",
398
+ "maximum": 6,
399
+ "minimum": 1
400
+ }
401
+ },
402
+ "required": [
403
+ "tag",
404
+ "initial_modification_level"
405
+ ],
406
+ "additionalProperties": false
407
+ },
408
+ {
409
+ "$ref": "#/definitions/CastingTime/SlowSkillCastingTime"
410
+ }
411
+ ]
251
412
  },
252
413
  "during_lovemaking": {
253
414
  "description": "The casting time during lovemaking. In Aventurian Intimacy, you may only\nuse an activatable skill during lovemaking if it has a casting time used\nduring lovemaking.",
254
415
  "type": "object",
255
416
  "properties": {
256
417
  "value": {
257
- "description": "The (unitless) duration value.",
418
+ "description": "The (unitless) casting time value.",
258
419
  "type": "integer",
259
420
  "minimum": 1
260
421
  },
@@ -280,12 +441,6 @@
280
441
  "SeductionActions",
281
442
  "Rounds"
282
443
  ]
283
- },
284
- "SlowSkillCastingTimeUnit": {
285
- "enum": [
286
- "Minutes",
287
- "Hours"
288
- ]
289
444
  }
290
445
  },
291
446
  "Cost": {
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "_Enhancements.schema.json",
4
+ "definitions": {
5
+ "Enhancements": {
6
+ "description": "A list of enhancements.",
7
+ "type": "array",
8
+ "items": {
9
+ "$ref": "#/definitions/Enhancement"
10
+ },
11
+ "minItems": 3,
12
+ "maxItems": 5
13
+ },
14
+ "Enhancement": {
15
+ "title": "Enhancement",
16
+ "type": "object",
17
+ "properties": {
18
+ "id": {
19
+ "description": "The enhancement's identifier. An unique, increasing integer.",
20
+ "type": "integer",
21
+ "minimum": 1
22
+ },
23
+ "skill_rating": {
24
+ "description": "The skill rating required to learn this enhancement.",
25
+ "type": "integer",
26
+ "maximum": 16,
27
+ "minimum": 8
28
+ },
29
+ "adventure_points_modifier": {
30
+ "description": "The value to multiply with the numeric representation of the associated\nskill's improvement cost to form the final AP cost of this enhancement.",
31
+ "type": "integer",
32
+ "minimum": 1
33
+ },
34
+ "prerequisites": {
35
+ "$ref": "./_Prerequisite.schema.json#/definitions/GroupCollection/Enhancement"
36
+ },
37
+ "src": {
38
+ "description": "Only defined if different than the associated skill.",
39
+ "$ref": "./source/_PublicationRef.schema.json#/definitions/PublicationRefs"
40
+ },
41
+ "translations": {
42
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
43
+ "type": "object",
44
+ "patternProperties": {
45
+ "^[a-z]{2}-[A-Z]{2}$": {
46
+ "type": "object",
47
+ "properties": {
48
+ "name": {
49
+ "description": "The name of the enhancement.",
50
+ "type": "string",
51
+ "minLength": 1
52
+ },
53
+ "effect": {
54
+ "description": "The effect description.",
55
+ "type": "string",
56
+ "minLength": 1
57
+ },
58
+ "errata": {
59
+ "$ref": "./source/_Erratum.schema.json#/definitions/Errata"
60
+ }
61
+ },
62
+ "required": [
63
+ "name",
64
+ "effect"
65
+ ],
66
+ "additionalProperties": false
67
+ }
68
+ },
69
+ "minProperties": 1,
70
+ "additionalProperties": false
71
+ }
72
+ },
73
+ "required": [
74
+ "id",
75
+ "skill_rating",
76
+ "adventure_points_modifier",
77
+ "translations"
78
+ ],
79
+ "additionalProperties": false
80
+ }
81
+ }
82
+ }