optolith-database-schema 0.1.28 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
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.2.2](https://github.com/elyukai/optolith-database-schema/compare/v0.2.1...v0.2.2) (2022-03-29)
6
+
7
+
8
+ ### Features
9
+
10
+ * add offset option for deriving AP value from improvement cost ([f556207](https://github.com/elyukai/optolith-database-schema/commit/f55620751b7a68383c74ba8c4256d11802ab99c7))
11
+
12
+ ### [0.2.1](https://github.com/elyukai/optolith-database-schema/compare/v0.2.0...v0.2.1) (2022-03-29)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * category names and prerequisites should be defined separately ([eb312fe](https://github.com/elyukai/optolith-database-schema/commit/eb312fe2fc9973ef6be36937ebd8af8c8bf30e60))
18
+
19
+ ## [0.2.0](https://github.com/elyukai/optolith-database-schema/compare/v0.1.28...v0.2.0) (2022-03-29)
20
+
21
+
22
+ ### ⚠ BREAKING CHANGES
23
+
24
+ * derived select options are not a list anymore
25
+
26
+ * derived select options are not a list anymore ([fa64a60](https://github.com/elyukai/optolith-database-schema/commit/fa64a60670f0cdf5567a168f3a4eccd7ea71d367))
27
+
5
28
  ### [0.1.28](https://github.com/elyukai/optolith-database-schema/compare/v0.1.27...v0.1.28) (2022-03-25)
6
29
 
7
30
 
@@ -6,7 +6,7 @@ import { DisplayOption } from "./prerequisites/DisplayOption.js";
6
6
  import { Errata } from "./source/_Erratum.js";
7
7
  import { PublicationRefs } from "./source/_PublicationRef.js";
8
8
  import { Duration } from "./_ActivatableSkill.js";
9
- import { ActivatableIdentifier, AdvancedSpecialAbilityRestrictedOptionIdentifier, CombatRelatedSpecialAbilityIdentifier, CombatTechniqueIdentifier, MagicalTraditionIdentifier, PatronIdentifier, VolumePointsOptionReferenceIdentifier } from "./_Identifier.js";
9
+ import { ActivatableIdentifier, AdvancedSpecialAbilityRestrictedOptionIdentifier, CombatRelatedSpecialAbilityIdentifier, CombatTechniqueIdentifier, MagicalTraditionIdentifier, PatronIdentifier, SkillIdentifier, VolumePointsOptionReferenceIdentifier } from "./_Identifier.js";
10
10
  import { GeneralPrerequisites } from "./_Prerequisite.js";
11
11
  /**
12
12
  * The activatable entry's identifier. An unique, increasing integer.
@@ -62,13 +62,13 @@ export declare type Maximum = number;
62
62
  */
63
63
  export declare type SelectOptions = {
64
64
  /**
65
- * A list of categories with optional further configuration. All available
65
+ * An entry category with optional further configuration. All available
66
66
  * entries from the specified categories will be included as separate select
67
67
  * options. You can also specify a set of groups that should only be
68
68
  * included. Groups not mentioned will be excluded then.
69
69
  * @minItems 1
70
70
  */
71
- derived?: CategoryOption[];
71
+ derived?: CategoryOption;
72
72
  /**
73
73
  * A list of explicit select options. If the identifier has a specific type,
74
74
  * its entry is the base of this select option, where values defined here
@@ -204,159 +204,213 @@ declare type CategoryOption = {
204
204
  } | {
205
205
  tag: "Skills";
206
206
  /**
207
- * Only include entries of the specified groups.
207
+ * A list of skill categories.
208
208
  * @minItems 1
209
209
  */
210
- groups?: {
210
+ categories: ({
211
+ tag: "Skills";
211
212
  /**
212
- * The skill group's identifier.
213
- * @integer
214
- * @minimum 1
215
- * @maximum 5
213
+ * Only include entries of the specified groups.
214
+ * @minItems 1
216
215
  */
217
- id: number;
218
- }[];
219
- /**
220
- * Only include (`Intersection`) or exclude (`Difference`) specific skills.
221
- */
222
- specific?: {
223
- operation: {
224
- tag: "Intersection";
225
- } | {
226
- tag: "Difference";
216
+ groups?: {
217
+ /**
218
+ * The skill group's identifier.
219
+ * @integer
220
+ * @minimum 1
221
+ * @maximum 5
222
+ */
223
+ id: number;
224
+ }[];
225
+ /**
226
+ * Only include (`Intersection`) or exclude (`Difference`) specific
227
+ * skills.
228
+ */
229
+ specific?: {
230
+ operation: {
231
+ tag: "Intersection";
232
+ } | {
233
+ tag: "Difference";
234
+ };
235
+ /**
236
+ * The list of specific skills.
237
+ * @minItems 1
238
+ * @uniqueItems
239
+ */
240
+ list: {
241
+ /**
242
+ * The skill's identifier.
243
+ * @integer
244
+ * @minimum 1
245
+ * @maximum 59
246
+ */
247
+ id: number;
248
+ }[];
227
249
  };
228
250
  /**
229
- * The list of specific skills.
251
+ * Registers new applications, which get enabled once this entry is
252
+ * activated with its respective select option. It specifies an
253
+ * entry-unique identifier, the skill it belongs to is derived from the
254
+ * select option automatically. A translation can be left out if its
255
+ * name equals the name of the origin entry.
230
256
  * @minItems 1
231
- * @uniqueItems
232
257
  */
233
- list: {
258
+ skill_applications?: {
234
259
  /**
235
- * The skill's identifier.
260
+ * The application's identifier. An entry-unique, increasing integer.
236
261
  * @integer
237
262
  * @minimum 1
238
- * @maximum 59
239
263
  */
240
264
  id: number;
265
+ /**
266
+ * All translations for the entry, identified by IETF language tag
267
+ * (BCP47).
268
+ * @minProperties 1
269
+ */
270
+ translations?: {
271
+ /**
272
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
273
+ */
274
+ [localeId: string]: {
275
+ /**
276
+ * The name of the application if different from the activatable
277
+ * entry's
278
+ * name.
279
+ * @minLength 1
280
+ */
281
+ name: string;
282
+ };
283
+ };
241
284
  }[];
242
- };
243
- /**
244
- * Registers new applications, which get enabled once this entry is
245
- * activated with its respective select option. It specifies an entry-unique
246
- * identifier, the skill it belongs to is derived from the select option
247
- * automatically. A translation can be left out if its name equals the name
248
- * of the origin entry.
249
- * @minItems 1
250
- */
251
- skill_applications?: {
252
285
  /**
253
- * The application's identifier. An entry-unique, increasing integer.
254
- * @integer
255
- * @minimum 1
256
- */
257
- id: number;
258
- /**
259
- * All translations for the entry, identified by IETF language tag (BCP47).
260
- * @minProperties 1
286
+ * Registers uses, which get enabled once this entry is activated with
287
+ * its respective select option. It specifies an entry-unique
288
+ * identifier, the skill it belongs to is derived from the select option
289
+ * automatically. A translation can be left out if its name equals the
290
+ * name of the origin entry.
291
+ * @minItems 1
261
292
  */
262
- translations?: {
293
+ skill_uses?: {
263
294
  /**
264
- * @patternProperties ^[a-z]{2}-[A-Z]{2}$
295
+ * The use's identifier. An entry-unique, increasing integer.
296
+ * @integer
297
+ * @minimum 1
265
298
  */
266
- [localeId: string]: {
299
+ id: number;
300
+ /**
301
+ * All translations for the entry, identified by IETF language tag
302
+ * (BCP47).
303
+ * @minProperties 1
304
+ */
305
+ translations?: {
267
306
  /**
268
- * The name of the application if different from the activatable entry's
269
- * name.
270
- * @minLength 1
307
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
271
308
  */
272
- name: string;
309
+ [localeId: string]: {
310
+ /**
311
+ * The name of the use if different from the activatable entry's
312
+ * name.
313
+ * @minLength 1
314
+ */
315
+ name: string;
316
+ };
273
317
  };
274
- };
275
- }[];
276
- /**
277
- * Registers uses, which get enabled once this entry is activated with its
278
- * respective select option. It specifies an entry-unique identifier, the
279
- * skill it belongs to is derived from the select option automatically. A
280
- * translation can be left out if its name equals the name of the origin
281
- * entry.
282
- * @minItems 1
283
- */
284
- skill_uses?: {
318
+ }[];
285
319
  /**
286
- * The use's identifier. An entry-unique, increasing integer.
287
- * @integer
288
- * @minimum 1
320
+ * Generate prerequisites for each entry of the category.
321
+ * @minItems 1
289
322
  */
290
- id: number;
323
+ prerequisites?: (OptionSkillSelfPrerequisite | OptionOptionPrerequisite)[];
324
+ } | {
325
+ tag: SkillWithEnhancementsCategory;
291
326
  /**
292
- * All translations for the entry, identified by IETF language tag (BCP47).
293
- * @minProperties 1
327
+ * Only include (`Intersection`) or exclude (`Difference`) specific
328
+ * entries.
294
329
  */
295
- translations?: {
330
+ specific?: {
331
+ operation: {
332
+ tag: "Intersection";
333
+ } | {
334
+ tag: "Difference";
335
+ };
296
336
  /**
297
- * @patternProperties ^[a-z]{2}-[A-Z]{2}$
337
+ * The list of specific entries.
338
+ * @minItems 1
339
+ * @uniqueItems
298
340
  */
299
- [localeId: string]: {
341
+ list: {
300
342
  /**
301
- * The name of the use if different from the activatable entry's name.
302
- * @minLength 1
343
+ * The entry's identifier.
344
+ * @integer
345
+ * @minimum 1
346
+ * @maximum 59
303
347
  */
304
- name: string;
305
- };
348
+ id: number;
349
+ }[];
306
350
  };
307
- }[];
308
- /**
309
- * Generate prerequisites for each entry of the category.
310
- * @minItems 1
311
- */
312
- prerequisites?: (OptionSkillSelfPrerequisite | OptionOptionPrerequisite)[];
351
+ /**
352
+ * Generate prerequisites for each entry of the category.
353
+ * @minItems 1
354
+ */
355
+ prerequisites?: (OptionSkillSelfPrerequisite | OptionOptionPrerequisite)[];
356
+ })[];
313
357
  /**
314
358
  * Generate AP values for each entry.
315
359
  */
316
- ap_value?: OptionSkillDeriveAdventurePointsValue;
360
+ ap_value?: OptionSkillDeriveAdventurePointsValue<SkillIdentifier>;
317
361
  } | {
318
- tag: NonSkillSkillCategory;
362
+ tag: "CombatTechniques";
319
363
  /**
320
- * Only include (`Intersection`) or exclude (`Difference`) specific entries.
364
+ * A list of combat technique categories.
365
+ * @minItems 1
321
366
  */
322
- specific?: {
323
- operation: {
324
- tag: "Intersection";
325
- } | {
326
- tag: "Difference";
327
- };
367
+ categories: {
368
+ tag: CombatTechniqueCategory;
328
369
  /**
329
- * The list of specific entries.
330
- * @minItems 1
331
- * @uniqueItems
370
+ * Only include (`Intersection`) or exclude (`Difference`) specific
371
+ * entries.
332
372
  */
333
- list: {
373
+ specific?: {
374
+ operation: {
375
+ tag: "Intersection";
376
+ } | {
377
+ tag: "Difference";
378
+ };
334
379
  /**
335
- * The entry's identifier.
336
- * @integer
337
- * @minimum 1
338
- * @maximum 59
380
+ * The list of specific entries.
381
+ * @minItems 1
382
+ * @uniqueItems
339
383
  */
340
- id: number;
341
- }[];
342
- };
343
- /**
344
- * Generate prerequisites for each entry of the category.
345
- * @minItems 1
346
- */
347
- prerequisites?: (OptionSkillSelfPrerequisite | OptionOptionPrerequisite)[];
384
+ list: {
385
+ /**
386
+ * The entry's identifier.
387
+ * @integer
388
+ * @minimum 1
389
+ * @maximum 59
390
+ */
391
+ id: number;
392
+ }[];
393
+ };
394
+ /**
395
+ * Generate prerequisites for each entry of the category.
396
+ * @minItems 1
397
+ */
398
+ prerequisites?: (OptionSkillSelfPrerequisite | OptionOptionPrerequisite)[];
399
+ }[];
348
400
  /**
349
401
  * Generate AP values for each entry.
350
402
  */
351
- ap_value?: OptionSkillDeriveAdventurePointsValue;
403
+ ap_value?: OptionSkillDeriveAdventurePointsValue<CombatTechniqueIdentifier>;
352
404
  };
353
- declare enum NonSkillSkillCategory {
354
- CloseCombatTechniques = "CloseCombatTechniques",
355
- RangedCombatTechniques = "RangedCombatTechniques",
356
- LiturgicalChants = "LiturgicalChants",
357
- Ceremonies = "Ceremonies",
405
+ declare enum SkillWithEnhancementsCategory {
358
406
  Spells = "Spells",
359
- Rituals = "Rituals"
407
+ Rituals = "Rituals",
408
+ LiturgicalChants = "LiturgicalChants",
409
+ Ceremonies = "Ceremonies"
410
+ }
411
+ declare enum CombatTechniqueCategory {
412
+ CloseCombatTechniques = "CloseCombatTechniques",
413
+ RangedCombatTechniques = "RangedCombatTechniques"
360
414
  }
361
415
  declare type OptionSkillSelfPrerequisite = {
362
416
  tag: "Self";
@@ -390,15 +444,28 @@ declare type OptionOptionPrerequisite = {
390
444
  /**
391
445
  * Generate AP values for each entry.
392
446
  */
393
- declare type OptionSkillDeriveAdventurePointsValue = {
447
+ declare type OptionSkillDeriveAdventurePointsValue<Identifier> = {
448
+ /**
449
+ * Derive the cost from the improvement cost of each entry.
450
+ *
451
+ * AP Value = Improvement Cost × `multiplier` + `offset`
452
+ */
394
453
  tag: "DerivedFromImprovementCost";
395
454
  /**
396
455
  * This number is multiplied with the improvement cost of the entry
397
456
  * (A = 1 to D = 4).
398
457
  * @integer
399
458
  * @minimum 2
459
+ * @default 1
400
460
  */
401
461
  multiplier?: number;
462
+ /**
463
+ * This number is added to the maybe multiplied improvement cost of the
464
+ * entry.
465
+ * @integer
466
+ * @default 0
467
+ */
468
+ offset?: number;
402
469
  } | {
403
470
  tag: "Fixed";
404
471
  /**
@@ -410,7 +477,7 @@ declare type OptionSkillDeriveAdventurePointsValue = {
410
477
  * @integer
411
478
  * @minimum 1
412
479
  */
413
- id: number;
480
+ id: Identifier;
414
481
  /**
415
482
  * The AP value for the specified entry.
416
483
  * @integer
@@ -2,15 +2,18 @@
2
2
  * General type specifications used by multiple activatable entries.
3
3
  * @title Activatable
4
4
  */
5
- var NonSkillSkillCategory;
6
- (function (NonSkillSkillCategory) {
7
- NonSkillSkillCategory["CloseCombatTechniques"] = "CloseCombatTechniques";
8
- NonSkillSkillCategory["RangedCombatTechniques"] = "RangedCombatTechniques";
9
- NonSkillSkillCategory["LiturgicalChants"] = "LiturgicalChants";
10
- NonSkillSkillCategory["Ceremonies"] = "Ceremonies";
11
- NonSkillSkillCategory["Spells"] = "Spells";
12
- NonSkillSkillCategory["Rituals"] = "Rituals";
13
- })(NonSkillSkillCategory || (NonSkillSkillCategory = {}));
5
+ var SkillWithEnhancementsCategory;
6
+ (function (SkillWithEnhancementsCategory) {
7
+ SkillWithEnhancementsCategory["Spells"] = "Spells";
8
+ SkillWithEnhancementsCategory["Rituals"] = "Rituals";
9
+ SkillWithEnhancementsCategory["LiturgicalChants"] = "LiturgicalChants";
10
+ SkillWithEnhancementsCategory["Ceremonies"] = "Ceremonies";
11
+ })(SkillWithEnhancementsCategory || (SkillWithEnhancementsCategory = {}));
12
+ var CombatTechniqueCategory;
13
+ (function (CombatTechniqueCategory) {
14
+ CombatTechniqueCategory["CloseCombatTechniques"] = "CloseCombatTechniques";
15
+ CombatTechniqueCategory["RangedCombatTechniques"] = "RangedCombatTechniques";
16
+ })(CombatTechniqueCategory || (CombatTechniqueCategory = {}));
14
17
  export {};
15
18
  // "Input": {
16
19
  // "description": "A string that is used as a placeholder text for an input field.",
@@ -108,6 +108,13 @@ declare enum RatedTag {
108
108
  LiturgicalChant = "LiturgicalChant",
109
109
  Ceremony = "Ceremony"
110
110
  }
111
+ declare enum SkillTag {
112
+ Skill = "Skill",
113
+ Spell = "Spell",
114
+ Ritual = "Ritual",
115
+ LiturgicalChant = "LiturgicalChant",
116
+ Ceremony = "Ceremony"
117
+ }
111
118
  declare enum AdvancedSpecialAbilityRestrictedOptionTag {
112
119
  General = "General",
113
120
  Skill = "Skill",
@@ -183,6 +190,7 @@ export declare type ActivatableIdentifier = TaggedIdentifier<ActivatableTag>;
183
190
  export declare type SpecialAbilityIdentifier = TaggedIdentifier<SpecialAbilityTag>;
184
191
  export declare type CombatRelatedSpecialAbilityIdentifier = TaggedIdentifier<CombatRelatedSpecialAbilityTag>;
185
192
  export declare type RatedIdentifier = TaggedIdentifier<RatedTag>;
193
+ export declare type SkillIdentifier = TaggedIdentifier<SkillTag>;
186
194
  export declare type AdvancedSpecialAbilityRestrictedOptionIdentifier = TaggedIdentifier<AdvancedSpecialAbilityRestrictedOptionTag>;
187
195
  export declare type VolumePointsOptionReferenceIdentifier = TaggedIdentifier<VolumePointsOptionReferenceTag>;
188
196
  export declare type CombatTechniqueIdentifier = TaggedIdentifier<CombatTechniqueTag>;
@@ -112,6 +112,14 @@ var RatedTag;
112
112
  RatedTag["LiturgicalChant"] = "LiturgicalChant";
113
113
  RatedTag["Ceremony"] = "Ceremony";
114
114
  })(RatedTag || (RatedTag = {}));
115
+ var SkillTag;
116
+ (function (SkillTag) {
117
+ SkillTag["Skill"] = "Skill";
118
+ SkillTag["Spell"] = "Spell";
119
+ SkillTag["Ritual"] = "Ritual";
120
+ SkillTag["LiturgicalChant"] = "LiturgicalChant";
121
+ SkillTag["Ceremony"] = "Ceremony";
122
+ })(SkillTag || (SkillTag = {}));
115
123
  var AdvancedSpecialAbilityRestrictedOptionTag;
116
124
  (function (AdvancedSpecialAbilityRestrictedOptionTag) {
117
125
  AdvancedSpecialAbilityRestrictedOptionTag["General"] = "General";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.1.28",
3
+ "version": "0.2.2",
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",