optolith-database-schema 0.1.27 → 0.2.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.
@@ -0,0 +1,308 @@
1
+ /**
2
+ * @main Item
3
+ */
4
+ import { Errata } from "../source/_Erratum.js";
5
+ import { PublicationRefs } from "../source/_PublicationRef.js";
6
+ import { ArmorType, Encumbrance, HasAdditionalPenalties, HitZone, Protection } from "./_Armor.js";
7
+ import { MeleeWeapon, RangedWeapon, RestrictedToCultures, SanctifiedBy, StructurePoints } from "./_Weapon.js";
8
+ /**
9
+ * @title Item
10
+ */
11
+ export declare type Item = {
12
+ /**
13
+ * The item's identifier. An unique, increasing integer.
14
+ * @integer
15
+ * @minimum 1
16
+ */
17
+ id: number;
18
+ /**
19
+ * The cost in silverthalers.
20
+ */
21
+ cost: Cost;
22
+ /**
23
+ * The weight in kg.
24
+ */
25
+ weight?: Weight;
26
+ /**
27
+ * The complexity of crafting the item.
28
+ */
29
+ complexity: Complexity;
30
+ type: {
31
+ tag: "Weapon";
32
+ /**
33
+ * @minItems 1
34
+ */
35
+ uses: (MeleeWeapon | RangedWeapon)[];
36
+ sanctified_by?: SanctifiedBy;
37
+ restricted_to_cultures?: RestrictedToCultures;
38
+ secondary?: {
39
+ type: Type;
40
+ structure_points: StructurePoints;
41
+ };
42
+ /**
43
+ * All translations for the entry, identified by IETF language tag
44
+ * (BCP47).
45
+ * @minProperties 1
46
+ */
47
+ translations: {
48
+ /**
49
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
50
+ */
51
+ [localeId: string]: {
52
+ name: Name;
53
+ secondary_name?: SecondaryName;
54
+ note?: Note;
55
+ rules?: Rules;
56
+ advantage?: Advantage;
57
+ disadvantage?: Disadvantage;
58
+ errata?: Errata;
59
+ };
60
+ };
61
+ } | {
62
+ tag: "Armor";
63
+ protection: Protection;
64
+ encumbrance: Encumbrance;
65
+ has_additional_penalties: HasAdditionalPenalties;
66
+ armor_type: ArmorType;
67
+ hit_zone?: HitZone;
68
+ secondary?: {
69
+ type: Type;
70
+ structure_points: StructurePoints;
71
+ };
72
+ /**
73
+ * All translations for the entry, identified by IETF language tag
74
+ * (BCP47).
75
+ * @minProperties 1
76
+ */
77
+ translations: {
78
+ /**
79
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
80
+ */
81
+ [localeId: string]: {
82
+ name: Name;
83
+ secondary_name?: SecondaryName;
84
+ note?: Note;
85
+ rules?: Rules;
86
+ advantage?: Advantage;
87
+ disadvantage?: Disadvantage;
88
+ errata?: Errata;
89
+ };
90
+ };
91
+ } | {
92
+ tag: "Default";
93
+ type: Type;
94
+ combat_uses: {
95
+ tag: "ImprovisedWeapon";
96
+ /**
97
+ * @minItems 1
98
+ */
99
+ uses: (MeleeWeapon | RangedWeapon)[];
100
+ sanctified_by?: SanctifiedBy;
101
+ restricted_to_cultures?: RestrictedToCultures;
102
+ /**
103
+ * All translations for the entry, identified by IETF language tag
104
+ * (BCP47).
105
+ * @minProperties 1
106
+ */
107
+ translations: {
108
+ /**
109
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
110
+ */
111
+ [localeId: string]: {
112
+ advantage: Advantage;
113
+ disadvantage: Disadvantage;
114
+ };
115
+ };
116
+ } | {
117
+ tag: "Armor";
118
+ protection: Protection;
119
+ encumbrance: Encumbrance;
120
+ has_additional_penalties: HasAdditionalPenalties;
121
+ armor_type: ArmorType;
122
+ hit_zone?: HitZone;
123
+ /**
124
+ * All translations for the entry, identified by IETF language tag
125
+ * (BCP47).
126
+ * @minProperties 1
127
+ */
128
+ translations: {
129
+ /**
130
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
131
+ */
132
+ [localeId: string]: {
133
+ advantage: Advantage;
134
+ disadvantage: Disadvantage;
135
+ };
136
+ };
137
+ };
138
+ structure_points: StructurePoints;
139
+ /**
140
+ * All translations for the entry, identified by IETF language tag
141
+ * (BCP47).
142
+ * @minProperties 1
143
+ */
144
+ translations: {
145
+ /**
146
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
147
+ */
148
+ [localeId: string]: {
149
+ name: Name;
150
+ secondary_name?: SecondaryName;
151
+ note?: Note;
152
+ rules?: Rules;
153
+ errata?: Errata;
154
+ };
155
+ };
156
+ };
157
+ src: PublicationRefs;
158
+ };
159
+ /**
160
+ * The name of the item.
161
+ * @minLength 1
162
+ */
163
+ declare type Name = string;
164
+ /**
165
+ * An auxiliary name or label of the item, if available.
166
+ * @minLength 1
167
+ */
168
+ declare type SecondaryName = string;
169
+ /**
170
+ * The cost in silverthalers.
171
+ */
172
+ declare type Cost = {
173
+ tag: "Free";
174
+ } | {
175
+ tag: "Various";
176
+ } | {
177
+ tag: "Fixed";
178
+ /**
179
+ * The cost in silverthalers.
180
+ * @exclusiveMinimum 0
181
+ */
182
+ value: number;
183
+ /**
184
+ * All translations for the entry, identified by IETF language tag
185
+ * (BCP47).
186
+ * @minProperties 1
187
+ */
188
+ translations?: {
189
+ /**
190
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
191
+ */
192
+ [localeId: string]: {
193
+ /**
194
+ * The cost get wrapped by this text using a placeholder in the text.
195
+ * @minLength 1
196
+ * @pattern \\{0\\}
197
+ */
198
+ wrap_in_text: string;
199
+ };
200
+ };
201
+ } | {
202
+ tag: "Range";
203
+ /**
204
+ * The lower bound of the cost in silverthalers.
205
+ * @exclusiveMinimum 0
206
+ */
207
+ from: number;
208
+ /**
209
+ * The upper bound of the cost in silverthalers.
210
+ * @exclusiveMinimum 0
211
+ */
212
+ to: number;
213
+ /**
214
+ * All translations for the entry, identified by IETF language tag
215
+ * (BCP47).
216
+ * @minProperties 1
217
+ */
218
+ translations?: {
219
+ /**
220
+ * @patternProperties ^[a-z]{2}-[A-Z]{2}$
221
+ */
222
+ [localeId: string]: {
223
+ /**
224
+ * The cost range gets wrapped by this text using a placeholder in the
225
+ * text.
226
+ * @minLength 1
227
+ * @pattern \\{0\\}
228
+ */
229
+ wrap_in_text: string;
230
+ };
231
+ };
232
+ };
233
+ /**
234
+ * The weight in kg.
235
+ * @exclusiveMinimum 0
236
+ */
237
+ declare type Weight = number;
238
+ /**
239
+ * The complexity of crafting the item.
240
+ */
241
+ declare type Complexity = {
242
+ tag: "Primitive";
243
+ } | {
244
+ tag: "Simple";
245
+ } | {
246
+ tag: "Complex";
247
+ /**
248
+ * The AP value for the trade secret.
249
+ * @integer
250
+ * @minimum 1
251
+ */
252
+ ap_value: number;
253
+ };
254
+ declare enum Type {
255
+ Ammunition = "Ammunition",
256
+ WeaponAccessories = "WeaponAccessories",
257
+ Clothes = "Clothes",
258
+ TravelGearAndTools = "TravelGearAndTools",
259
+ Illumination = "Illumination",
260
+ BandagesAndRemedies = "BandagesAndRemedies",
261
+ Containers = "Containers",
262
+ RopesAndChains = "RopesAndChains",
263
+ ThievesTools = "ThievesTools",
264
+ ToolsOfTheTrade = "ToolsOfTheTrade",
265
+ OrienteeringAids = "OrienteeringAids",
266
+ Jewelry = "Jewelry",
267
+ GemsAndPreciousStones = "GemsAndPreciousStones",
268
+ Stationary = "Stationary",
269
+ Books = "Books",
270
+ MagicalArtifacts = "MagicalArtifacts",
271
+ Alchemicae = "Alchemicae",
272
+ Poisons = "Poisons",
273
+ HealingHerbs = "HealingHerbs",
274
+ MusicalInstruments = "MusicalInstruments",
275
+ LuxuryGoods = "LuxuryGoods",
276
+ Animals = "Animals",
277
+ AnimalCare = "AnimalCare",
278
+ Vehicles = "Vehicles",
279
+ AusruestungDerGeweihtenschaft = "AusruestungDerGeweihtenschaft",
280
+ CeremonialItems = "CeremonialItems",
281
+ Liebesspielzeug = "Liebesspielzeug"
282
+ }
283
+ /**
284
+ * Note text.
285
+ * @markdown
286
+ * @minLength 1
287
+ */
288
+ declare type Note = string;
289
+ /**
290
+ * Special rules text.
291
+ * @markdown
292
+ * @minLength 1
293
+ */
294
+ declare type Rules = string;
295
+ /**
296
+ * The weapon/armor advantage text.
297
+ * @markdown
298
+ * @minLength 1
299
+ */
300
+ declare type Advantage = string;
301
+ /**
302
+ * The weapon/armor disadvantage text.
303
+ * @markdown
304
+ * @minLength 1
305
+ */
306
+ declare type Disadvantage = string;
307
+ export declare const validateSchema: import("../../validation/schema.js").TypeValidator<Item>;
308
+ export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @main Item
3
+ */
4
+ import { validateSchemaCreator } from "../../validation/schema.js";
5
+ var Type;
6
+ (function (Type) {
7
+ Type["Ammunition"] = "Ammunition";
8
+ Type["WeaponAccessories"] = "WeaponAccessories";
9
+ Type["Clothes"] = "Clothes";
10
+ Type["TravelGearAndTools"] = "TravelGearAndTools";
11
+ Type["Illumination"] = "Illumination";
12
+ Type["BandagesAndRemedies"] = "BandagesAndRemedies";
13
+ Type["Containers"] = "Containers";
14
+ Type["RopesAndChains"] = "RopesAndChains";
15
+ Type["ThievesTools"] = "ThievesTools";
16
+ Type["ToolsOfTheTrade"] = "ToolsOfTheTrade";
17
+ Type["OrienteeringAids"] = "OrienteeringAids";
18
+ Type["Jewelry"] = "Jewelry";
19
+ Type["GemsAndPreciousStones"] = "GemsAndPreciousStones";
20
+ Type["Stationary"] = "Stationary";
21
+ Type["Books"] = "Books";
22
+ Type["MagicalArtifacts"] = "MagicalArtifacts";
23
+ Type["Alchemicae"] = "Alchemicae";
24
+ Type["Poisons"] = "Poisons";
25
+ Type["HealingHerbs"] = "HealingHerbs";
26
+ Type["MusicalInstruments"] = "MusicalInstruments";
27
+ Type["LuxuryGoods"] = "LuxuryGoods";
28
+ Type["Animals"] = "Animals";
29
+ Type["AnimalCare"] = "AnimalCare";
30
+ Type["Vehicles"] = "Vehicles";
31
+ Type["AusruestungDerGeweihtenschaft"] = "AusruestungDerGeweihtenschaft";
32
+ Type["CeremonialItems"] = "CeremonialItems";
33
+ Type["Liebesspielzeug"] = "Liebesspielzeug";
34
+ })(Type || (Type = {}));
35
+ export const validateSchema = validateSchemaCreator(import.meta.url);
@@ -0,0 +1,70 @@
1
+ /**
2
+ *
3
+ */
4
+ /**
5
+ * The PRO value.
6
+ * @integer
7
+ * @minimum 0
8
+ */
9
+ export declare type Protection = number;
10
+ /**
11
+ * The ENC value.
12
+ * @integer
13
+ * @minimum 0
14
+ */
15
+ export declare type Encumbrance = number;
16
+ /**
17
+ * Does the armor have additional penalties (MOV -1, INI -1)?
18
+ */
19
+ export declare type HasAdditionalPenalties = boolean;
20
+ /**
21
+ * The armor type.
22
+ * @title Armor Type
23
+ */
24
+ export declare type ArmorType = {
25
+ /**
26
+ * The armor type's identifier.
27
+ * @integer
28
+ * @minimum 1
29
+ * @maximum 10
30
+ */
31
+ id: number;
32
+ };
33
+ /**
34
+ * Specify if armor is only available for a specific hit zone.
35
+ * @title Hit Zone
36
+ */
37
+ export declare type HitZone = {
38
+ tag: "Head";
39
+ /**
40
+ * In some cases, multiple armors for the same hit zone can be combined.
41
+ * They're listed at the item that can be combined with others.
42
+ */
43
+ combination_possibilities?: {
44
+ /**
45
+ * A list of armors that can be combined with this armor.
46
+ * @minItems 1
47
+ */
48
+ armors: {
49
+ /**
50
+ * The armor's identifier.
51
+ * @integer
52
+ * @minimum 1
53
+ */
54
+ id: number;
55
+ }[];
56
+ /**
57
+ * The PRO value that is added to the PRO value of the other armor instead
58
+ * of adding the normale PRO value.
59
+ * @integer
60
+ * @minimum 0
61
+ */
62
+ protection?: number;
63
+ };
64
+ } | {
65
+ tag: "Torso";
66
+ } | {
67
+ tag: "Arms";
68
+ } | {
69
+ tag: "Legs";
70
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ *
3
+ */
4
+ export {};