optolith-database-schema 0.0.1

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.
Files changed (169) hide show
  1. package/AUTHORS +1 -0
  2. package/CHANGELOG.md +27 -0
  3. package/CODEOWNERS +1 -0
  4. package/LICENSE +378 -0
  5. package/README.md +17 -0
  6. package/lib/main.d.ts +1 -0
  7. package/lib/main.js +1 -0
  8. package/lib/types/ArcaneBardTradition.d.ts +32 -0
  9. package/lib/types/ArcaneBardTradition.js +4 -0
  10. package/lib/types/ArcaneDancerTradition.d.ts +32 -0
  11. package/lib/types/ArcaneDancerTradition.js +4 -0
  12. package/lib/types/Aspect.d.ts +36 -0
  13. package/lib/types/Aspect.js +4 -0
  14. package/lib/types/Attribute.d.ts +42 -0
  15. package/lib/types/Attribute.js +5 -0
  16. package/lib/types/CombatTechnique_Close.d.ts +80 -0
  17. package/lib/types/CombatTechnique_Close.js +4 -0
  18. package/lib/types/CombatTechnique_Ranged.d.ts +62 -0
  19. package/lib/types/CombatTechnique_Ranged.js +4 -0
  20. package/lib/types/Condition.d.ts +51 -0
  21. package/lib/types/Condition.js +4 -0
  22. package/lib/types/Culture.d.ts +494 -0
  23. package/lib/types/Culture.js +4 -0
  24. package/lib/types/DerivedCharacteristic.d.ts +65 -0
  25. package/lib/types/DerivedCharacteristic.js +4 -0
  26. package/lib/types/Element.d.ts +30 -0
  27. package/lib/types/Element.js +4 -0
  28. package/lib/types/ExperienceLevel.d.ts +68 -0
  29. package/lib/types/ExperienceLevel.js +4 -0
  30. package/lib/types/EyeColor.d.ts +30 -0
  31. package/lib/types/EyeColor.js +4 -0
  32. package/lib/types/HairColor.d.ts +30 -0
  33. package/lib/types/HairColor.js +4 -0
  34. package/lib/types/Lessons_Curriculum.d.ts +297 -0
  35. package/lib/types/Lessons_Curriculum.js +4 -0
  36. package/lib/types/Lessons_Guideline.d.ts +36 -0
  37. package/lib/types/Lessons_Guideline.js +4 -0
  38. package/lib/types/Locale.d.ts +38 -0
  39. package/lib/types/Locale.js +4 -0
  40. package/lib/types/MetaCondition.d.ts +54 -0
  41. package/lib/types/MetaCondition.js +4 -0
  42. package/lib/types/Property.d.ts +36 -0
  43. package/lib/types/Property.js +4 -0
  44. package/lib/types/Race.d.ts +524 -0
  45. package/lib/types/Race.js +13 -0
  46. package/lib/types/Region.d.ts +30 -0
  47. package/lib/types/Region.js +4 -0
  48. package/lib/types/Service.d.ts +40 -0
  49. package/lib/types/Service.js +4 -0
  50. package/lib/types/SexPractice.d.ts +53 -0
  51. package/lib/types/SexPractice.js +4 -0
  52. package/lib/types/Skill.d.ts +169 -0
  53. package/lib/types/Skill.js +4 -0
  54. package/lib/types/SkillGroup.d.ts +40 -0
  55. package/lib/types/SkillGroup.js +4 -0
  56. package/lib/types/SkillModificationIncrement.d.ts +82 -0
  57. package/lib/types/SkillModificationIncrement.js +4 -0
  58. package/lib/types/SocialStatus.d.ts +30 -0
  59. package/lib/types/SocialStatus.js +4 -0
  60. package/lib/types/State.d.ts +40 -0
  61. package/lib/types/State.js +4 -0
  62. package/lib/types/TargetCategory.d.ts +36 -0
  63. package/lib/types/TargetCategory.js +4 -0
  64. package/lib/types/_ActivatableSkill.d.ts +919 -0
  65. package/lib/types/_ActivatableSkill.js +38 -0
  66. package/lib/types/_CommonnessRatedAdvantageDisadvantage.d.ts +12 -0
  67. package/lib/types/_CommonnessRatedAdvantageDisadvantage.js +1 -0
  68. package/lib/types/_ImprovementCost.d.ts +9 -0
  69. package/lib/types/_ImprovementCost.js +10 -0
  70. package/lib/types/_Prerequisite.d.ts +274 -0
  71. package/lib/types/_Prerequisite.js +4 -0
  72. package/lib/types/_Sex.d.ts +11 -0
  73. package/lib/types/_Sex.js +4 -0
  74. package/lib/types/_SkillCheck.d.ts +28 -0
  75. package/lib/types/_SkillCheck.js +1 -0
  76. package/lib/types/magicalActions/AnimistPower.d.ts +227 -0
  77. package/lib/types/magicalActions/AnimistPower.js +4 -0
  78. package/lib/types/magicalActions/AnimistPower_Tribe.d.ts +30 -0
  79. package/lib/types/magicalActions/AnimistPower_Tribe.js +4 -0
  80. package/lib/types/magicalActions/Curse.d.ts +228 -0
  81. package/lib/types/magicalActions/Curse.js +4 -0
  82. package/lib/types/magicalActions/DominationRitual.d.ts +181 -0
  83. package/lib/types/magicalActions/DominationRitual.js +4 -0
  84. package/lib/types/magicalActions/ElvenMagicalSong.d.ts +149 -0
  85. package/lib/types/magicalActions/ElvenMagicalSong.js +4 -0
  86. package/lib/types/magicalActions/GeodeRitual.d.ts +162 -0
  87. package/lib/types/magicalActions/GeodeRitual.js +4 -0
  88. package/lib/types/magicalActions/JesterTrick.d.ts +167 -0
  89. package/lib/types/magicalActions/JesterTrick.js +4 -0
  90. package/lib/types/magicalActions/MagicalDance.d.ts +184 -0
  91. package/lib/types/magicalActions/MagicalDance.js +4 -0
  92. package/lib/types/magicalActions/MagicalMelody.d.ts +132 -0
  93. package/lib/types/magicalActions/MagicalMelody.js +4 -0
  94. package/lib/types/magicalActions/MagicalRune.d.ts +241 -0
  95. package/lib/types/magicalActions/MagicalRune.js +4 -0
  96. package/lib/types/magicalActions/ZibiljaRitual.d.ts +101 -0
  97. package/lib/types/magicalActions/ZibiljaRitual.js +4 -0
  98. package/lib/types/magicalActions/_MusicTradition.d.ts +28 -0
  99. package/lib/types/magicalActions/_MusicTradition.js +1 -0
  100. package/lib/types/magicalActions/_SkillReference.d.ts +13 -0
  101. package/lib/types/magicalActions/_SkillReference.js +5 -0
  102. package/lib/types/rule/FocusRule.d.ts +53 -0
  103. package/lib/types/rule/FocusRule.js +4 -0
  104. package/lib/types/rule/FocusRule_Subject.d.ts +31 -0
  105. package/lib/types/rule/FocusRule_Subject.js +4 -0
  106. package/lib/types/rule/OptionalRule.d.ts +65 -0
  107. package/lib/types/rule/OptionalRule.js +4 -0
  108. package/lib/types/source/Publication.d.ts +4 -0
  109. package/lib/types/source/Publication.js +4 -0
  110. package/lib/types/source/_Erratum.d.ts +25 -0
  111. package/lib/types/source/_Erratum.js +4 -0
  112. package/lib/types/source/_PublicationRef.d.ts +146 -0
  113. package/lib/types/source/_PublicationRef.js +4 -0
  114. package/lib/validation/integrity.d.ts +16 -0
  115. package/lib/validation/integrity.js +3 -0
  116. package/package.json +37 -0
  117. package/schema/ArcaneBardTradition.schema.json +49 -0
  118. package/schema/ArcaneDancerTradition.schema.json +49 -0
  119. package/schema/Aspect.schema.json +50 -0
  120. package/schema/Attribute.schema.json +57 -0
  121. package/schema/CombatTechnique_Close.schema.json +127 -0
  122. package/schema/CombatTechnique_Ranged.schema.json +83 -0
  123. package/schema/Condition.schema.json +84 -0
  124. package/schema/Culture.schema.json +858 -0
  125. package/schema/DerivedCharacteristic.schema.json +90 -0
  126. package/schema/Element.schema.json +45 -0
  127. package/schema/ExperienceLevel.schema.json +84 -0
  128. package/schema/EyeColor.schema.json +45 -0
  129. package/schema/HairColor.schema.json +45 -0
  130. package/schema/Lessons_Curriculum.schema.json +500 -0
  131. package/schema/Lessons_Guideline.schema.json +51 -0
  132. package/schema/Locale.schema.json +45 -0
  133. package/schema/MetaCondition.schema.json +85 -0
  134. package/schema/Property.schema.json +49 -0
  135. package/schema/Race.schema.json +724 -0
  136. package/schema/Region.schema.json +45 -0
  137. package/schema/Service.schema.json +58 -0
  138. package/schema/SexPractice.schema.json +72 -0
  139. package/schema/Skill.schema.json +278 -0
  140. package/schema/SkillGroup.schema.json +56 -0
  141. package/schema/SkillModificationIncrement.schema.json +98 -0
  142. package/schema/SocialStatus.schema.json +45 -0
  143. package/schema/State.schema.json +58 -0
  144. package/schema/TargetCategory.schema.json +51 -0
  145. package/schema/_ActivatableSkill.schema.json +1534 -0
  146. package/schema/_CommonnessRatedAdvantageDisadvantage.schema.json +22 -0
  147. package/schema/_ImprovementCost.schema.json +15 -0
  148. package/schema/_Prerequisite.schema.json +519 -0
  149. package/schema/_Sex.schema.json +36 -0
  150. package/schema/_SkillCheck.schema.json +94 -0
  151. package/schema/magicalActions/AnimistPower.schema.json +411 -0
  152. package/schema/magicalActions/AnimistPower_Tribe.schema.json +45 -0
  153. package/schema/magicalActions/Curse.schema.json +378 -0
  154. package/schema/magicalActions/DominationRitual.schema.json +288 -0
  155. package/schema/magicalActions/ElvenMagicalSong.schema.json +194 -0
  156. package/schema/magicalActions/GeodeRitual.schema.json +303 -0
  157. package/schema/magicalActions/JesterTrick.schema.json +292 -0
  158. package/schema/magicalActions/MagicalDance.schema.json +328 -0
  159. package/schema/magicalActions/MagicalMelody.schema.json +254 -0
  160. package/schema/magicalActions/MagicalRune.schema.json +426 -0
  161. package/schema/magicalActions/ZibiljaRitual.schema.json +159 -0
  162. package/schema/magicalActions/_MusicTradition.schema.json +44 -0
  163. package/schema/magicalActions/_SkillReference.schema.json +26 -0
  164. package/schema/rule/FocusRule.schema.json +71 -0
  165. package/schema/rule/FocusRule_Subject.schema.json +46 -0
  166. package/schema/rule/OptionalRule.schema.json +96 -0
  167. package/schema/source/Publication.schema.json +165 -0
  168. package/schema/source/_Erratum.schema.json +37 -0
  169. package/schema/source/_PublicationRef.schema.json +242 -0
@@ -0,0 +1,146 @@
1
+ /**
2
+ * @main PublicationRefs
3
+ */
4
+ /**
5
+ * The publications where you can find the entry.
6
+ * @title Publication References
7
+ * @minItems 1
8
+ */
9
+ export declare type PublicationRefs = PublicationRef[];
10
+ /**
11
+ * A source reference. It contains the book's publisher identifier and the page
12
+ * where it occurs. If an entry spans multiple pages, provide the last page as
13
+ * well.
14
+ * @title Publication Reference
15
+ */
16
+ export declare type PublicationRef = {
17
+ /**
18
+ * The publication's identifier.
19
+ * @integer
20
+ * @minimum 1
21
+ */
22
+ id: number;
23
+ /**
24
+ * All occurrences of the entry, identified by IETF language tag (BCP47).
25
+ * @minProperties 1
26
+ */
27
+ occurrences: {
28
+ /**
29
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
30
+ */
31
+ [localeId: string]: Occurrence;
32
+ };
33
+ };
34
+ declare type Occurrence = SimpleOccurrence | SimpleOccurrences | VersionedOccurrence;
35
+ /**
36
+ * @title Simple Occurrences
37
+ * @minItems 1
38
+ */
39
+ declare type SimpleOccurrences = SimpleOccurrence[];
40
+ /**
41
+ * @title Simple Occurrence
42
+ */
43
+ declare type SimpleOccurrence = {
44
+ /**
45
+ * The page where it occurs. If the entry spans multiple pages, use this as
46
+ * the first page and `last_page` as the last page.
47
+ * @integer
48
+ * @minimum 1
49
+ */
50
+ first_page: number;
51
+ /**
52
+ * The last page where it occurs. If there is only one page, set this to the
53
+ * same as `first_page` oder remove it.
54
+ * @integer
55
+ * @minimum 2
56
+ */
57
+ last_page?: number;
58
+ };
59
+ /**
60
+ * @title Versioned Occurrence
61
+ */
62
+ declare type VersionedOccurrence = {
63
+ /**
64
+ * The initial occurrence of the entry.
65
+ * @title Initial
66
+ */
67
+ initial: {
68
+ /**
69
+ * The publication's printing since which the entry is present. Leave
70
+ * empty if present since the beginning.
71
+ * @integer
72
+ * @minimum 2
73
+ */
74
+ printing?: number;
75
+ /**
76
+ * The initial page references.
77
+ * @minItems 1
78
+ */
79
+ pages: PageRange[];
80
+ };
81
+ /**
82
+ * Revisions of the entry, resulting in either changed page references or
83
+ * re-addition or removal of an entry.
84
+ * @minItems 1
85
+ */
86
+ revisions?: Revision[];
87
+ };
88
+ /**
89
+ * A revision of the entry, resulting in either changed page references or
90
+ * re-addition or removal of an entry.
91
+ * @title Revision
92
+ */
93
+ declare type Revision = {
94
+ tag: "Since";
95
+ /**
96
+ * The publication's printing since which the entry is present again or has
97
+ * changed page references.
98
+ * @integer
99
+ * @minimum 2
100
+ */
101
+ printing: number;
102
+ /**
103
+ * The changed or new page references.
104
+ * @minItems 1
105
+ */
106
+ pages: PageRange[];
107
+ } | {
108
+ tag: "Deprecated";
109
+ /**
110
+ * The publication's printing since which the entry has been removed.
111
+ * @integer
112
+ * @minimum 2
113
+ */
114
+ printing: number;
115
+ };
116
+ /**
117
+ * @title Page Range
118
+ */
119
+ declare type PageRange = {
120
+ /**
121
+ * The page where it occurs. If the entry spans multiple pages, use this as
122
+ * the first page and `last_page` as the last page.
123
+ */
124
+ first_page: Page;
125
+ /**
126
+ * The last page where it occurs. If there is only one page, set this to the
127
+ * same as `first_page` oder remove it.
128
+ */
129
+ last_page?: Page;
130
+ };
131
+ /**
132
+ * @title Page
133
+ */
134
+ declare type Page = {
135
+ tag: "InsideCoverFront";
136
+ } | {
137
+ tag: "InsideCoverBack";
138
+ } | {
139
+ tag: "Numbered";
140
+ /**
141
+ * The page number.
142
+ * @integer
143
+ */
144
+ number: number;
145
+ };
146
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @main PublicationRefs
3
+ */
4
+ export {};
@@ -0,0 +1,16 @@
1
+ export interface ReferencialIntegrityValidators {
2
+ checkLocaleId: (localeId: string) => boolean;
3
+ }
4
+ export declare const getReferencialIntegrityErrors: <T extends string | number>(ids: T[], check: (id: T) => boolean) => T[];
5
+ export declare const getReferencialIntegrityErrorsWith: <T, U extends string | number>(elements: T[], transform: (element: T) => U, check: (id: U) => boolean) => T[];
6
+ interface Translatable<T> {
7
+ /**
8
+ * All translations for the entry, identified by IETF language tag (BCP47).
9
+ * @minProperties 1
10
+ */
11
+ translations: {
12
+ [localeId: string]: T;
13
+ };
14
+ }
15
+ export declare const getReferencialIntegrityErrorsForTranslatable: <T>(translatable: Translatable<T>, checkLocaleId: (id: string) => boolean) => string[];
16
+ export {};
@@ -0,0 +1,3 @@
1
+ export const getReferencialIntegrityErrors = (ids, check) => ids.filter(id => !check(id));
2
+ export const getReferencialIntegrityErrorsWith = (elements, transform, check) => elements.filter(element => !check(transform(element)));
3
+ export const getReferencialIntegrityErrorsForTranslatable = (translatable, checkLocaleId) => getReferencialIntegrityErrors(Object.keys(translatable.translations), checkLocaleId);
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "optolith-database-schema",
3
+ "version": "0.0.1",
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
+ "keywords": [
6
+ "tde",
7
+ "thedarkeye",
8
+ "dsa",
9
+ "dasschwarzeauge"
10
+ ],
11
+ "main": "./lib/main.js",
12
+ "types": "./lib/main.d.ts",
13
+ "scripts": {
14
+ "build:ts": "tsc",
15
+ "build:gen": "node ./build/generate.js",
16
+ "build": "npm run build:ts && npm run build:gen",
17
+ "release": "standard-version",
18
+ "test": "echo \"Error: no test specified\" && exit 1"
19
+ },
20
+ "author": "Lukas Obermann",
21
+ "license": "MPL-2.0",
22
+ "dependencies": {
23
+ "ajv": "^8.10.0",
24
+ "yaml": "^1.10.2"
25
+ },
26
+ "devDependencies": {
27
+ "@types/node": "^17.0.21",
28
+ "optolith-tsjsonschemamd": "^0.5.1",
29
+ "standard-version": "^9.3.2",
30
+ "typescript": "^4.6.2"
31
+ },
32
+ "repository": "github:elyukai/optolith-database-schema",
33
+ "bugs": {
34
+ "url": "https://github.com/elyukai/optolith-database-schema/issues"
35
+ },
36
+ "type": "module"
37
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "ArcaneBardTradition.schema.json",
4
+ "$ref": "#/definitions/ArcaneBardTradition",
5
+ "definitions": {
6
+ "ArcaneBardTradition": {
7
+ "title": "Arcane Bard Tradition",
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "description": "The arcane bard tradition's identifier. An unique, increasing integer.",
12
+ "type": "integer",
13
+ "minimum": 1
14
+ },
15
+ "prerequisites": {
16
+ "$ref": "./_Prerequisite.schema.json#/definitions/GroupCollection/ArcaneTradition"
17
+ },
18
+ "translations": {
19
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
20
+ "type": "object",
21
+ "patternProperties": {
22
+ "^[a-z]{2}-[A-Z]{2}$": {
23
+ "type": "object",
24
+ "properties": {
25
+ "name": {
26
+ "description": "The arcane bard tradition's name.",
27
+ "type": "string",
28
+ "minLength": 1
29
+ }
30
+ },
31
+ "required": [
32
+ "name"
33
+ ],
34
+ "additionalProperties": false
35
+ }
36
+ },
37
+ "minProperties": 1,
38
+ "additionalProperties": false
39
+ }
40
+ },
41
+ "required": [
42
+ "id",
43
+ "prerequisites",
44
+ "translations"
45
+ ],
46
+ "additionalProperties": false
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "ArcaneDancerTradition.schema.json",
4
+ "$ref": "#/definitions/ArcaneDancerTradition",
5
+ "definitions": {
6
+ "ArcaneDancerTradition": {
7
+ "title": "Arcane Dancer Tradition",
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "description": "The arcane dancer tradition's identifier. An unique, increasing integer.",
12
+ "type": "integer",
13
+ "minimum": 1
14
+ },
15
+ "prerequisites": {
16
+ "$ref": "./_Prerequisite.schema.json#/definitions/GroupCollection/ArcaneTradition"
17
+ },
18
+ "translations": {
19
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
20
+ "type": "object",
21
+ "patternProperties": {
22
+ "^[a-z]{2}-[A-Z]{2}$": {
23
+ "type": "object",
24
+ "properties": {
25
+ "name": {
26
+ "description": "The arcane dancer tradition's name.",
27
+ "type": "string",
28
+ "minLength": 1
29
+ }
30
+ },
31
+ "required": [
32
+ "name"
33
+ ],
34
+ "additionalProperties": false
35
+ }
36
+ },
37
+ "minProperties": 1,
38
+ "additionalProperties": false
39
+ }
40
+ },
41
+ "required": [
42
+ "id",
43
+ "prerequisites",
44
+ "translations"
45
+ ],
46
+ "additionalProperties": false
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "Aspect.schema.json",
4
+ "$ref": "#/definitions/Aspect",
5
+ "definitions": {
6
+ "Aspect": {
7
+ "title": "Aspect",
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "description": "The aspect's identifier. An unique, increasing integer.",
12
+ "type": "integer",
13
+ "minimum": 1
14
+ },
15
+ "translations": {
16
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
17
+ "type": "object",
18
+ "patternProperties": {
19
+ "^[a-z]{2}-[A-Z]{2}$": {
20
+ "type": "object",
21
+ "properties": {
22
+ "name": {
23
+ "description": "The aspect name.",
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "master_of_aspect_suffix": {
28
+ "description": "The aspect's name appended to the simple name (not `name_in_library`)\nof the special ability *Master of (Aspect)*.",
29
+ "type": "string",
30
+ "minLength": 1
31
+ }
32
+ },
33
+ "required": [
34
+ "name"
35
+ ],
36
+ "additionalProperties": false
37
+ }
38
+ },
39
+ "minProperties": 1,
40
+ "additionalProperties": false
41
+ }
42
+ },
43
+ "required": [
44
+ "id",
45
+ "translations"
46
+ ],
47
+ "additionalProperties": false
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "Attribute.schema.json",
4
+ "$ref": "#/definitions/Attribute",
5
+ "definitions": {
6
+ "Attribute": {
7
+ "title": "Attribute",
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "description": "The attribute's identifier. An unique, increasing integer.",
12
+ "type": "integer",
13
+ "minimum": 1
14
+ },
15
+ "translations": {
16
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
17
+ "type": "object",
18
+ "patternProperties": {
19
+ "^[a-z]{2}-[A-Z]{2}$": {
20
+ "type": "object",
21
+ "properties": {
22
+ "name": {
23
+ "description": "The attribute's name.",
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "abbreviation": {
28
+ "description": "The abbreviation of the attribute's name.",
29
+ "type": "string",
30
+ "minLength": 1
31
+ },
32
+ "description": {
33
+ "description": "The description of the attribute.",
34
+ "type": "string",
35
+ "minLength": 1
36
+ }
37
+ },
38
+ "required": [
39
+ "name",
40
+ "abbreviation",
41
+ "description"
42
+ ],
43
+ "additionalProperties": false
44
+ }
45
+ },
46
+ "minProperties": 1,
47
+ "additionalProperties": false
48
+ }
49
+ },
50
+ "required": [
51
+ "id",
52
+ "translations"
53
+ ],
54
+ "additionalProperties": false
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,127 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "CombatTechnique_Close.schema.json",
4
+ "$ref": "#/definitions/CloseCombatTechnique",
5
+ "definitions": {
6
+ "CloseCombatTechnique": {
7
+ "title": "Close Combat Technique",
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "description": "The close combat technique's identifier. An unique, increasing integer.",
12
+ "type": "integer",
13
+ "minimum": 1
14
+ },
15
+ "special": {
16
+ "description": "Special rules for the combat technique that apply to all weapons in this\ncategory.",
17
+ "type": "object",
18
+ "properties": {
19
+ "parrying": {
20
+ "description": "Is parrying possible with this combat technique?",
21
+ "$ref": "#/definitions/Parrying"
22
+ }
23
+ },
24
+ "required": [
25
+ "parrying"
26
+ ],
27
+ "additionalProperties": false
28
+ },
29
+ "primary_attribute": {
30
+ "description": "The primary attribute(s).",
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "#/definitions/PrimaryAttribute"
34
+ },
35
+ "minItems": 1,
36
+ "maxItems": 2,
37
+ "uniqueItems": true
38
+ },
39
+ "breaking_point_rating": {
40
+ "description": "The *Breaking Point Rating* of the respective combat technique.",
41
+ "type": "integer",
42
+ "minimum": 1
43
+ },
44
+ "improvement_cost": {
45
+ "$ref": "./_ImprovementCost.schema.json#/definitions/ImprovementCost"
46
+ },
47
+ "src": {
48
+ "$ref": "./source/_PublicationRef.schema.json#/definitions/PublicationRefs"
49
+ },
50
+ "translations": {
51
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
52
+ "type": "object",
53
+ "patternProperties": {
54
+ "^[a-z]{2}-[A-Z]{2}$": {
55
+ "type": "object",
56
+ "properties": {
57
+ "name": {
58
+ "description": "The name of the condition.",
59
+ "type": "string",
60
+ "minLength": 1
61
+ },
62
+ "special": {
63
+ "description": "Additional rules for the condition, if applicable.",
64
+ "type": "string",
65
+ "minLength": 1
66
+ },
67
+ "errata": {
68
+ "$ref": "./source/_Erratum.schema.json#/definitions/Errata"
69
+ }
70
+ },
71
+ "required": [
72
+ "name"
73
+ ],
74
+ "additionalProperties": false
75
+ }
76
+ },
77
+ "minProperties": 1,
78
+ "additionalProperties": false
79
+ }
80
+ },
81
+ "required": [
82
+ "id",
83
+ "special",
84
+ "primary_attribute",
85
+ "breaking_point_rating",
86
+ "improvement_cost",
87
+ "src",
88
+ "translations"
89
+ ],
90
+ "additionalProperties": false
91
+ },
92
+ "Parrying": {
93
+ "description": "Is parrying possible with this combat technique?",
94
+ "oneOf": [
95
+ {
96
+ "type": "object",
97
+ "properties": {
98
+ "tag": {
99
+ "const": "Possible"
100
+ }
101
+ },
102
+ "required": [
103
+ "tag"
104
+ ],
105
+ "additionalProperties": false
106
+ },
107
+ {
108
+ "type": "object",
109
+ "properties": {
110
+ "tag": {
111
+ "const": "Impossible"
112
+ }
113
+ },
114
+ "required": [
115
+ "tag"
116
+ ],
117
+ "additionalProperties": false
118
+ }
119
+ ]
120
+ },
121
+ "PrimaryAttribute": {
122
+ "description": "The attribute's identifier.",
123
+ "type": "integer",
124
+ "minimum": 1
125
+ }
126
+ }
127
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "CombatTechnique_Ranged.schema.json",
4
+ "$ref": "#/definitions/RangedCombatTechnique",
5
+ "definitions": {
6
+ "RangedCombatTechnique": {
7
+ "title": "Ranged Combat Technique",
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "description": "The ranged combat technique's identifier. An unique, increasing integer.",
12
+ "type": "integer",
13
+ "minimum": 1
14
+ },
15
+ "primary_attribute": {
16
+ "description": "The primary attribute(s).",
17
+ "type": "array",
18
+ "items": {
19
+ "$ref": "#/definitions/PrimaryAttribute"
20
+ },
21
+ "minItems": 1,
22
+ "maxItems": 2,
23
+ "uniqueItems": true
24
+ },
25
+ "breaking_point_rating": {
26
+ "description": "The *Breaking Point Rating* of the respective combat technique.",
27
+ "type": "integer",
28
+ "minimum": 1
29
+ },
30
+ "improvement_cost": {
31
+ "$ref": "./_ImprovementCost.schema.json#/definitions/ImprovementCost"
32
+ },
33
+ "src": {
34
+ "$ref": "./source/_PublicationRef.schema.json#/definitions/PublicationRefs"
35
+ },
36
+ "translations": {
37
+ "description": "All translations for the entry, identified by IETF language tag (BCP47).",
38
+ "type": "object",
39
+ "patternProperties": {
40
+ "^[a-z]{2}-[A-Z]{2}$": {
41
+ "type": "object",
42
+ "properties": {
43
+ "name": {
44
+ "description": "The name of the condition.",
45
+ "type": "string",
46
+ "minLength": 1
47
+ },
48
+ "special": {
49
+ "description": "Additional rules for the condition, if applicable.",
50
+ "type": "string",
51
+ "minLength": 1
52
+ },
53
+ "errata": {
54
+ "$ref": "./source/_Erratum.schema.json#/definitions/Errata"
55
+ }
56
+ },
57
+ "required": [
58
+ "name"
59
+ ],
60
+ "additionalProperties": false
61
+ }
62
+ },
63
+ "minProperties": 1,
64
+ "additionalProperties": false
65
+ }
66
+ },
67
+ "required": [
68
+ "id",
69
+ "primary_attribute",
70
+ "breaking_point_rating",
71
+ "improvement_cost",
72
+ "src",
73
+ "translations"
74
+ ],
75
+ "additionalProperties": false
76
+ },
77
+ "PrimaryAttribute": {
78
+ "description": "The attribute's identifier.",
79
+ "type": "integer",
80
+ "minimum": 1
81
+ }
82
+ }
83
+ }