optolith-database-schema 0.1.14 → 0.1.17

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,33 @@
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.17](https://github.com/elyukai/optolith-database-schema/compare/v0.1.16...v0.1.17) (2022-03-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * duration value can be 1 ([9be3bdb](https://github.com/elyukai/optolith-database-schema/commit/9be3bdbc0e0b8502e7d0424f94eaf1b7b57091eb))
11
+ * zibilja rituals need their own custom parameters ([d60ee69](https://github.com/elyukai/optolith-database-schema/commit/d60ee693dda449d2b00d4f77dbef8d0a9e1e1e8b))
12
+
13
+ ### [0.1.16](https://github.com/elyukai/optolith-database-schema/compare/v0.1.15...v0.1.16) (2022-03-17)
14
+
15
+
16
+ ### Features
17
+
18
+ * support countable entities for ae cost of elven magical songs ([2feb0de](https://github.com/elyukai/optolith-database-schema/commit/2feb0deed85b7e823597560fd83523556a283642))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * sex restriction of a name group from a culture should be optional ([e09f0b4](https://github.com/elyukai/optolith-database-schema/commit/e09f0b43d8b193303d67247a060fcaad8495a99f))
24
+
25
+ ### [0.1.15](https://github.com/elyukai/optolith-database-schema/compare/v0.1.14...v0.1.15) (2022-03-16)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * remove fields not present in cantrip ([132f37b](https://github.com/elyukai/optolith-database-schema/commit/132f37b211732c039f784e1279ff997f998d0be7))
31
+
5
32
  ### [0.1.14](https://github.com/elyukai/optolith-database-schema/compare/v0.1.13...v0.1.14) (2022-03-16)
6
33
 
7
34
 
@@ -80,14 +80,6 @@ export declare type Cantrip = {
80
80
  * @minLength 1
81
81
  */
82
82
  effect: string;
83
- /**
84
- * @deprecated
85
- */
86
- casting_time: string;
87
- /**
88
- * @deprecated
89
- */
90
- cost: string;
91
83
  /**
92
84
  * @deprecated
93
85
  */
@@ -473,7 +473,7 @@ declare type NameGroup = {
473
473
  /**
474
474
  * The binary sex if the group is only for a certain binary sex.
475
475
  */
476
- sex: BinarySex;
476
+ sex?: BinarySex;
477
477
  /**
478
478
  * The names from the group.
479
479
  * @minItems 1
@@ -147,16 +147,7 @@ export declare namespace CastingTime {
147
147
  /**
148
148
  * The default casting time definition.
149
149
  */
150
- default: {
151
- tag: "Modifiable";
152
- /**
153
- * The initial skill modification identifier/level.
154
- * @integer
155
- * @minimum 1
156
- * @maximum 6
157
- */
158
- initial_modification_level: number;
159
- } | NonModifiable;
150
+ default: ModifiableCastingTime | NonModifiable;
160
151
  /**
161
152
  * The casting time during lovemaking. In Aventurian Intimacy, you may only
162
153
  * use an activatable skill during lovemaking if it has a casting time used
@@ -175,6 +166,16 @@ export declare namespace CastingTime {
175
166
  unit: CastingTimeDuringLovemakingUnit;
176
167
  };
177
168
  };
169
+ type ModifiableCastingTime = {
170
+ tag: "Modifiable";
171
+ /**
172
+ * The initial skill modification identifier/level.
173
+ * @integer
174
+ * @minimum 1
175
+ * @maximum 6
176
+ */
177
+ initial_modification_level: number;
178
+ };
178
179
  type FastSkillCastingTime = {
179
180
  tag: "NonModifiable";
180
181
  /**
@@ -480,12 +481,15 @@ export declare namespace Range {
480
481
  translations?: {
481
482
  /**
482
483
  * @patternProperties ^[a-z]{2}-[A-Z]{2}$
484
+ * @minProperties 1
483
485
  */
484
486
  [localeId: string]: {
485
487
  /**
486
- * A note, appended to the generated string in parenthesis.
488
+ * A note, appended to the generated string in parenthesis. If the
489
+ * generated is modified using `replacement`, the note is appended to
490
+ * the modifier string.
487
491
  */
488
- note: {
492
+ note?: {
489
493
  /**
490
494
  * The full note.
491
495
  * @minLength 1
@@ -498,6 +502,31 @@ export declare namespace Range {
498
502
  */
499
503
  compressed?: string;
500
504
  };
505
+ /**
506
+ * A replacement string. If `note` is provided, it is appended to the
507
+ * replaced string.
508
+ */
509
+ replacement?: {
510
+ /**
511
+ * The full replacement string. It must contain `$1`, which is
512
+ * going to be replaced with the generated duration string, so
513
+ * additional information can be provided without duplicating
514
+ * concrete numeric values.
515
+ * @minLength 1
516
+ * @pattern \$1
517
+ */
518
+ default: string;
519
+ /**
520
+ * A compressed replacement string for use in small areas (e.g. on
521
+ * character sheet). It must contain `$1`, which is going to be
522
+ * replaced with the generated duration string, so additional
523
+ * information can be provided without duplicating concrete
524
+ * numeric values.
525
+ * @minLength 1
526
+ * @pattern \$1
527
+ */
528
+ compressed: string;
529
+ };
501
530
  };
502
531
  };
503
532
  };
@@ -651,7 +680,7 @@ export declare namespace Duration {
651
680
  /**
652
681
  * The (unitless) duration.
653
682
  * @integer
654
- * @minimum 2
683
+ * @minimum 1
655
684
  */
656
685
  value: number;
657
686
  /**
@@ -909,6 +938,7 @@ export declare namespace Duration {
909
938
  Weeks = "Weeks",
910
939
  Months = "Months",
911
940
  Years = "Years",
941
+ Centuries = "Centuries",
912
942
  CombatRounds = "CombatRounds"
913
943
  }
914
944
  type UnitValue = {
@@ -28,6 +28,7 @@ export var Duration;
28
28
  Unit["Weeks"] = "Weeks";
29
29
  Unit["Months"] = "Months";
30
30
  Unit["Years"] = "Years";
31
+ Unit["Centuries"] = "Centuries";
31
32
  Unit["CombatRounds"] = "CombatRounds";
32
33
  })(Unit = Duration.Unit || (Duration.Unit = {}));
33
34
  })(Duration || (Duration = {}));
@@ -144,6 +144,34 @@ declare type PerformanceParameters = {
144
144
  };
145
145
  };
146
146
  };
147
+ /**
148
+ * All translations for the entry, identified by IETF language tag (BCP47).
149
+ * @minProperties 1
150
+ */
151
+ translations?: {
152
+ /**
153
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
154
+ * @minProperties 1
155
+ */
156
+ [localeId: string]: {
157
+ /**
158
+ * The cost have to be per a specific countable entity, e.g. `8 AE
159
+ * per person`.
160
+ */
161
+ per?: {
162
+ /**
163
+ * The full countable entity name.
164
+ * @minLength 1
165
+ */
166
+ default: string;
167
+ /**
168
+ * The compressed countable entity name.
169
+ * @minLength 1
170
+ */
171
+ compressed: string;
172
+ };
173
+ };
174
+ };
147
175
  };
148
176
  };
149
177
  export declare const validateSchema: import("../../validation/schema.js").TypeValidator<ElvenMagicalSong>;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Errata } from "../source/_Erratum.js";
5
5
  import { PublicationRefs } from "../source/_PublicationRef.js";
6
- import { Effect, SlowPerformanceParameters, TargetCategory } from "../_ActivatableSkill.js";
6
+ import { CastingTime, Cost, Duration, Effect, Range, TargetCategory } from "../_ActivatableSkill.js";
7
7
  import { ImprovementCost } from "../_ImprovementCost.js";
8
8
  import { SkillCheck, SkillCheckPenalty } from "../_SkillCheck.js";
9
9
  /**
@@ -27,7 +27,7 @@ export declare type ZibiljaRitual = {
27
27
  /**
28
28
  * Measurable parameters of a zibilja ritual.
29
29
  */
30
- parameters: SlowPerformanceParameters;
30
+ parameters: PerformanceParameters;
31
31
  /**
32
32
  * The target category – the kind of creature or object – the skill affects.
33
33
  */
@@ -99,4 +99,11 @@ export declare type ZibiljaRitual = {
99
99
  };
100
100
  };
101
101
  };
102
+ declare type PerformanceParameters = {
103
+ casting_time: CastingTime.ModifiableCastingTime | CastingTime.SlowSkillCastingTime;
104
+ cost: Cost.OneTime.T;
105
+ range: Range.T;
106
+ duration: Duration.OneTime.T;
107
+ };
102
108
  export declare const validateSchema: import("../../validation/schema.js").TypeValidator<ZibiljaRitual>;
109
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.1.14",
3
+ "version": "0.1.17",
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",
@@ -105,12 +105,6 @@
105
105
  "type": "string",
106
106
  "minLength": 1
107
107
  },
108
- "casting_time": {
109
- "type": "string"
110
- },
111
- "cost": {
112
- "type": "string"
113
- },
114
108
  "range": {
115
109
  "type": "string"
116
110
  },
@@ -127,8 +121,6 @@
127
121
  "required": [
128
122
  "name",
129
123
  "effect",
130
- "casting_time",
131
- "cost",
132
124
  "range",
133
125
  "duration",
134
126
  "target"
@@ -831,7 +831,6 @@
831
831
  },
832
832
  "required": [
833
833
  "label",
834
- "sex",
835
834
  "names"
836
835
  ],
837
836
  "additionalProperties": false
@@ -284,6 +284,25 @@
284
284
  ]
285
285
  },
286
286
  "CastingTime": {
287
+ "ModifiableCastingTime": {
288
+ "type": "object",
289
+ "properties": {
290
+ "tag": {
291
+ "const": "Modifiable"
292
+ },
293
+ "initial_modification_level": {
294
+ "description": "The initial skill modification identifier/level.",
295
+ "type": "integer",
296
+ "maximum": 6,
297
+ "minimum": 1
298
+ }
299
+ },
300
+ "required": [
301
+ "tag",
302
+ "initial_modification_level"
303
+ ],
304
+ "additionalProperties": false
305
+ },
287
306
  "FastSkillCastingTime": {
288
307
  "type": "object",
289
308
  "properties": {
@@ -331,23 +350,7 @@
331
350
  "description": "The default casting time definition.",
332
351
  "oneOf": [
333
352
  {
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
353
+ "$ref": "#/definitions/CastingTime/ModifiableCastingTime"
351
354
  },
352
355
  {
353
356
  "$ref": "#/definitions/CastingTime/FastSkillCastingTime"
@@ -387,23 +390,7 @@
387
390
  "description": "The default casting time definition.",
388
391
  "oneOf": [
389
392
  {
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
393
+ "$ref": "#/definitions/CastingTime/ModifiableCastingTime"
407
394
  },
408
395
  {
409
396
  "$ref": "#/definitions/CastingTime/SlowSkillCastingTime"
@@ -870,7 +857,7 @@
870
857
  "type": "object",
871
858
  "properties": {
872
859
  "note": {
873
- "description": "A note, appended to the generated string in parenthesis.",
860
+ "description": "A note, appended to the generated string in parenthesis. If the\ngenerated is modified using `replacement`, the note is appended to\nthe modifier string.",
874
861
  "type": "object",
875
862
  "properties": {
876
863
  "default": {
@@ -888,11 +875,33 @@
888
875
  "default"
889
876
  ],
890
877
  "additionalProperties": false
878
+ },
879
+ "replacement": {
880
+ "description": "A replacement string. If `note` is provided, it is appended to the\nreplaced string.",
881
+ "type": "object",
882
+ "properties": {
883
+ "default": {
884
+ "description": "The full replacement string. It must contain `$1`, which is\ngoing to be replaced with the generated duration string, so\nadditional information can be provided without duplicating\nconcrete numeric values.",
885
+ "type": "string",
886
+ "minLength": 1,
887
+ "pattern": "\\$1"
888
+ },
889
+ "compressed": {
890
+ "description": "A compressed replacement string for use in small areas (e.g. on\ncharacter sheet). It must contain `$1`, which is going to be\nreplaced with the generated duration string, so additional\ninformation can be provided without duplicating concrete\nnumeric values.",
891
+ "type": "string",
892
+ "minLength": 1,
893
+ "pattern": "\\$1"
894
+ }
895
+ },
896
+ "required": [
897
+ "default",
898
+ "compressed"
899
+ ],
900
+ "additionalProperties": false
891
901
  }
892
902
  },
893
- "required": [
894
- "note"
895
- ],
903
+ "required": [],
904
+ "minProperties": 1,
896
905
  "additionalProperties": false
897
906
  }
898
907
  },
@@ -1162,7 +1171,7 @@
1162
1171
  "value": {
1163
1172
  "description": "The (unitless) duration.",
1164
1173
  "type": "integer",
1165
- "minimum": 2
1174
+ "minimum": 1
1166
1175
  },
1167
1176
  "unit": {
1168
1177
  "description": "The duration unit.",
@@ -1566,6 +1575,7 @@
1566
1575
  "Weeks",
1567
1576
  "Months",
1568
1577
  "Years",
1578
+ "Centuries",
1569
1579
  "CombatRounds"
1570
1580
  ]
1571
1581
  },
@@ -177,6 +177,43 @@
177
177
  "value"
178
178
  ],
179
179
  "additionalProperties": false
180
+ },
181
+ "translations": {
182
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
183
+ "type": "object",
184
+ "patternProperties": {
185
+ "^[a-z]{2}-[A-Z]{2}$": {
186
+ "type": "object",
187
+ "properties": {
188
+ "per": {
189
+ "description": "The cost have to be per a specific countable entity, e.g. `8 AE\nper person`.",
190
+ "type": "object",
191
+ "properties": {
192
+ "default": {
193
+ "description": "The full countable entity name.",
194
+ "type": "string",
195
+ "minLength": 1
196
+ },
197
+ "compressed": {
198
+ "description": "The compressed countable entity name.",
199
+ "type": "string",
200
+ "minLength": 1
201
+ }
202
+ },
203
+ "required": [
204
+ "default",
205
+ "compressed"
206
+ ],
207
+ "additionalProperties": false
208
+ }
209
+ },
210
+ "required": [],
211
+ "minProperties": 1,
212
+ "additionalProperties": false
213
+ }
214
+ },
215
+ "minProperties": 1,
216
+ "additionalProperties": false
180
217
  }
181
218
  },
182
219
  "required": [
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "parameters": {
24
24
  "description": "Measurable parameters of a zibilja ritual.",
25
- "$ref": "../_ActivatableSkill.schema.json#/definitions/SlowPerformanceParameters"
25
+ "$ref": "#/definitions/PerformanceParameters"
26
26
  },
27
27
  "target": {
28
28
  "description": "The target category – the kind of creature or object – the skill affects.",
@@ -154,6 +154,37 @@
154
154
  "translations"
155
155
  ],
156
156
  "additionalProperties": false
157
+ },
158
+ "PerformanceParameters": {
159
+ "type": "object",
160
+ "properties": {
161
+ "casting_time": {
162
+ "oneOf": [
163
+ {
164
+ "$ref": "../_ActivatableSkill.schema.json#/definitions/CastingTime/ModifiableCastingTime"
165
+ },
166
+ {
167
+ "$ref": "../_ActivatableSkill.schema.json#/definitions/CastingTime/SlowSkillCastingTime"
168
+ }
169
+ ]
170
+ },
171
+ "cost": {
172
+ "$ref": "../_ActivatableSkill.schema.json#/definitions/Cost/OneTime/T"
173
+ },
174
+ "range": {
175
+ "$ref": "../_ActivatableSkill.schema.json#/definitions/Range/T"
176
+ },
177
+ "duration": {
178
+ "$ref": "../_ActivatableSkill.schema.json#/definitions/Duration/OneTime/T"
179
+ }
180
+ },
181
+ "required": [
182
+ "casting_time",
183
+ "cost",
184
+ "range",
185
+ "duration"
186
+ ],
187
+ "additionalProperties": false
157
188
  }
158
189
  }
159
190
  }