optolith-database-schema 0.1.26 → 0.2.0
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 +24 -0
- package/lib/main.js +8 -9
- package/lib/types/Race.d.ts +3 -25
- package/lib/types/Race.js +0 -9
- package/lib/types/_Activatable.d.ts +153 -114
- package/lib/types/_Activatable.js +0 -9
- package/lib/types/_Dice.d.ts +23 -0
- package/lib/types/_Dice.js +9 -0
- package/lib/types/_Identifier.d.ts +11 -2
- package/lib/types/_Identifier.js +11 -3
- package/lib/types/equipment/Item.d.ts +308 -0
- package/lib/types/equipment/Item.js +35 -0
- package/lib/types/equipment/_Armor.d.ts +70 -0
- package/lib/types/equipment/_Armor.js +4 -0
- package/lib/types/equipment/_Weapon.d.ts +330 -0
- package/lib/types/equipment/_Weapon.js +4 -0
- package/package.json +1 -1
- package/schema/Race.schema.json +3 -31
- package/schema/_Activatable.schema.json +435 -279
- package/schema/_Dice.schema.json +34 -0
- package/schema/_Identifier.schema.json +28 -0
- package/schema/equipment/Item.schema.json +621 -0
- package/schema/equipment/_Armor.schema.json +125 -0
- package/schema/equipment/_Weapon.schema.json +664 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
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.0](https://github.com/elyukai/optolith-database-schema/compare/v0.1.28...v0.2.0) (2022-03-29)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* derived select options are not a list anymore
|
|
11
|
+
|
|
12
|
+
* derived select options are not a list anymore ([fa64a60](https://github.com/elyukai/optolith-database-schema/commit/fa64a60670f0cdf5567a168f3a4eccd7ea71d367))
|
|
13
|
+
|
|
14
|
+
### [0.1.28](https://github.com/elyukai/optolith-database-schema/compare/v0.1.27...v0.1.28) (2022-03-25)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* allow skills in advanced special ability restrictions ([237dbbd](https://github.com/elyukai/optolith-database-schema/commit/237dbbdeddcc0df07387196ae2537a19c1deab16))
|
|
20
|
+
* items status quo ([c4b349b](https://github.com/elyukai/optolith-database-schema/commit/c4b349bf10fca92286c0510cab8ccb67563f0532))
|
|
21
|
+
|
|
22
|
+
### [0.1.27](https://github.com/elyukai/optolith-database-schema/compare/v0.1.26...v0.1.27) (2022-03-24)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* maximum call stack size exceeded with ui schema ([a752342](https://github.com/elyukai/optolith-database-schema/commit/a752342708b2a3e4b98e57a0adcbfd9b449d02fe))
|
|
28
|
+
|
|
5
29
|
### [0.1.26](https://github.com/elyukai/optolith-database-schema/compare/v0.1.25...v0.1.26) (2022-03-24)
|
|
6
30
|
|
|
7
31
|
|
package/lib/main.js
CHANGED
|
@@ -22,12 +22,11 @@ const readdirRecursive = async (dirPath) => {
|
|
|
22
22
|
return flattenedRecursivePaths.flat();
|
|
23
23
|
};
|
|
24
24
|
const registerAllJsonSchemaDocuments = async (validator) => {
|
|
25
|
-
const allJsonSchemaFilePaths = await readdirRecursive(jsonSchemaDir);
|
|
26
25
|
const readFileAsUtf8 = (path) => readFile(path, "utf-8");
|
|
27
26
|
const readFilesAsUtf8 = (paths) => Promise.all(paths.map(readFileAsUtf8));
|
|
28
27
|
const parseJson = (json) => JSON.parse(json);
|
|
29
28
|
const registerSchemaInValidator = (jsonSchema) => { validator.addSchema(jsonSchema); };
|
|
30
|
-
(await readFilesAsUtf8(
|
|
29
|
+
(await readFilesAsUtf8(await readdirRecursive(jsonSchemaDir)))
|
|
31
30
|
.map(parseJson)
|
|
32
31
|
.forEach(registerSchemaInValidator);
|
|
33
32
|
};
|
|
@@ -48,14 +47,11 @@ const validateAllFromType = async (validator, typeName, path) => {
|
|
|
48
47
|
const isFile = (await lstat(path)).isFile();
|
|
49
48
|
const typeValidator = typeValidatorMap[typeName];
|
|
50
49
|
if (isFile) {
|
|
51
|
-
return
|
|
50
|
+
return { [path]: typeValidator(validator, await readFile(path, "utf-8"), path) };
|
|
52
51
|
}
|
|
53
52
|
else {
|
|
54
53
|
const dataFiles = await readDataFileAssocsFromDirectory(path);
|
|
55
|
-
return [
|
|
56
|
-
typeName,
|
|
57
|
-
Object.fromEntries(dataFiles.map(([filePath, fileContent]) => [filePath, typeValidator(validator, fileContent, filePath)]))
|
|
58
|
-
];
|
|
54
|
+
return Object.fromEntries(dataFiles.map(([filePath, fileContent]) => [filePath, typeValidator(validator, fileContent, filePath)]));
|
|
59
55
|
}
|
|
60
56
|
};
|
|
61
57
|
const rawResultMapToResult = (rawResultMap) => Object.entries(rawResultMap).reduce((result, [typeName, typeResults]) => Object.entries(typeResults).reduce((outerResult, [filePath, fileResult]) => {
|
|
@@ -93,11 +89,14 @@ const rawResultMapToResult = (rawResultMap) => Object.entries(rawResultMap).redu
|
|
|
93
89
|
value: {}
|
|
94
90
|
}));
|
|
95
91
|
export const validate = async (entityDirPaths, checkIntegrity) => {
|
|
96
|
-
const validator = new Ajv();
|
|
92
|
+
const validator = new Ajv({ allErrors: true });
|
|
97
93
|
addFormats(validator);
|
|
98
94
|
await registerAllJsonSchemaDocuments(validator);
|
|
99
95
|
const rawResultMap = Object.fromEntries((await Promise.all(Object.entries(entityDirPaths)
|
|
100
|
-
.map(async ([typeName, path]) =>
|
|
96
|
+
.map(async ([typeName, path]) => [
|
|
97
|
+
typeName,
|
|
98
|
+
await validateAllFromType(validator, typeName, path)
|
|
99
|
+
]))));
|
|
101
100
|
return rawResultMapToResult(rawResultMap);
|
|
102
101
|
};
|
|
103
102
|
export const printErrors = (errorsByFile) => Object.entries(errorsByFile)
|
package/lib/types/Race.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { Errata } from "./source/_Erratum.js";
|
|
5
5
|
import { PublicationRefs } from "./source/_PublicationRef.js";
|
|
6
6
|
import { CommonnessRatedAdvantageDisadvantage } from "./_CommonnessRatedAdvantageDisadvantage.js";
|
|
7
|
+
import { Dice, DieType } from "./_Dice.js";
|
|
7
8
|
/**
|
|
8
9
|
* A playable race with stats and skills.
|
|
9
10
|
* @title Race
|
|
@@ -264,7 +265,7 @@ declare type StartingAgeConfigForExperienceLevel = {
|
|
|
264
265
|
* The random value for the selected experience level. It is going to be
|
|
265
266
|
* added to the base value.
|
|
266
267
|
*/
|
|
267
|
-
random:
|
|
268
|
+
random: Dice;
|
|
268
269
|
};
|
|
269
270
|
/**
|
|
270
271
|
* The race may have variants and associated configuration for each variant.
|
|
@@ -404,7 +405,7 @@ declare type Height = {
|
|
|
404
405
|
* The dice used for random height.
|
|
405
406
|
* @minItems 1
|
|
406
407
|
*/
|
|
407
|
-
random:
|
|
408
|
+
random: Dice[];
|
|
408
409
|
};
|
|
409
410
|
declare type RaceVariantTranslation = {
|
|
410
411
|
/**
|
|
@@ -498,28 +499,5 @@ declare type RaceTranslation = {
|
|
|
498
499
|
uncommon_disadvantages?: string;
|
|
499
500
|
errata?: Errata;
|
|
500
501
|
};
|
|
501
|
-
/**
|
|
502
|
-
* @title Die
|
|
503
|
-
*/
|
|
504
|
-
declare type Die = {
|
|
505
|
-
/**
|
|
506
|
-
* Number of dice of the same type. Example: 2 in 2D6.
|
|
507
|
-
* @integer
|
|
508
|
-
* @minimum 1
|
|
509
|
-
*/
|
|
510
|
-
number: number;
|
|
511
|
-
/**
|
|
512
|
-
* Number of sides on every die. Example: 6 in 2D6.
|
|
513
|
-
*/
|
|
514
|
-
sides: DieType;
|
|
515
|
-
};
|
|
516
|
-
/**
|
|
517
|
-
* Number of sides on every dice. Example: 6 in 2D6.
|
|
518
|
-
*/
|
|
519
|
-
declare enum DieType {
|
|
520
|
-
D3 = 3,
|
|
521
|
-
D6 = 6,
|
|
522
|
-
D20 = 20
|
|
523
|
-
}
|
|
524
502
|
export declare const validateSchema: import("../validation/schema.js").TypeValidator<Race>;
|
|
525
503
|
export {};
|
package/lib/types/Race.js
CHANGED
|
@@ -2,13 +2,4 @@
|
|
|
2
2
|
* @main Race
|
|
3
3
|
*/
|
|
4
4
|
import { validateSchemaCreator } from "../validation/schema.js";
|
|
5
|
-
/**
|
|
6
|
-
* Number of sides on every dice. Example: 6 in 2D6.
|
|
7
|
-
*/
|
|
8
|
-
var DieType;
|
|
9
|
-
(function (DieType) {
|
|
10
|
-
DieType[DieType["D3"] = 3] = "D3";
|
|
11
|
-
DieType[DieType["D6"] = 6] = "D6";
|
|
12
|
-
DieType[DieType["D20"] = 20] = "D20";
|
|
13
|
-
})(DieType || (DieType = {}));
|
|
14
5
|
export const validateSchema = validateSchemaCreator(import.meta.url);
|
|
@@ -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, CombatTechniqueTag, MagicalTraditionIdentifier, PatronIdentifier, SkillIdentifier, SkillWithEnhancementsTag, 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
|
-
*
|
|
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,107 +204,146 @@ declare type CategoryOption = {
|
|
|
204
204
|
} | {
|
|
205
205
|
tag: "Skills";
|
|
206
206
|
/**
|
|
207
|
-
*
|
|
207
|
+
* A list of skill categories.
|
|
208
208
|
* @minItems 1
|
|
209
209
|
*/
|
|
210
|
-
|
|
210
|
+
categories: ({
|
|
211
|
+
tag: "Skills";
|
|
211
212
|
/**
|
|
212
|
-
*
|
|
213
|
-
* @integer
|
|
214
|
-
* @minimum 1
|
|
215
|
-
* @maximum 5
|
|
216
|
-
*/
|
|
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";
|
|
227
|
-
};
|
|
228
|
-
/**
|
|
229
|
-
* The list of specific skills.
|
|
213
|
+
* Only include entries of the specified groups.
|
|
230
214
|
* @minItems 1
|
|
231
|
-
* @uniqueItems
|
|
232
215
|
*/
|
|
233
|
-
|
|
216
|
+
groups?: {
|
|
234
217
|
/**
|
|
235
|
-
* The skill's identifier.
|
|
218
|
+
* The skill group's identifier.
|
|
236
219
|
* @integer
|
|
237
220
|
* @minimum 1
|
|
238
|
-
* @maximum
|
|
221
|
+
* @maximum 5
|
|
239
222
|
*/
|
|
240
223
|
id: number;
|
|
241
224
|
}[];
|
|
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
225
|
/**
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
* @minimum 1
|
|
226
|
+
* Only include (`Intersection`) or exclude (`Difference`) specific
|
|
227
|
+
* skills.
|
|
256
228
|
*/
|
|
257
|
-
|
|
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
|
+
}[];
|
|
249
|
+
};
|
|
258
250
|
/**
|
|
259
|
-
*
|
|
260
|
-
*
|
|
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.
|
|
256
|
+
* @minItems 1
|
|
261
257
|
*/
|
|
262
|
-
|
|
258
|
+
skill_applications?: {
|
|
263
259
|
/**
|
|
264
|
-
*
|
|
260
|
+
* The application's identifier. An entry-unique, increasing integer.
|
|
261
|
+
* @integer
|
|
262
|
+
* @minimum 1
|
|
265
263
|
*/
|
|
266
|
-
|
|
264
|
+
id: number;
|
|
265
|
+
/**
|
|
266
|
+
* All translations for the entry, identified by IETF language tag
|
|
267
|
+
* (BCP47).
|
|
268
|
+
* @minProperties 1
|
|
269
|
+
*/
|
|
270
|
+
translations?: {
|
|
267
271
|
/**
|
|
268
|
-
*
|
|
269
|
-
* name.
|
|
270
|
-
* @minLength 1
|
|
272
|
+
* @patternProperties ^[a-z]{2}-[A-Z]{2}$
|
|
271
273
|
*/
|
|
272
|
-
|
|
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
|
+
};
|
|
273
283
|
};
|
|
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?: {
|
|
284
|
+
}[];
|
|
285
285
|
/**
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
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
|
|
289
292
|
*/
|
|
290
|
-
|
|
293
|
+
skill_uses?: {
|
|
294
|
+
/**
|
|
295
|
+
* The use's identifier. An entry-unique, increasing integer.
|
|
296
|
+
* @integer
|
|
297
|
+
* @minimum 1
|
|
298
|
+
*/
|
|
299
|
+
id: number;
|
|
300
|
+
/**
|
|
301
|
+
* All translations for the entry, identified by IETF language tag
|
|
302
|
+
* (BCP47).
|
|
303
|
+
* @minProperties 1
|
|
304
|
+
*/
|
|
305
|
+
translations?: {
|
|
306
|
+
/**
|
|
307
|
+
* @patternProperties ^[a-z]{2}-[A-Z]{2}$
|
|
308
|
+
*/
|
|
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
|
+
};
|
|
317
|
+
};
|
|
318
|
+
}[];
|
|
319
|
+
} | {
|
|
320
|
+
tag: SkillWithEnhancementsTag;
|
|
291
321
|
/**
|
|
292
|
-
*
|
|
293
|
-
*
|
|
322
|
+
* Only include (`Intersection`) or exclude (`Difference`) specific
|
|
323
|
+
* entries.
|
|
294
324
|
*/
|
|
295
|
-
|
|
325
|
+
specific?: {
|
|
326
|
+
operation: {
|
|
327
|
+
tag: "Intersection";
|
|
328
|
+
} | {
|
|
329
|
+
tag: "Difference";
|
|
330
|
+
};
|
|
296
331
|
/**
|
|
297
|
-
*
|
|
332
|
+
* The list of specific entries.
|
|
333
|
+
* @minItems 1
|
|
334
|
+
* @uniqueItems
|
|
298
335
|
*/
|
|
299
|
-
|
|
336
|
+
list: {
|
|
300
337
|
/**
|
|
301
|
-
* The
|
|
302
|
-
* @
|
|
338
|
+
* The entry's identifier.
|
|
339
|
+
* @integer
|
|
340
|
+
* @minimum 1
|
|
341
|
+
* @maximum 59
|
|
303
342
|
*/
|
|
304
|
-
|
|
305
|
-
};
|
|
343
|
+
id: number;
|
|
344
|
+
}[];
|
|
306
345
|
};
|
|
307
|
-
}[];
|
|
346
|
+
})[];
|
|
308
347
|
/**
|
|
309
348
|
* Generate prerequisites for each entry of the category.
|
|
310
349
|
* @minItems 1
|
|
@@ -313,51 +352,51 @@ declare type CategoryOption = {
|
|
|
313
352
|
/**
|
|
314
353
|
* Generate AP values for each entry.
|
|
315
354
|
*/
|
|
316
|
-
ap_value?: OptionSkillDeriveAdventurePointsValue
|
|
317
|
-
|
|
318
|
-
tag: NonSkillSkillCategory;
|
|
319
|
-
/**
|
|
320
|
-
* Only include (`Intersection`) or exclude (`Difference`) specific entries.
|
|
321
|
-
*/
|
|
322
|
-
specific?: {
|
|
323
|
-
operation: {
|
|
324
|
-
tag: "Intersection";
|
|
325
|
-
} | {
|
|
326
|
-
tag: "Difference";
|
|
327
|
-
};
|
|
355
|
+
ap_value?: OptionSkillDeriveAdventurePointsValue<SkillIdentifier> | {
|
|
356
|
+
tag: "CombatTechniques";
|
|
328
357
|
/**
|
|
329
|
-
*
|
|
358
|
+
* A list of combat technique categories.
|
|
330
359
|
* @minItems 1
|
|
331
|
-
* @uniqueItems
|
|
332
360
|
*/
|
|
333
|
-
|
|
361
|
+
categories: {
|
|
362
|
+
tag: CombatTechniqueTag;
|
|
334
363
|
/**
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
* @minimum 1
|
|
338
|
-
* @maximum 59
|
|
364
|
+
* Only include (`Intersection`) or exclude (`Difference`) specific
|
|
365
|
+
* entries.
|
|
339
366
|
*/
|
|
340
|
-
|
|
367
|
+
specific?: {
|
|
368
|
+
operation: {
|
|
369
|
+
tag: "Intersection";
|
|
370
|
+
} | {
|
|
371
|
+
tag: "Difference";
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* The list of specific entries.
|
|
375
|
+
* @minItems 1
|
|
376
|
+
* @uniqueItems
|
|
377
|
+
*/
|
|
378
|
+
list: {
|
|
379
|
+
/**
|
|
380
|
+
* The entry's identifier.
|
|
381
|
+
* @integer
|
|
382
|
+
* @minimum 1
|
|
383
|
+
* @maximum 59
|
|
384
|
+
*/
|
|
385
|
+
id: number;
|
|
386
|
+
}[];
|
|
387
|
+
};
|
|
341
388
|
}[];
|
|
389
|
+
/**
|
|
390
|
+
* Generate prerequisites for each entry of the category.
|
|
391
|
+
* @minItems 1
|
|
392
|
+
*/
|
|
393
|
+
prerequisites?: (OptionSkillSelfPrerequisite | OptionOptionPrerequisite)[];
|
|
394
|
+
/**
|
|
395
|
+
* Generate AP values for each entry.
|
|
396
|
+
*/
|
|
397
|
+
ap_value?: OptionSkillDeriveAdventurePointsValue<CombatTechniqueIdentifier>;
|
|
342
398
|
};
|
|
343
|
-
/**
|
|
344
|
-
* Generate prerequisites for each entry of the category.
|
|
345
|
-
* @minItems 1
|
|
346
|
-
*/
|
|
347
|
-
prerequisites?: (OptionSkillSelfPrerequisite | OptionOptionPrerequisite)[];
|
|
348
|
-
/**
|
|
349
|
-
* Generate AP values for each entry.
|
|
350
|
-
*/
|
|
351
|
-
ap_value?: OptionSkillDeriveAdventurePointsValue;
|
|
352
399
|
};
|
|
353
|
-
declare enum NonSkillSkillCategory {
|
|
354
|
-
CloseCombatTechniques = "CloseCombatTechniques",
|
|
355
|
-
RangedCombatTechniques = "RangedCombatTechniques",
|
|
356
|
-
LiturgicalChants = "LiturgicalChants",
|
|
357
|
-
Ceremonies = "Ceremonies",
|
|
358
|
-
Spells = "Spells",
|
|
359
|
-
Rituals = "Rituals"
|
|
360
|
-
}
|
|
361
400
|
declare type OptionSkillSelfPrerequisite = {
|
|
362
401
|
tag: "Self";
|
|
363
402
|
/**
|
|
@@ -390,7 +429,7 @@ declare type OptionOptionPrerequisite = {
|
|
|
390
429
|
/**
|
|
391
430
|
* Generate AP values for each entry.
|
|
392
431
|
*/
|
|
393
|
-
declare type OptionSkillDeriveAdventurePointsValue = {
|
|
432
|
+
declare type OptionSkillDeriveAdventurePointsValue<Identifier> = {
|
|
394
433
|
tag: "DerivedFromImprovementCost";
|
|
395
434
|
/**
|
|
396
435
|
* This number is multiplied with the improvement cost of the entry
|
|
@@ -410,7 +449,7 @@ declare type OptionSkillDeriveAdventurePointsValue = {
|
|
|
410
449
|
* @integer
|
|
411
450
|
* @minimum 1
|
|
412
451
|
*/
|
|
413
|
-
id:
|
|
452
|
+
id: Identifier;
|
|
414
453
|
/**
|
|
415
454
|
* The AP value for the specified entry.
|
|
416
455
|
* @integer
|
|
@@ -2,15 +2,6 @@
|
|
|
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 = {}));
|
|
14
5
|
export {};
|
|
15
6
|
// "Input": {
|
|
16
7
|
// "description": "A string that is used as a placeholder text for an input field.",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title Dice
|
|
3
|
+
*/
|
|
4
|
+
export declare type Dice = {
|
|
5
|
+
/**
|
|
6
|
+
* Number of dice of the same type. Example: 2 in 2D6.
|
|
7
|
+
* @integer
|
|
8
|
+
* @minimum 1
|
|
9
|
+
*/
|
|
10
|
+
number: number;
|
|
11
|
+
/**
|
|
12
|
+
* Number of sides on every die. Example: 6 in 2D6.
|
|
13
|
+
*/
|
|
14
|
+
sides: DieType;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Number of sides on every dice. Example: 6 in 2D6.
|
|
18
|
+
*/
|
|
19
|
+
export declare enum DieType {
|
|
20
|
+
D3 = 3,
|
|
21
|
+
D6 = 6,
|
|
22
|
+
D20 = 20
|
|
23
|
+
}
|
|
@@ -108,15 +108,23 @@ 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",
|
|
120
|
+
Skill = "Skill",
|
|
113
121
|
Element = "Element"
|
|
114
122
|
}
|
|
115
123
|
declare enum VolumePointsOptionReferenceTag {
|
|
116
124
|
General = "General",
|
|
117
125
|
AnimalShapeSize = "AnimalShapeSize"
|
|
118
126
|
}
|
|
119
|
-
declare enum CombatTechniqueTag {
|
|
127
|
+
export declare enum CombatTechniqueTag {
|
|
120
128
|
CloseCombatTechnique = "CloseCombatTechnique",
|
|
121
129
|
RangedCombatTechnique = "RangedCombatTechnique"
|
|
122
130
|
}
|
|
@@ -130,7 +138,7 @@ declare enum ExtensionRuleTag {
|
|
|
130
138
|
FocusRule = "FocusRule",
|
|
131
139
|
OptionalRule = "OptionalRule"
|
|
132
140
|
}
|
|
133
|
-
declare enum SkillWithEnhancementsTag {
|
|
141
|
+
export declare enum SkillWithEnhancementsTag {
|
|
134
142
|
Spell = "Spell",
|
|
135
143
|
Ritual = "Ritual",
|
|
136
144
|
LiturgicalChant = "LiturgicalChant",
|
|
@@ -182,6 +190,7 @@ export declare type ActivatableIdentifier = TaggedIdentifier<ActivatableTag>;
|
|
|
182
190
|
export declare type SpecialAbilityIdentifier = TaggedIdentifier<SpecialAbilityTag>;
|
|
183
191
|
export declare type CombatRelatedSpecialAbilityIdentifier = TaggedIdentifier<CombatRelatedSpecialAbilityTag>;
|
|
184
192
|
export declare type RatedIdentifier = TaggedIdentifier<RatedTag>;
|
|
193
|
+
export declare type SkillIdentifier = TaggedIdentifier<SkillTag>;
|
|
185
194
|
export declare type AdvancedSpecialAbilityRestrictedOptionIdentifier = TaggedIdentifier<AdvancedSpecialAbilityRestrictedOptionTag>;
|
|
186
195
|
export declare type VolumePointsOptionReferenceIdentifier = TaggedIdentifier<VolumePointsOptionReferenceTag>;
|
|
187
196
|
export declare type CombatTechniqueIdentifier = TaggedIdentifier<CombatTechniqueTag>;
|
package/lib/types/_Identifier.js
CHANGED
|
@@ -112,9 +112,18 @@ 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";
|
|
126
|
+
AdvancedSpecialAbilityRestrictedOptionTag["Skill"] = "Skill";
|
|
118
127
|
AdvancedSpecialAbilityRestrictedOptionTag["Element"] = "Element";
|
|
119
128
|
})(AdvancedSpecialAbilityRestrictedOptionTag || (AdvancedSpecialAbilityRestrictedOptionTag = {}));
|
|
120
129
|
var VolumePointsOptionReferenceTag;
|
|
@@ -122,7 +131,7 @@ var VolumePointsOptionReferenceTag;
|
|
|
122
131
|
VolumePointsOptionReferenceTag["General"] = "General";
|
|
123
132
|
VolumePointsOptionReferenceTag["AnimalShapeSize"] = "AnimalShapeSize";
|
|
124
133
|
})(VolumePointsOptionReferenceTag || (VolumePointsOptionReferenceTag = {}));
|
|
125
|
-
var CombatTechniqueTag;
|
|
134
|
+
export var CombatTechniqueTag;
|
|
126
135
|
(function (CombatTechniqueTag) {
|
|
127
136
|
CombatTechniqueTag["CloseCombatTechnique"] = "CloseCombatTechnique";
|
|
128
137
|
CombatTechniqueTag["RangedCombatTechnique"] = "RangedCombatTechnique";
|
|
@@ -140,7 +149,7 @@ var ExtensionRuleTag;
|
|
|
140
149
|
ExtensionRuleTag["FocusRule"] = "FocusRule";
|
|
141
150
|
ExtensionRuleTag["OptionalRule"] = "OptionalRule";
|
|
142
151
|
})(ExtensionRuleTag || (ExtensionRuleTag = {}));
|
|
143
|
-
var SkillWithEnhancementsTag;
|
|
152
|
+
export var SkillWithEnhancementsTag;
|
|
144
153
|
(function (SkillWithEnhancementsTag) {
|
|
145
154
|
SkillWithEnhancementsTag["Spell"] = "Spell";
|
|
146
155
|
SkillWithEnhancementsTag["Ritual"] = "Ritual";
|
|
@@ -185,4 +194,3 @@ var CoreRuleDerivableContentTag;
|
|
|
185
194
|
CoreRuleDerivableContentTag["MagicalSpecialAbility"] = "MagicalSpecialAbility";
|
|
186
195
|
CoreRuleDerivableContentTag["BlessedTradition"] = "BlessedTradition";
|
|
187
196
|
})(CoreRuleDerivableContentTag || (CoreRuleDerivableContentTag = {}));
|
|
188
|
-
export {};
|