optolith-database-schema 0.1.2 → 0.1.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.3](https://github.com/elyukai/optolith-database-schema/compare/v0.1.2...v0.1.3) (2022-03-09)
6
+
7
+
8
+ ### Features
9
+
10
+ * first concept of penalties for combat-related special abilities ([d79d3b3](https://github.com/elyukai/optolith-database-schema/commit/d79d3b3752252342795400c905e2944d1234bd37))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * remove generic numeric identifier maximum ([e121081](https://github.com/elyukai/optolith-database-schema/commit/e1210810f9cdbf8a720d0e12d5ec6ac21010a8dd))
16
+
5
17
  ### [0.1.2](https://github.com/elyukai/optolith-database-schema/compare/v0.1.1...v0.1.2) (2022-03-09)
6
18
 
7
19
 
@@ -182,7 +182,130 @@ export declare type SkillUses = {
182
182
  /**
183
183
  * The penalty the special ability gives when used.
184
184
  */
185
- export declare type Penalty = "";
185
+ export declare type Penalty = {
186
+ tag: "Single";
187
+ /**
188
+ * The penalty value.
189
+ * @integer
190
+ */
191
+ value: number;
192
+ /**
193
+ * Set to `true` if the penalty applies to the parry instead of the attack.
194
+ */
195
+ applies_to_parry?: true;
196
+ } | {
197
+ tag: "ByHandedness";
198
+ /**
199
+ * The penalty value for one-handed weapons.
200
+ * @integer
201
+ */
202
+ one_handed: number;
203
+ /**
204
+ * The penalty value for two-handed weapons.
205
+ * @integer
206
+ */
207
+ two_handed: number;
208
+ /**
209
+ * Set to `true` if the penalty applies to the parry instead of the attack.
210
+ */
211
+ applies_to_parry?: true;
212
+ } | {
213
+ tag: "ByActivation";
214
+ /**
215
+ * The penalty value if the entry has been bought by the character.
216
+ * @integer
217
+ */
218
+ active: number;
219
+ /**
220
+ * The penalty value if the entry has not been bought by the character.
221
+ * @integer
222
+ */
223
+ inactive: number;
224
+ /**
225
+ * Set to `true` if the penalty applies to the parry instead of the attack.
226
+ */
227
+ applies_to_parry?: true;
228
+ } | {
229
+ tag: "Selection";
230
+ options: {
231
+ tag: "Specific";
232
+ /**
233
+ * The list of specific penalty options.
234
+ * @minItems 2
235
+ * @uniqueItems
236
+ */
237
+ list: {
238
+ /**
239
+ * The penalty value.
240
+ * @integer
241
+ */
242
+ value: number;
243
+ }[];
244
+ } | {
245
+ tag: "Range";
246
+ /**
247
+ * The minimum penalty value.
248
+ * @integer
249
+ */
250
+ minimum: number;
251
+ /**
252
+ * The maximum penalty value.
253
+ * @integer
254
+ */
255
+ maximum: number;
256
+ };
257
+ } | {
258
+ tag: "ByLevel";
259
+ /**
260
+ * A continuous range of penalties for each level. The first element is the
261
+ * penalty for the first level, the second element is the penalty for the
262
+ * second level, and so on.
263
+ * @minItems 2
264
+ */
265
+ levels: {
266
+ /**
267
+ * The penalty value for this level.
268
+ * @integer
269
+ */
270
+ value: number;
271
+ }[];
272
+ /**
273
+ * The identifier of the combat-related special ability of which the level
274
+ * defines the penalty instead.
275
+ */
276
+ external_id?: Identifier.Group.CombatRelatedSpecialAbility;
277
+ } | {
278
+ tag: "ByAttack";
279
+ /**
280
+ * A list of penalties for subsequent attacks. The first element is the
281
+ * penalty for the first attack, the second element is the penalty for the
282
+ * second attack, and so on. The order of the first element may be changed
283
+ * using `initial_order`, so that e.g. if set to `2`, the first element is
284
+ * the penalty for the second attack, the second element is the penalty for
285
+ * the third attack, and so on.
286
+ * @minItems 1
287
+ */
288
+ list: {
289
+ /**
290
+ * The penalty value for this order.
291
+ * @integer
292
+ */
293
+ value: number;
294
+ }[];
295
+ /**
296
+ * The order of the first element in the `list` of penalties.
297
+ */
298
+ initial_order?: number;
299
+ /**
300
+ * Set if a predefined different word should be used instead of the word
301
+ * `attack` for display purposes.
302
+ */
303
+ attack_replacement?: {
304
+ tag: "Throw";
305
+ };
306
+ } | {
307
+ tag: "DependsOnHitZone";
308
+ };
186
309
  /**
187
310
  * The AE Cost.
188
311
  */
@@ -48,6 +48,12 @@ export declare namespace Identifier {
48
48
  RingEnchantment = "RingEnchantment",
49
49
  ChronicleEnchantment = "ChronicleEnchantment"
50
50
  }
51
+ enum CombatRelatedSpecialAbility {
52
+ CombatSpecialAbility = "CombatSpecialAbility",
53
+ CombatStyleSpecialAbility = "CombatStyleSpecialAbility",
54
+ AdvancedCombatSpecialAbility = "AdvancedCombatSpecialAbility",
55
+ CommandSpecialAbility = "CommandSpecialAbility"
56
+ }
51
57
  enum Rated {
52
58
  Attribute = "Attribute",
53
59
  Skill = "Skill",
@@ -73,12 +79,12 @@ export declare namespace Identifier {
73
79
  * The referenced entry's numeric identifier.
74
80
  * @integer
75
81
  * @minimum 1
76
- * @maximum 8
77
82
  */
78
83
  value: number;
79
84
  };
80
85
  namespace Group {
81
86
  type Activatable = Tagged<Tag.Activatable>;
87
+ type CombatRelatedSpecialAbility = Tagged<Tag.CombatRelatedSpecialAbility>;
82
88
  type Rated = Tagged<Tag.Rated>;
83
89
  type AdvancedSpecialAbilityRestrictedOption = Tagged<Tag.AdvancedSpecialAbilityRestrictedOption>;
84
90
  type CombatTechnique = Tagged<Tag.CombatTechnique>;
@@ -51,6 +51,13 @@ export var Identifier;
51
51
  Activatable["RingEnchantment"] = "RingEnchantment";
52
52
  Activatable["ChronicleEnchantment"] = "ChronicleEnchantment";
53
53
  })(Activatable = Tag.Activatable || (Tag.Activatable = {}));
54
+ let CombatRelatedSpecialAbility;
55
+ (function (CombatRelatedSpecialAbility) {
56
+ CombatRelatedSpecialAbility["CombatSpecialAbility"] = "CombatSpecialAbility";
57
+ CombatRelatedSpecialAbility["CombatStyleSpecialAbility"] = "CombatStyleSpecialAbility";
58
+ CombatRelatedSpecialAbility["AdvancedCombatSpecialAbility"] = "AdvancedCombatSpecialAbility";
59
+ CombatRelatedSpecialAbility["CommandSpecialAbility"] = "CommandSpecialAbility";
60
+ })(CombatRelatedSpecialAbility = Tag.CombatRelatedSpecialAbility || (Tag.CombatRelatedSpecialAbility = {}));
54
61
  let Rated;
55
62
  (function (Rated) {
56
63
  Rated["Attribute"] = "Attribute";
@@ -13,6 +13,7 @@ export declare type AdvancedCombatSpecialAbility = {
13
13
  usage_type: Activatable.CombatSpecialAbilityType;
14
14
  skill_applications?: Activatable.SkillApplications;
15
15
  skill_uses?: Activatable.SkillUses;
16
+ penalty?: Activatable.Penalty;
16
17
  combat_techniques: Activatable.ApplicableCombatTechniques;
17
18
  ap_value: Activatable.AdventurePointsValue;
18
19
  src: PublicationRefs;
@@ -13,6 +13,7 @@ export declare type CombatSpecialAbility = {
13
13
  usage_type: Activatable.CombatSpecialAbilityType;
14
14
  skill_applications?: Activatable.SkillApplications;
15
15
  skill_uses?: Activatable.SkillUses;
16
+ penalty?: Activatable.Penalty;
16
17
  combat_techniques: Activatable.ApplicableCombatTechniques;
17
18
  ap_value: Activatable.AdventurePointsValue;
18
19
  src: PublicationRefs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Definitions and utilities for the flat-file database of Optolith, a character creation tool for the Pen and Paper RPG “The Dark Eye 5”, and its external integrations into other software.",
5
5
  "keywords": [
6
6
  "tde",
@@ -280,7 +280,251 @@
280
280
  },
281
281
  "Penalty": {
282
282
  "description": "The penalty the special ability gives when used.",
283
- "const": ""
283
+ "oneOf": [
284
+ {
285
+ "type": "object",
286
+ "properties": {
287
+ "tag": {
288
+ "const": "Single"
289
+ },
290
+ "value": {
291
+ "description": "The penalty value.",
292
+ "type": "integer"
293
+ },
294
+ "applies_to_parry": {
295
+ "description": "Set to `true` if the penalty applies to the parry instead of the attack.",
296
+ "const": true
297
+ }
298
+ },
299
+ "required": [
300
+ "tag",
301
+ "value"
302
+ ],
303
+ "additionalProperties": false
304
+ },
305
+ {
306
+ "type": "object",
307
+ "properties": {
308
+ "tag": {
309
+ "const": "ByHandedness"
310
+ },
311
+ "one_handed": {
312
+ "description": "The penalty value for one-handed weapons.",
313
+ "type": "integer"
314
+ },
315
+ "two_handed": {
316
+ "description": "The penalty value for two-handed weapons.",
317
+ "type": "integer"
318
+ },
319
+ "applies_to_parry": {
320
+ "description": "Set to `true` if the penalty applies to the parry instead of the attack.",
321
+ "const": true
322
+ }
323
+ },
324
+ "required": [
325
+ "tag",
326
+ "one_handed",
327
+ "two_handed"
328
+ ],
329
+ "additionalProperties": false
330
+ },
331
+ {
332
+ "type": "object",
333
+ "properties": {
334
+ "tag": {
335
+ "const": "ByActivation"
336
+ },
337
+ "active": {
338
+ "description": "The penalty value if the entry has been bought by the character.",
339
+ "type": "integer"
340
+ },
341
+ "inactive": {
342
+ "description": "The penalty value if the entry has not been bought by the character.",
343
+ "type": "integer"
344
+ },
345
+ "applies_to_parry": {
346
+ "description": "Set to `true` if the penalty applies to the parry instead of the attack.",
347
+ "const": true
348
+ }
349
+ },
350
+ "required": [
351
+ "tag",
352
+ "active",
353
+ "inactive"
354
+ ],
355
+ "additionalProperties": false
356
+ },
357
+ {
358
+ "type": "object",
359
+ "properties": {
360
+ "tag": {
361
+ "const": "Selection"
362
+ },
363
+ "options": {
364
+ "oneOf": [
365
+ {
366
+ "type": "object",
367
+ "properties": {
368
+ "tag": {
369
+ "const": "Specific"
370
+ },
371
+ "list": {
372
+ "description": "The list of specific penalty options.",
373
+ "type": "array",
374
+ "items": {
375
+ "type": "object",
376
+ "properties": {
377
+ "value": {
378
+ "description": "The penalty value.",
379
+ "type": "integer"
380
+ }
381
+ },
382
+ "required": [
383
+ "value"
384
+ ],
385
+ "additionalProperties": false
386
+ },
387
+ "minItems": 2,
388
+ "uniqueItems": true
389
+ }
390
+ },
391
+ "required": [
392
+ "tag",
393
+ "list"
394
+ ],
395
+ "additionalProperties": false
396
+ },
397
+ {
398
+ "type": "object",
399
+ "properties": {
400
+ "tag": {
401
+ "const": "Range"
402
+ },
403
+ "minimum": {
404
+ "description": "The minimum penalty value.",
405
+ "type": "integer"
406
+ },
407
+ "maximum": {
408
+ "description": "The maximum penalty value.",
409
+ "type": "integer"
410
+ }
411
+ },
412
+ "required": [
413
+ "tag",
414
+ "minimum",
415
+ "maximum"
416
+ ],
417
+ "additionalProperties": false
418
+ }
419
+ ]
420
+ }
421
+ },
422
+ "required": [
423
+ "tag",
424
+ "options"
425
+ ],
426
+ "additionalProperties": false
427
+ },
428
+ {
429
+ "type": "object",
430
+ "properties": {
431
+ "tag": {
432
+ "const": "ByLevel"
433
+ },
434
+ "levels": {
435
+ "description": "A continuous range of penalties for each level. The first element is the\npenalty for the first level, the second element is the penalty for the\nsecond level, and so on.",
436
+ "type": "array",
437
+ "items": {
438
+ "type": "object",
439
+ "properties": {
440
+ "value": {
441
+ "description": "The penalty value for this level.",
442
+ "type": "integer"
443
+ }
444
+ },
445
+ "required": [
446
+ "value"
447
+ ],
448
+ "additionalProperties": false
449
+ },
450
+ "minItems": 2
451
+ },
452
+ "external_id": {
453
+ "description": "The identifier of the combat-related special ability of which the level\ndefines the penalty instead.",
454
+ "$ref": "./_Identifier.schema.json#/definitions/Identifier/Group/CombatRelatedSpecialAbility"
455
+ }
456
+ },
457
+ "required": [
458
+ "tag",
459
+ "levels"
460
+ ],
461
+ "additionalProperties": false
462
+ },
463
+ {
464
+ "type": "object",
465
+ "properties": {
466
+ "tag": {
467
+ "const": "ByAttack"
468
+ },
469
+ "list": {
470
+ "description": "A list of penalties for subsequent attacks. The first element is the\npenalty for the first attack, the second element is the penalty for the\nsecond attack, and so on. The order of the first element may be changed\nusing `initial_order`, so that e.g. if set to `2`, the first element is\nthe penalty for the second attack, the second element is the penalty for\nthe third attack, and so on.",
471
+ "type": "array",
472
+ "items": {
473
+ "type": "object",
474
+ "properties": {
475
+ "value": {
476
+ "description": "The penalty value for this order.",
477
+ "type": "integer"
478
+ }
479
+ },
480
+ "required": [
481
+ "value"
482
+ ],
483
+ "additionalProperties": false
484
+ },
485
+ "minItems": 1
486
+ },
487
+ "initial_order": {
488
+ "description": "The order of the first element in the `list` of penalties.",
489
+ "type": "number"
490
+ },
491
+ "attack_replacement": {
492
+ "description": "Set if a predefined different word should be used instead of the word\n`attack` for display purposes.",
493
+ "oneOf": [
494
+ {
495
+ "type": "object",
496
+ "properties": {
497
+ "tag": {
498
+ "const": "Throw"
499
+ }
500
+ },
501
+ "required": [
502
+ "tag"
503
+ ],
504
+ "additionalProperties": false
505
+ }
506
+ ]
507
+ }
508
+ },
509
+ "required": [
510
+ "tag",
511
+ "list"
512
+ ],
513
+ "additionalProperties": false
514
+ },
515
+ {
516
+ "type": "object",
517
+ "properties": {
518
+ "tag": {
519
+ "const": "DependsOnHitZone"
520
+ }
521
+ },
522
+ "required": [
523
+ "tag"
524
+ ],
525
+ "additionalProperties": false
526
+ }
527
+ ]
284
528
  },
285
529
  "ArcaneEnergyCost": {
286
530
  "description": "The AE Cost.",
@@ -506,7 +750,6 @@
506
750
  "value": {
507
751
  "description": "The referenced entry's numeric identifier.",
508
752
  "type": "integer",
509
- "maximum": 8,
510
753
  "minimum": 1
511
754
  }
512
755
  },
@@ -525,7 +768,6 @@
525
768
  "value": {
526
769
  "description": "The referenced entry's numeric identifier.",
527
770
  "type": "integer",
528
- "maximum": 8,
529
771
  "minimum": 1
530
772
  }
531
773
  },
@@ -54,6 +54,14 @@
54
54
  "ChronicleEnchantment"
55
55
  ]
56
56
  },
57
+ "CombatRelatedSpecialAbility": {
58
+ "enum": [
59
+ "CombatSpecialAbility",
60
+ "CombatStyleSpecialAbility",
61
+ "AdvancedCombatSpecialAbility",
62
+ "CommandSpecialAbility"
63
+ ]
64
+ },
57
65
  "Rated": {
58
66
  "enum": [
59
67
  "Attribute",
@@ -89,7 +97,24 @@
89
97
  "value": {
90
98
  "description": "The referenced entry's numeric identifier.",
91
99
  "type": "integer",
92
- "maximum": 8,
100
+ "minimum": 1
101
+ }
102
+ },
103
+ "required": [
104
+ "tag",
105
+ "value"
106
+ ],
107
+ "additionalProperties": false
108
+ },
109
+ "CombatRelatedSpecialAbility": {
110
+ "type": "object",
111
+ "properties": {
112
+ "tag": {
113
+ "$ref": "#/definitions/Identifier/Tag/CombatRelatedSpecialAbility"
114
+ },
115
+ "value": {
116
+ "description": "The referenced entry's numeric identifier.",
117
+ "type": "integer",
93
118
  "minimum": 1
94
119
  }
95
120
  },
@@ -108,7 +133,6 @@
108
133
  "value": {
109
134
  "description": "The referenced entry's numeric identifier.",
110
135
  "type": "integer",
111
- "maximum": 8,
112
136
  "minimum": 1
113
137
  }
114
138
  },
@@ -127,7 +151,6 @@
127
151
  "value": {
128
152
  "description": "The referenced entry's numeric identifier.",
129
153
  "type": "integer",
130
- "maximum": 8,
131
154
  "minimum": 1
132
155
  }
133
156
  },
@@ -146,7 +169,6 @@
146
169
  "value": {
147
170
  "description": "The referenced entry's numeric identifier.",
148
171
  "type": "integer",
149
- "maximum": 8,
150
172
  "minimum": 1
151
173
  }
152
174
  },
@@ -22,6 +22,9 @@
22
22
  "skill_uses": {
23
23
  "$ref": "../_Activatable.schema.json#/definitions/SkillUses"
24
24
  },
25
+ "penalty": {
26
+ "$ref": "../_Activatable.schema.json#/definitions/Penalty"
27
+ },
25
28
  "combat_techniques": {
26
29
  "$ref": "../_Activatable.schema.json#/definitions/ApplicableCombatTechniques"
27
30
  },
@@ -22,6 +22,9 @@
22
22
  "skill_uses": {
23
23
  "$ref": "../_Activatable.schema.json#/definitions/SkillUses"
24
24
  },
25
+ "penalty": {
26
+ "$ref": "../_Activatable.schema.json#/definitions/Penalty"
27
+ },
25
28
  "combat_techniques": {
26
29
  "$ref": "../_Activatable.schema.json#/definitions/ApplicableCombatTechniques"
27
30
  },