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,330 @@
1
+ /**
2
+ *
3
+ */
4
+ import { Dice } from "../_Dice";
5
+ /**
6
+ * The structure points of the item. Use an array if the item consists of
7
+ * multiple components that have individual structure points.
8
+ * @title Structure Points
9
+ * @minItems 1
10
+ */
11
+ export declare type StructurePoints = {
12
+ /**
13
+ * The structure points.
14
+ * @integer
15
+ * @minimum 1
16
+ */
17
+ points: number;
18
+ }[];
19
+ /**
20
+ * If the weapon is sanctified by a god and thus restricted to it's Blessed
21
+ * Ones.
22
+ */
23
+ export declare type SanctifiedBy = {
24
+ /**
25
+ * The tradition's identifier.
26
+ * @integer
27
+ * @minimum 1
28
+ */
29
+ id: number;
30
+ };
31
+ /**
32
+ * Define if during character creation this weapon can only be bought by
33
+ * characters of a specific race or culture.
34
+ */
35
+ export declare type RestrictedToCultures = {
36
+ tag: "CulturesOfRace";
37
+ /**
38
+ * The race's identifier.
39
+ * @integer
40
+ * @minimum 1
41
+ */
42
+ id: number;
43
+ } | {
44
+ tag: "Culture";
45
+ /**
46
+ * The culture's identifier.
47
+ * @integer
48
+ * @minimum 1
49
+ */
50
+ id: number;
51
+ } | {
52
+ tag: "Cultures";
53
+ /**
54
+ * The cultures' identifiers.
55
+ * @minitems 1
56
+ */
57
+ list: {
58
+ /**
59
+ * The culture's identifier.
60
+ * @integer
61
+ * @minimum 1
62
+ */
63
+ id: number;
64
+ };
65
+ };
66
+ /**
67
+ * The primary attribute damage and threshold value. You can either use an
68
+ * integer, an object or a pair. Use an integer if you just have to define a
69
+ * single threshold value for the default primary attribute of the combat
70
+ * technique. Use an object if you need to define the value only or if you need
71
+ * to define the value as well as a single different primary attribute than
72
+ * which the combat technique uses. Use the pair if you need to set the primary
73
+ * attributes to AGI and STR (the combat technique has AGI but this item has
74
+ * AGI/STR) and/or if you need to set different thresholds for AGI and STR (e.g.
75
+ * AGI 14/STR 15). If the same values are in the pair, they will be merged (AGI
76
+ * 14/STR 14 will be AGI/STR 14).
77
+ */
78
+ declare type PrimaryAttributeDamageThreshold = {
79
+ tag: "Single";
80
+ /**
81
+ * The primary attribute(s) if different from the default primary
82
+ * attribute(s) of the combat technique.
83
+ * @minItems 1
84
+ * @uniqueItems
85
+ */
86
+ attribute?: {
87
+ /**
88
+ * The attribute's identifier.
89
+ * @integer
90
+ * @minimum 1
91
+ */
92
+ id: number;
93
+ }[];
94
+ /**
95
+ * The attribute value representing the damage threshold.
96
+ * @integer
97
+ * @minimum 1
98
+ */
99
+ threshold: number;
100
+ } | {
101
+ tag: "Differing";
102
+ /**
103
+ * A list of primary attributes, each featuring a different threshold.
104
+ * @minItems 2
105
+ * @uniqueItems
106
+ */
107
+ list: {
108
+ /**
109
+ * The primary attribute.
110
+ */
111
+ attribute: {
112
+ /**
113
+ * The attribute's identifier.
114
+ * @integer
115
+ * @minimum 1
116
+ */
117
+ id: number;
118
+ };
119
+ /**
120
+ * The attribute value representing the damage threshold.
121
+ * @integer
122
+ * @minimum 1
123
+ */
124
+ threshold: number;
125
+ }[];
126
+ };
127
+ /**
128
+ * The damage of a weapon consists of a random part using dice and an optional
129
+ * flat part.
130
+ */
131
+ declare type DamageMelee = {
132
+ /**
133
+ * How many dice of which type are rolled to get the damage.
134
+ */
135
+ dice: Dice;
136
+ /**
137
+ * Flat damage, if any. It gets added to the result of the dice rolls.
138
+ * @integer
139
+ * @default 0
140
+ */
141
+ flat?: number;
142
+ };
143
+ /**
144
+ * The damage of a ranged weapon. It consists of a random part using dice and an
145
+ * optional flat part ny default. Some ranged weapons may work different so that
146
+ * damage is either not applicable at all or it is outlined as *Special* and
147
+ * further defined in a description.
148
+ */
149
+ declare type DamageRanged = {
150
+ tag: "Default";
151
+ /**
152
+ * How many dice of which type are rolled to get the damage.
153
+ */
154
+ dice: Dice;
155
+ /**
156
+ * Flat damage, if any. It gets added to the result of the dice rolls.
157
+ * @integer
158
+ * @default 0
159
+ */
160
+ flat?: number;
161
+ } | {
162
+ tag: "NotApplicable";
163
+ } | {
164
+ tag: "Special";
165
+ };
166
+ /**
167
+ * The AT modifier.
168
+ * @integer
169
+ */
170
+ declare type Attack = number;
171
+ /**
172
+ * The PA modifier.
173
+ * @integer
174
+ */
175
+ declare type Parry = number;
176
+ /**
177
+ * The reach of the weapon.
178
+ * @integer
179
+ * @minimum 1
180
+ * @maximum 4
181
+ */
182
+ declare type Reach = number;
183
+ /**
184
+ * The length of the weapon in cm/halffingers.
185
+ * @integer
186
+ * @minimum 1
187
+ */
188
+ declare type Length = number;
189
+ /**
190
+ */
191
+ declare type ShieldSize = {
192
+ tag: "Large";
193
+ /**
194
+ * The attack penalty from the shield.
195
+ * @integer
196
+ * @default 1
197
+ */
198
+ attack_penalty?: number;
199
+ } | {
200
+ tag: "Medium";
201
+ } | {
202
+ tag: "Small";
203
+ };
204
+ /**
205
+ * @title Melee Weapon
206
+ */
207
+ export declare type MeleeWeapon = {
208
+ tag: "Melee";
209
+ /**
210
+ * The combat techniques and dependent values.
211
+ */
212
+ combat_technique: {
213
+ tag: "ChainWeapons";
214
+ damage_threshold: PrimaryAttributeDamageThreshold;
215
+ at: Attack;
216
+ reach: Reach;
217
+ length: Length;
218
+ } | {
219
+ tag: "Whips";
220
+ damage_threshold: PrimaryAttributeDamageThreshold;
221
+ at: Attack;
222
+ reach: Reach;
223
+ length: Length;
224
+ } | {
225
+ tag: "Lances";
226
+ at: Attack;
227
+ length: Length;
228
+ } | {
229
+ tag: "Shields";
230
+ size: ShieldSize;
231
+ damage_threshold: PrimaryAttributeDamageThreshold;
232
+ at: Attack;
233
+ pa: Parry;
234
+ reach: Reach;
235
+ } | {
236
+ tag: "Fans";
237
+ size: ShieldSize;
238
+ damage_threshold: PrimaryAttributeDamageThreshold;
239
+ at: Attack;
240
+ pa: Parry;
241
+ reach: Reach;
242
+ length: Length;
243
+ } | {
244
+ tag: "Default";
245
+ /**
246
+ * The close combat technique's identifier.
247
+ * @integer
248
+ * @minimum 1
249
+ */
250
+ id: number;
251
+ damage_threshold: PrimaryAttributeDamageThreshold;
252
+ at: Attack;
253
+ pa: Parry;
254
+ reach: Reach;
255
+ length: Length;
256
+ };
257
+ damage: DamageMelee;
258
+ /**
259
+ * Is the weapon a parrying weapon?
260
+ */
261
+ is_parrying_weapon: boolean;
262
+ /**
263
+ * Is the weapon a two-handed weapon?
264
+ */
265
+ is_two_handed_weapon: boolean;
266
+ };
267
+ /**
268
+ * @title Ranged Weapon
269
+ */
270
+ export declare type RangedWeapon = {
271
+ tag: "Ranged";
272
+ /**
273
+ * The combat techniques and dependent values.
274
+ */
275
+ combat_technique: {
276
+ tag: "ThrownWeapons";
277
+ } | {
278
+ tag: "Default";
279
+ /**
280
+ * The needed ammunition.
281
+ */
282
+ ammunition: {
283
+ /**
284
+ * The item's identifier.
285
+ * @integer
286
+ * @minimum 1
287
+ */
288
+ id: number;
289
+ };
290
+ };
291
+ damage: DamageRanged;
292
+ /**
293
+ * The range brackets for the weapon: close, medium, far. Distances in m.
294
+ */
295
+ range: {
296
+ /**
297
+ * The close range bracket for the weapon. Distance in m.
298
+ * @integer
299
+ * @minimum 1
300
+ */
301
+ close: number;
302
+ /**
303
+ * The medium range bracket for the weapon. Distance in m.
304
+ * @integer
305
+ * @minimum 1
306
+ */
307
+ medium: number;
308
+ /**
309
+ * The far range bracket for the weapon. Distance in m.
310
+ * @integer
311
+ * @minimum 1
312
+ */
313
+ far: number;
314
+ };
315
+ /**
316
+ * One or multiple reload times.
317
+ * @minItems 1
318
+ * @uniqueItems
319
+ */
320
+ reload_time: {
321
+ /**
322
+ * A reload time value in actions.
323
+ * @integer
324
+ * @minimum 1
325
+ */
326
+ value: number;
327
+ }[];
328
+ length: Length;
329
+ };
330
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ *
3
+ */
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.1.27",
3
+ "version": "0.2.1",
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",
@@ -287,7 +287,7 @@
287
287
  },
288
288
  "sides": {
289
289
  "description": "Number of sides on every die. Example: 6 in 2D6.",
290
- "$ref": "#/definitions/DieType"
290
+ "$ref": "./_Dice.schema.json#/definitions/DieType"
291
291
  },
292
292
  "offset_strategy": {
293
293
  "description": "The strategy how to offset the randomly generated values against the\nbase value. Either they are all added or subtracted or even results are\nadded and odd results are subtracted.",
@@ -359,7 +359,7 @@
359
359
  },
360
360
  "random": {
361
361
  "description": "The random value for the selected experience level. It is going to be\nadded to the base value.",
362
- "$ref": "#/definitions/Die"
362
+ "$ref": "./_Dice.schema.json#/definitions/Dice"
363
363
  }
364
364
  },
365
365
  "required": [
@@ -589,7 +589,7 @@
589
589
  "description": "The dice used for random height.",
590
590
  "type": "array",
591
591
  "items": {
592
- "$ref": "#/definitions/Die"
592
+ "$ref": "./_Dice.schema.json#/definitions/Dice"
593
593
  },
594
594
  "minItems": 1
595
595
  }
@@ -691,34 +691,6 @@
691
691
  "attribute_adjustments"
692
692
  ],
693
693
  "additionalProperties": false
694
- },
695
- "Die": {
696
- "title": "Die",
697
- "type": "object",
698
- "properties": {
699
- "number": {
700
- "description": "Number of dice of the same type. Example: 2 in 2D6.",
701
- "type": "integer",
702
- "minimum": 1
703
- },
704
- "sides": {
705
- "description": "Number of sides on every die. Example: 6 in 2D6.",
706
- "$ref": "#/definitions/DieType"
707
- }
708
- },
709
- "required": [
710
- "number",
711
- "sides"
712
- ],
713
- "additionalProperties": false
714
- },
715
- "DieType": {
716
- "description": "Number of sides on every dice. Example: 6 in 2D6.",
717
- "enum": [
718
- 3,
719
- 6,
720
- 20
721
- ]
722
694
  }
723
695
  }
724
696
  }