optolith-database-schema 0.5.3 → 0.5.4

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,14 @@
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.5.4](https://github.com/elyukai/optolith-database-schema/compare/v0.5.3...v0.5.4) (2022-12-03)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * elective spellwork restriction structure ([3ceb624](https://github.com/elyukai/optolith-database-schema/commit/3ceb6244ec433bb60fe292dde32d99ac93edccb2))
11
+ * grouped common profession for cultures ([df66943](https://github.com/elyukai/optolith-database-schema/commit/df66943aadfd297d773dda7d4a0a65c8b79095ce))
12
+
5
13
  ### [0.5.3](https://github.com/elyukai/optolith-database-schema/compare/v0.5.2...v0.5.3) (2022-12-03)
6
14
 
7
15
 
@@ -4,7 +4,7 @@
4
4
  import { Errata } from "./source/_Erratum.js";
5
5
  import { PublicationRefs } from "./source/_PublicationRef.js";
6
6
  import { CommonnessRatedAdvantageDisadvantage } from "./_CommonnessRatedAdvantageDisadvantage.js";
7
- import { AdvantageIdentifier, DisadvantageIdentifier, MagicalTraditionIdentifier, ProfessionIdentifier, SkillIdentifier } from "./_Identifier.js";
7
+ import { AdvantageIdentifier, BlessedTraditionIdentifier, DisadvantageIdentifier, MagicalTraditionIdentifier, ProfessionIdentifier, SkillIdentifier } from "./_Identifier.js";
8
8
  import { LocaleMap } from "./_LocaleMap.js";
9
9
  import { NonEmptyString } from "./_NonEmptyString.js";
10
10
  import { BinarySex } from "./_Sex.js";
@@ -183,7 +183,7 @@ export declare enum MundaneProfessionSubgroupConstraint {
183
183
  Fighter = "Fighter",
184
184
  Religious = "Religious"
185
185
  }
186
- export declare type TraditionConstraint = {
186
+ export declare type MagicalTraditionConstraint = {
187
187
  /**
188
188
  * The magical tradition's identifier.
189
189
  */
@@ -198,16 +198,31 @@ export declare type TraditionConstraint = {
198
198
  */
199
199
  rarity?: Rarity;
200
200
  };
201
+ export declare type BlessedTraditionConstraint = {
202
+ /**
203
+ * The magical tradition's identifier.
204
+ */
205
+ id: BlessedTraditionIdentifier;
206
+ /**
207
+ * Some professions are more common than others. There may be cultures
208
+ * where some professions are not represented at all.
209
+ */
210
+ weighted_professions?: Weighted<ProfessionReference>;
211
+ /**
212
+ * Some traditions may be found in a culture, but are not that common.
213
+ */
214
+ rarity?: Rarity;
215
+ };
201
216
  export declare type MundaneCommonProfessionConstraint = {
202
217
  tag: "Profession";
203
218
  profession: ProfessionConstraint;
204
219
  } | {
205
220
  tag: "ProfessionSubgroup";
206
- profession_subgroup: ProfessionConstraint;
221
+ profession_subgroup: MundaneProfessionSubgroupConstraint;
207
222
  };
208
223
  export declare type MagicCommonProfessionConstraint = {
209
224
  tag: "Tradition";
210
- tradition: TraditionConstraint;
225
+ tradition: MagicalTraditionConstraint;
211
226
  } | {
212
227
  tag: "MagicDilettante";
213
228
  magic_dilettante: {};
@@ -217,12 +232,12 @@ export declare type MagicCommonProfessionConstraint = {
217
232
  };
218
233
  export declare type BlessedCommonProfessionConstraint = {
219
234
  tag: "Tradition";
220
- tradition: TraditionConstraint;
235
+ tradition: BlessedTraditionConstraint;
221
236
  };
222
237
  export declare type PlainCommonProfessions = CommonProfessionConstraints<ProfessionReference>;
223
238
  /**
224
239
  * Lists of professions by group.
225
- * @minProperties 2
240
+ * @minProperties 1
226
241
  */
227
242
  export declare type GroupedCommonProfessions = {
228
243
  mundane?: CommonProfessionConstraints<MundaneCommonProfessionConstraint>;
@@ -84,12 +84,9 @@ export declare type ElectiveSpellwork = {
84
84
  */
85
85
  export declare type ElectiveSpellworkRestriction = {
86
86
  tag: "Element";
87
- /**
88
- * The element's identifier.
89
- * @integer
90
- * @minimum 1
91
- * @maximum 6
92
- */
87
+ element: ElectiveSpellworkElementRestriction;
88
+ };
89
+ export declare type ElectiveSpellworkElementRestriction = {
93
90
  id: ElementIdentifier;
94
91
  };
95
92
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
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",
@@ -255,7 +255,7 @@
255
255
  "Religious"
256
256
  ]
257
257
  },
258
- "TraditionConstraint": {
258
+ "MagicalTraditionConstraint": {
259
259
  "type": "object",
260
260
  "properties": {
261
261
  "id": {
@@ -295,6 +295,46 @@
295
295
  ],
296
296
  "additionalProperties": false
297
297
  },
298
+ "BlessedTraditionConstraint": {
299
+ "type": "object",
300
+ "properties": {
301
+ "id": {
302
+ "description": "The magical tradition's identifier.",
303
+ "$ref": "./_Identifier.schema.json#/$defs/BlessedTraditionIdentifier"
304
+ },
305
+ "weighted_professions": {
306
+ "description": "Some professions or profession variants are more common than others. There\nmay be cultures where some professions or profession variants are not\nrepresented at all.",
307
+ "type": "object",
308
+ "properties": {
309
+ "elements": {
310
+ "description": "The list of more common professions or profession variants.",
311
+ "type": "array",
312
+ "items": {
313
+ "$ref": "./_SimpleReferences.schema.json#/$defs/ProfessionReference"
314
+ },
315
+ "minItems": 1
316
+ },
317
+ "weight": {
318
+ "description": "The \"weight\" difference compared to other professions or profession\nvariants. Some professions or profession variants are simply more common\n(Mostly), but sometimes only specific elements are used (Only).",
319
+ "$ref": "#/$defs/Weight"
320
+ }
321
+ },
322
+ "required": [
323
+ "elements",
324
+ "weight"
325
+ ],
326
+ "additionalProperties": false
327
+ },
328
+ "rarity": {
329
+ "description": "Some traditions may be found in a culture, but are not that common.",
330
+ "$ref": "#/$defs/Rarity"
331
+ }
332
+ },
333
+ "required": [
334
+ "id"
335
+ ],
336
+ "additionalProperties": false
337
+ },
298
338
  "MundaneCommonProfessionConstraint": {
299
339
  "oneOf": [
300
340
  {
@@ -320,7 +360,7 @@
320
360
  "const": "ProfessionSubgroup"
321
361
  },
322
362
  "profession_subgroup": {
323
- "$ref": "#/$defs/ProfessionConstraint"
363
+ "$ref": "#/$defs/MundaneProfessionSubgroupConstraint"
324
364
  }
325
365
  },
326
366
  "required": [
@@ -340,7 +380,7 @@
340
380
  "const": "Tradition"
341
381
  },
342
382
  "tradition": {
343
- "$ref": "#/$defs/TraditionConstraint"
383
+ "$ref": "#/$defs/MagicalTraditionConstraint"
344
384
  }
345
385
  },
346
386
  "required": [
@@ -395,7 +435,7 @@
395
435
  "const": "Tradition"
396
436
  },
397
437
  "tradition": {
398
- "$ref": "#/$defs/TraditionConstraint"
438
+ "$ref": "#/$defs/BlessedTraditionConstraint"
399
439
  }
400
440
  },
401
441
  "required": [
@@ -504,7 +544,7 @@
504
544
  }
505
545
  },
506
546
  "required": [],
507
- "minProperties": 2,
547
+ "minProperties": 1,
508
548
  "additionalProperties": false
509
549
  },
510
550
  "CommonProfessions": {
@@ -143,18 +143,33 @@
143
143
  },
144
144
  "ElectiveSpellworkRestriction": {
145
145
  "description": "The elective spellwork may only take effect if a certain condition is met.\nThe condition may be related to professions or profession variants, but it is\ndesigned so that it can work without a specific profession, as multiple may\nbelong to an institute, but with referencing other entities instead.",
146
+ "oneOf": [
147
+ {
148
+ "type": "object",
149
+ "properties": {
150
+ "tag": {
151
+ "const": "Element"
152
+ },
153
+ "element": {
154
+ "$ref": "#/$defs/ElectiveSpellworkElementRestriction"
155
+ }
156
+ },
157
+ "required": [
158
+ "tag",
159
+ "element"
160
+ ],
161
+ "additionalProperties": false
162
+ }
163
+ ]
164
+ },
165
+ "ElectiveSpellworkElementRestriction": {
146
166
  "type": "object",
147
167
  "properties": {
148
- "tag": {
149
- "const": "Element"
150
- },
151
168
  "id": {
152
- "description": "The element's identifier.",
153
169
  "$ref": "./_Identifier.schema.json#/$defs/ElementIdentifier"
154
170
  }
155
171
  },
156
172
  "required": [
157
- "tag",
158
173
  "id"
159
174
  ],
160
175
  "additionalProperties": false