optolith-database-schema 0.2.2 → 0.2.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.2.3](https://github.com/elyukai/optolith-database-schema/compare/v0.2.2...v0.2.3) (2022-03-29)
6
+
7
+
8
+ ### Features
9
+
10
+ * allow dis-/advantages to not contribute to maximum AP value ([9e401d0](https://github.com/elyukai/optolith-database-schema/commit/9e401d0be40797a5758220233af6c162d1ce76fb))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * state prerequisite should have unique tag ([7710fd5](https://github.com/elyukai/optolith-database-schema/commit/7710fd538582b85cd67cb81b2f791774102d17db))
16
+
5
17
  ### [0.2.2](https://github.com/elyukai/optolith-database-schema/compare/v0.2.1...v0.2.2) (2022-03-29)
6
18
 
7
19
 
@@ -16,7 +16,7 @@ export declare type Advantage = {
16
16
  skill_uses?: Activatable.SkillUses;
17
17
  maximum?: Activatable.Maximum;
18
18
  prerequisites?: AdvantageDisadvantagePrerequisites;
19
- ap_value: Activatable.AdventurePointsValue;
19
+ ap_value: Activatable.AdventurePointsValueAdvantagesDisadvantages;
20
20
  /**
21
21
  * Does this advantage not count towards the maximum of AP to be spent
22
22
  * on advantages?
@@ -14,7 +14,7 @@ export declare type Disadvantage = {
14
14
  select_options?: Activatable.SelectOptions;
15
15
  maximum?: Activatable.Maximum;
16
16
  prerequisites?: AdvantageDisadvantagePrerequisites;
17
- ap_value: Activatable.AdventurePointsValue;
17
+ ap_value: Activatable.AdventurePointsValueAdvantagesDisadvantages;
18
18
  /**
19
19
  * Does this disadvantage not count towards the maximum of AP to be granted by
20
20
  * disadvantages?
@@ -1814,25 +1814,49 @@ export declare type AdventurePointsValue = {
1814
1814
  */
1815
1815
  values: AdventurePointsSingleValue[];
1816
1816
  } | {
1817
- tag: "ByImprovementCost";
1818
1817
  /**
1819
- * An entry with a selection of skills may have different costs for
1820
- * different improvement costs of the selected skill.
1821
- *
1822
- * If the select options will not have entries with improvement cost A
1823
- * (combat techniques only), you may leave out A.
1824
- */
1825
- values: {
1826
- A?: AdventurePointsSingleValue;
1827
- B: AdventurePointsSingleValue;
1828
- C: AdventurePointsSingleValue;
1829
- D: AdventurePointsSingleValue;
1830
- };
1818
+ * Used if AP value is defined by the selected option(s) or special rules.
1819
+ */
1820
+ tag: "Indefinite";
1821
+ };
1822
+ export declare type AdventurePointsValueAdvantagesDisadvantages = {
1823
+ tag: "Fixed";
1824
+ /**
1825
+ * A fixed adventure points value. If the entry has levels, this is the cost
1826
+ * for each level as well.
1827
+ */
1828
+ value: AdventurePointsSingleValue;
1829
+ /**
1830
+ * The AP Value of the entry does not contribute to the AP maximum for
1831
+ * advantages or disadvantages, so it may also be bought if the maximum has
1832
+ * already been reached.
1833
+ */
1834
+ does_not_contribute_to_maximum?: true;
1835
+ } | {
1836
+ tag: "ByLevel";
1837
+ /**
1838
+ * An entry with levels may have different costs for each level. The length
1839
+ * of the list must match the amount of levels the special ability has.
1840
+ * @minItems 2
1841
+ */
1842
+ values: AdventurePointsSingleValue[];
1843
+ /**
1844
+ * The AP Value of the entry does not contribute to the AP maximum for
1845
+ * advantages or disadvantages, so it may also be bought if the maximum has
1846
+ * already been reached.
1847
+ */
1848
+ does_not_contribute_to_maximum?: true;
1831
1849
  } | {
1832
1850
  /**
1833
1851
  * Used if AP value is defined by the selected option(s) or special rules.
1834
1852
  */
1835
1853
  tag: "Indefinite";
1854
+ /**
1855
+ * The AP Value of the entry does not contribute to the AP maximum for
1856
+ * advantages or disadvantages, so it may also be bought if the maximum has
1857
+ * already been reached.
1858
+ */
1859
+ does_not_contribute_to_maximum?: true;
1836
1860
  };
1837
1861
  /**
1838
1862
  * A single adventure points value.
@@ -5,7 +5,7 @@ import { DisplayOption } from "../DisplayOption.js";
5
5
  * @title State Prerequisite
6
6
  */
7
7
  export declare type StatePrerequisite = {
8
- tag: "Culture";
8
+ tag: "State";
9
9
  id: OneOrManyNumericIdentifiers;
10
10
  display_option?: DisplayOption;
11
11
  };
@@ -3,7 +3,7 @@
3
3
  * background information – or the referenced entities were not made available
4
4
  * for use yet – e.g. races –, but which should be displayed, because it is part
5
5
  * of the prerequisite string from the sources.
6
- * @title Impossible Prerequisite
6
+ * @title Text Prerequisite
7
7
  */
8
8
  export declare type TextPrerequisite = {
9
9
  tag: "Text";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.2.2",
3
+ "version": "0.2.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",
@@ -29,7 +29,7 @@
29
29
  "$ref": "./_Prerequisite.schema.json#/definitions/AdvantageDisadvantagePrerequisites"
30
30
  },
31
31
  "ap_value": {
32
- "$ref": "./_Activatable.schema.json#/definitions/AdventurePointsValue"
32
+ "$ref": "./_Activatable.schema.json#/definitions/AdventurePointsValueAdvantagesDisadvantages"
33
33
  },
34
34
  "has_no_maximum_spent_influence": {
35
35
  "description": "Does this advantage not count towards the maximum of AP to be spent\non advantages?",
@@ -23,7 +23,7 @@
23
23
  "$ref": "./_Prerequisite.schema.json#/definitions/AdvantageDisadvantagePrerequisites"
24
24
  },
25
25
  "ap_value": {
26
- "$ref": "./_Activatable.schema.json#/definitions/AdventurePointsValue"
26
+ "$ref": "./_Activatable.schema.json#/definitions/AdventurePointsValueAdvantagesDisadvantages"
27
27
  },
28
28
  "has_no_maximum_spent_influence": {
29
29
  "description": "Does this disadvantage not count towards the maximum of AP to be granted by\ndisadvantages?",
@@ -3328,31 +3328,57 @@
3328
3328
  "type": "object",
3329
3329
  "properties": {
3330
3330
  "tag": {
3331
- "const": "ByImprovementCost"
3331
+ "description": "Used if AP value is defined by the selected option(s) or special rules.",
3332
+ "const": "Indefinite"
3333
+ }
3334
+ },
3335
+ "required": [
3336
+ "tag"
3337
+ ],
3338
+ "additionalProperties": false
3339
+ }
3340
+ ]
3341
+ },
3342
+ "AdventurePointsValueAdvantagesDisadvantages": {
3343
+ "oneOf": [
3344
+ {
3345
+ "type": "object",
3346
+ "properties": {
3347
+ "tag": {
3348
+ "const": "Fixed"
3349
+ },
3350
+ "value": {
3351
+ "description": "A fixed adventure points value. If the entry has levels, this is the cost\nfor each level as well.",
3352
+ "$ref": "#/definitions/AdventurePointsSingleValue"
3353
+ },
3354
+ "does_not_contribute_to_maximum": {
3355
+ "description": "The AP Value of the entry does not contribute to the AP maximum for\nadvantages or disadvantages, so it may also be bought if the maximum has\nalready been reached.",
3356
+ "const": true
3357
+ }
3358
+ },
3359
+ "required": [
3360
+ "tag",
3361
+ "value"
3362
+ ],
3363
+ "additionalProperties": false
3364
+ },
3365
+ {
3366
+ "type": "object",
3367
+ "properties": {
3368
+ "tag": {
3369
+ "const": "ByLevel"
3332
3370
  },
3333
3371
  "values": {
3334
- "description": "An entry with a selection of skills may have different costs for\ndifferent improvement costs of the selected skill.\n\nIf the select options will not have entries with improvement cost A\n(combat techniques only), you may leave out A.",
3335
- "type": "object",
3336
- "properties": {
3337
- "A": {
3338
- "$ref": "#/definitions/AdventurePointsSingleValue"
3339
- },
3340
- "B": {
3341
- "$ref": "#/definitions/AdventurePointsSingleValue"
3342
- },
3343
- "C": {
3344
- "$ref": "#/definitions/AdventurePointsSingleValue"
3345
- },
3346
- "D": {
3347
- "$ref": "#/definitions/AdventurePointsSingleValue"
3348
- }
3372
+ "description": "An entry with levels may have different costs for each level. The length\nof the list must match the amount of levels the special ability has.",
3373
+ "type": "array",
3374
+ "items": {
3375
+ "$ref": "#/definitions/AdventurePointsSingleValue"
3349
3376
  },
3350
- "required": [
3351
- "B",
3352
- "C",
3353
- "D"
3354
- ],
3355
- "additionalProperties": false
3377
+ "minItems": 2
3378
+ },
3379
+ "does_not_contribute_to_maximum": {
3380
+ "description": "The AP Value of the entry does not contribute to the AP maximum for\nadvantages or disadvantages, so it may also be bought if the maximum has\nalready been reached.",
3381
+ "const": true
3356
3382
  }
3357
3383
  },
3358
3384
  "required": [
@@ -3367,6 +3393,10 @@
3367
3393
  "tag": {
3368
3394
  "description": "Used if AP value is defined by the selected option(s) or special rules.",
3369
3395
  "const": "Indefinite"
3396
+ },
3397
+ "does_not_contribute_to_maximum": {
3398
+ "description": "The AP Value of the entry does not contribute to the AP maximum for\nadvantages or disadvantages, so it may also be bought if the maximum has\nalready been reached.",
3399
+ "const": true
3370
3400
  }
3371
3401
  },
3372
3402
  "required": [
@@ -8,7 +8,7 @@
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "tag": {
11
- "const": "Culture"
11
+ "const": "State"
12
12
  },
13
13
  "id": {
14
14
  "$ref": "../../_Identifier.schema.json#/definitions/OneOrManyNumericIdentifiers"
@@ -3,7 +3,7 @@
3
3
  "$id": "/prerequisites/single/TextPrerequisite.schema.json",
4
4
  "definitions": {
5
5
  "TextPrerequisite": {
6
- "title": "Impossible Prerequisite",
6
+ "title": "Text Prerequisite",
7
7
  "description": "A prerequisite that is either not verifyable in general – e.g. roleplay or\nbackground information – or the referenced entities were not made available\nfor use yet – e.g. races –, but which should be displayed, because it is part\nof the prerequisite string from the sources.",
8
8
  "type": "object",
9
9
  "properties": {