@optolith/database-schema 0.74.0 → 0.76.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 +30 -0
- package/gen/types.d.ts +495 -94
- package/lib/cache/activatableSelectOptions.js +74 -33
- package/lib/cache/index.d.ts +1 -10
- package/lib/cache/index.js +10 -6
- package/lib/cache/internal.d.ts +2 -2
- package/lib/cache/magicalAndBlessedAdvantagesAndDisadvantages.js +14 -14
- package/lib/cache/tradeSecrets.js +3 -3
- package/lib/main.d.ts +3 -1
- package/lib/main.js +1 -0
- package/lib/types/Advantage.d.ts +123 -2
- package/lib/types/AnimalDisease.d.ts +6 -3
- package/lib/types/Ceremony.d.ts +13 -4
- package/lib/types/Disadvantage.d.ts +123 -2
- package/lib/types/Disease.d.ts +6 -3
- package/lib/types/LiturgicalChant.d.ts +13 -4
- package/lib/types/Locale.d.ts +4 -2
- package/lib/types/Locale.js +4 -2
- package/lib/types/Profession.d.ts +7 -0
- package/lib/types/Profession.js +8 -1
- package/lib/types/Ritual.d.ts +13 -4
- package/lib/types/Settings.d.ts +129 -0
- package/lib/types/Settings.js +83 -0
- package/lib/types/Spell.d.ts +13 -4
- package/lib/types/_ActivatableAdventurePointsValue.d.ts +2 -0
- package/lib/types/_ActivatableMagical.d.ts +2 -0
- package/lib/types/_ActivatableMagical.js +2 -0
- package/lib/types/_ActivatableNonMundane.d.ts +5 -0
- package/lib/types/_ActivatableSelectOptionCategory.d.ts +240 -4
- package/lib/types/_ActivatableSelectOptionCategory.js +19 -7
- package/lib/types/_ActivatableSelectOptions.d.ts +120 -2
- package/lib/types/_ActivatableSkill.d.ts +10 -0
- package/lib/types/_ActivatableSkillCost.d.ts +5 -0
- package/lib/types/_ActivatableSkillParameterMap.d.ts +2 -0
- package/lib/types/_ActivatableSkillParameterMap.js +13 -3
- package/lib/types/_DiseasePoison.d.ts +12 -6
- package/lib/types/_DiseasePoison.js +40 -5
- package/lib/types/_Identifier.d.ts +1 -0
- package/lib/types/_Identifier.js +2 -1
- package/lib/types/_SkillCheck.d.ts +9 -4
- package/lib/types/_SkillCheck.js +51 -5
- package/lib/types/equipment/item/Poison.d.ts +6 -3
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/magicalActions/AnimistPower.d.ts +9 -4
- package/lib/types/magicalActions/Bannzeichen.d.ts +1 -0
- package/lib/types/magicalActions/Curse.d.ts +9 -4
- package/lib/types/magicalActions/DominationRitual.d.ts +9 -4
- package/lib/types/magicalActions/ElvenMagicalSong.d.ts +9 -4
- package/lib/types/magicalActions/GeodeRitual.d.ts +1 -0
- package/lib/types/magicalActions/GoblinRitual.d.ts +9 -4
- package/lib/types/magicalActions/JesterTrick.d.ts +9 -4
- package/lib/types/magicalActions/MagicalMelody.d.ts +9 -4
- package/lib/types/magicalActions/ZibiljaRitual.d.ts +11 -4
- package/lib/types/specialAbility/AdvancedCombatSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/AdvancedSkillSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/AncestorGlyph.d.ts +121 -2
- package/lib/types/specialAbility/BlessedTradition.d.ts +121 -2
- package/lib/types/specialAbility/BrawlingSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/CeremonialItemSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/CombatSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/CombatStyleSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/CommandSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/FamiliarSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/FatePointSexSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/FatePointSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/GeneralSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/KarmaSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/LycantropicGift.d.ts +121 -2
- package/lib/types/specialAbility/MagicStyleSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/MagicalSign.d.ts +1 -0
- package/lib/types/specialAbility/MagicalSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/MagicalTradition.d.ts +121 -2
- package/lib/types/specialAbility/PactGift.d.ts +121 -2
- package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/Sermon.d.ts +121 -2
- package/lib/types/specialAbility/SexSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/SikaryanDrainSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/SkillStyleSpecialAbility.d.ts +121 -2
- package/lib/types/specialAbility/VampiricGift.d.ts +121 -2
- package/lib/types/specialAbility/Vision.d.ts +121 -2
- package/lib/types/specialAbility/sub/TradeSecret.d.ts +121 -2
- package/lib/types/traditionArtifacts/ArcaneOrbEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/AttireEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/Beutelzauber.d.ts +124 -2
- package/lib/types/traditionArtifacts/BowlEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/CauldronEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/ChronicleEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/DaggerRitual.d.ts +124 -2
- package/lib/types/traditionArtifacts/FoolsHatEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/Haubenzauber.d.ts +124 -2
- package/lib/types/traditionArtifacts/Hauerkettenzauber.d.ts +4 -0
- package/lib/types/traditionArtifacts/InstrumentEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/Keulenzauber.d.ts +4 -0
- package/lib/types/traditionArtifacts/Krallenkettenzauber.d.ts +124 -2
- package/lib/types/traditionArtifacts/Kristallkugelzauber.d.ts +124 -2
- package/lib/types/traditionArtifacts/OrbEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/RingEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/Schweinetrommelzauber.d.ts +4 -0
- package/lib/types/traditionArtifacts/SickleRitual.d.ts +124 -2
- package/lib/types/traditionArtifacts/SpellSwordEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/StaffEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/ToyEnchantment.d.ts +124 -2
- package/lib/types/traditionArtifacts/Trinkhornzauber.d.ts +124 -2
- package/lib/types/traditionArtifacts/WandEnchantment.d.ts +123 -2
- package/lib/types/traditionArtifacts/WeaponEnchantment.d.ts +124 -2
- package/package.json +6 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { on } from "@elyukai/utils/function";
|
|
1
|
+
import { constant, on } from "@elyukai/utils/function";
|
|
2
2
|
import { isNotNullish } from "@elyukai/utils/nullable";
|
|
3
3
|
import { mapObject } from "@elyukai/utils/object";
|
|
4
4
|
import { compareNullish, compareNumber } from "@elyukai/utils/ordering";
|
|
@@ -155,10 +155,12 @@ const getDerivedSkillishSelectOptions = (database, entryId, entity, category, op
|
|
|
155
155
|
};
|
|
156
156
|
});
|
|
157
157
|
};
|
|
158
|
-
const getDerivedSelectOptions = (selectOptionCategory, entryId, database
|
|
158
|
+
const getDerivedSelectOptions = (selectOptionCategory, entryId, database) => {
|
|
159
159
|
switch (selectOptionCategory.kind) {
|
|
160
160
|
case "Blessings":
|
|
161
|
-
return database
|
|
161
|
+
return database
|
|
162
|
+
.getAllInstanceContainersOfEntity("Blessing")
|
|
163
|
+
.map(({ id, content }) => ({
|
|
162
164
|
id: Case("Blessing", id),
|
|
163
165
|
content: {
|
|
164
166
|
parent: entryId,
|
|
@@ -169,7 +171,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
169
171
|
uses: [],
|
|
170
172
|
}));
|
|
171
173
|
case "Cantrips":
|
|
172
|
-
return database
|
|
174
|
+
return database
|
|
175
|
+
.getAllInstanceContainersOfEntity("Cantrip")
|
|
176
|
+
.map(({ id, content }) => ({
|
|
173
177
|
id: Case("Cantrip", id),
|
|
174
178
|
content: {
|
|
175
179
|
parent: entryId,
|
|
@@ -180,7 +184,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
180
184
|
uses: [],
|
|
181
185
|
}));
|
|
182
186
|
case "TradeSecrets":
|
|
183
|
-
return database
|
|
187
|
+
return database
|
|
188
|
+
.getAllInstanceContainersOfEntity("TradeSecret")
|
|
189
|
+
.map(({ id, content }) => ({
|
|
184
190
|
id: Case("TradeSecret", id),
|
|
185
191
|
content: {
|
|
186
192
|
parent: entryId,
|
|
@@ -196,7 +202,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
196
202
|
uses: [],
|
|
197
203
|
}));
|
|
198
204
|
case "Scripts":
|
|
199
|
-
return database
|
|
205
|
+
return database
|
|
206
|
+
.getAllInstanceContainersOfEntity("Script")
|
|
207
|
+
.map(({ id, content }) => ({
|
|
200
208
|
id: Case("Script", id),
|
|
201
209
|
content: {
|
|
202
210
|
parent: entryId,
|
|
@@ -268,7 +276,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
268
276
|
});
|
|
269
277
|
}
|
|
270
278
|
case "ArcaneBardTraditions":
|
|
271
|
-
return database
|
|
279
|
+
return database
|
|
280
|
+
.getAllInstanceContainersOfEntity("ArcaneBardTradition")
|
|
281
|
+
.map(({ id, content }) => ({
|
|
272
282
|
id: Case("ArcaneBardTradition", id),
|
|
273
283
|
content: {
|
|
274
284
|
parent: entryId,
|
|
@@ -284,7 +294,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
284
294
|
uses: [],
|
|
285
295
|
}));
|
|
286
296
|
case "ArcaneDancerTraditions":
|
|
287
|
-
return database
|
|
297
|
+
return database
|
|
298
|
+
.getAllInstanceContainersOfEntity("ArcaneDancerTradition")
|
|
299
|
+
.map(({ id, content }) => ({
|
|
288
300
|
id: Case("ArcaneDancerTradition", id),
|
|
289
301
|
content: {
|
|
290
302
|
parent: entryId,
|
|
@@ -300,7 +312,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
300
312
|
uses: [],
|
|
301
313
|
}));
|
|
302
314
|
case "SexPractices":
|
|
303
|
-
return database
|
|
315
|
+
return database
|
|
316
|
+
.getAllInstanceContainersOfEntity("SexPractice")
|
|
317
|
+
.map(({ id, content }) => ({
|
|
304
318
|
id: Case("SexPractice", id),
|
|
305
319
|
content: {
|
|
306
320
|
parent: entryId,
|
|
@@ -313,7 +327,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
313
327
|
uses: [],
|
|
314
328
|
}));
|
|
315
329
|
case "Races":
|
|
316
|
-
return database
|
|
330
|
+
return database
|
|
331
|
+
.getAllInstanceContainersOfEntity("Race")
|
|
332
|
+
.map(({ id, content }) => ({
|
|
317
333
|
id: Case("Race", id),
|
|
318
334
|
content: {
|
|
319
335
|
parent: entryId,
|
|
@@ -326,7 +342,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
326
342
|
uses: [],
|
|
327
343
|
}));
|
|
328
344
|
case "Cultures":
|
|
329
|
-
return database
|
|
345
|
+
return database
|
|
346
|
+
.getAllInstanceContainersOfEntity("Culture")
|
|
347
|
+
.map(({ id, content }) => ({
|
|
330
348
|
id: Case("Culture", id),
|
|
331
349
|
content: {
|
|
332
350
|
parent: entryId,
|
|
@@ -340,7 +358,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
340
358
|
}));
|
|
341
359
|
case "RacesAndCultures":
|
|
342
360
|
return [
|
|
343
|
-
...database
|
|
361
|
+
...database
|
|
362
|
+
.getAllInstanceContainersOfEntity("Race")
|
|
363
|
+
.map(({ id, content }) => ({
|
|
344
364
|
id: Case("Race", id),
|
|
345
365
|
content: {
|
|
346
366
|
parent: entryId,
|
|
@@ -352,7 +372,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
352
372
|
newApplications: [],
|
|
353
373
|
uses: [],
|
|
354
374
|
})),
|
|
355
|
-
...database
|
|
375
|
+
...database
|
|
376
|
+
.getAllInstanceContainersOfEntity("Culture")
|
|
377
|
+
.map(({ id, content }) => ({
|
|
356
378
|
id: Case("Culture", id),
|
|
357
379
|
content: {
|
|
358
380
|
parent: entryId,
|
|
@@ -366,7 +388,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
366
388
|
})),
|
|
367
389
|
];
|
|
368
390
|
case "HomunculusTypes":
|
|
369
|
-
return database
|
|
391
|
+
return database
|
|
392
|
+
.getAllInstanceContainersOfEntity("HomunculusType")
|
|
393
|
+
.map(({ id, content }) => ({
|
|
370
394
|
id: Case("HomunculusType", id),
|
|
371
395
|
content: {
|
|
372
396
|
parent: entryId,
|
|
@@ -398,7 +422,12 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
398
422
|
}
|
|
399
423
|
return undefined;
|
|
400
424
|
};
|
|
401
|
-
return database
|
|
425
|
+
return database
|
|
426
|
+
.getAllInstanceContainersOfEntity("BlessedTradition")
|
|
427
|
+
.filter(selectOptionCategory.BlessedTraditions.onlyType
|
|
428
|
+
? ({ content }) => content.type.kind === selectOptionCategory.BlessedTraditions.onlyType?.kind
|
|
429
|
+
: constant(true))
|
|
430
|
+
.map(({ id, content }) => ({
|
|
402
431
|
id: Case("BlessedTradition", id),
|
|
403
432
|
content: {
|
|
404
433
|
parent: entryId,
|
|
@@ -435,13 +464,13 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
435
464
|
}
|
|
436
465
|
case "Properties": {
|
|
437
466
|
const getPrerequisites = (id) => {
|
|
438
|
-
if (selectOptionCategory.Properties.
|
|
467
|
+
if (selectOptionCategory.Properties.requireActiveSelectionOnEntry !== undefined ||
|
|
439
468
|
selectOptionCategory.Properties.require_minimum_spellworks_on !== undefined) {
|
|
440
|
-
const knowledgePrerequisite = selectOptionCategory.Properties.
|
|
469
|
+
const knowledgePrerequisite = selectOptionCategory.Properties.requireActiveSelectionOnEntry !== undefined
|
|
441
470
|
? {
|
|
442
471
|
level: 1,
|
|
443
472
|
prerequisite: Case("Single", Case("Activatable", {
|
|
444
|
-
id:
|
|
473
|
+
id: selectOptionCategory.Properties.requireActiveSelectionOnEntry,
|
|
445
474
|
active: true,
|
|
446
475
|
options: [Case("Property", id)],
|
|
447
476
|
})),
|
|
@@ -463,7 +492,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
463
492
|
}
|
|
464
493
|
return undefined;
|
|
465
494
|
};
|
|
466
|
-
return database
|
|
495
|
+
return database
|
|
496
|
+
.getAllInstanceContainersOfEntity("Property")
|
|
497
|
+
.map(({ id, content }) => ({
|
|
467
498
|
id: Case("Property", id),
|
|
468
499
|
content: {
|
|
469
500
|
parent: entryId,
|
|
@@ -478,13 +509,13 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
478
509
|
}
|
|
479
510
|
case "Aspects": {
|
|
480
511
|
const getPrerequisites = (id) => {
|
|
481
|
-
if (selectOptionCategory.Aspects.
|
|
512
|
+
if (selectOptionCategory.Aspects.requireActiveSelectionOnEntry !== undefined ||
|
|
482
513
|
selectOptionCategory.Aspects.require_minimum_liturgies_on !== undefined) {
|
|
483
|
-
const knowledgePrerequisite = selectOptionCategory.Aspects.
|
|
514
|
+
const knowledgePrerequisite = selectOptionCategory.Aspects.requireActiveSelectionOnEntry !== undefined
|
|
484
515
|
? {
|
|
485
516
|
level: 1,
|
|
486
517
|
prerequisite: Case("Single", Case("Activatable", {
|
|
487
|
-
id:
|
|
518
|
+
id: selectOptionCategory.Aspects.requireActiveSelectionOnEntry,
|
|
488
519
|
active: true,
|
|
489
520
|
options: [Case("Aspect", id)],
|
|
490
521
|
})),
|
|
@@ -525,7 +556,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
525
556
|
}))
|
|
526
557
|
.filter(value => Object.keys(value.content.translations).length > 0);
|
|
527
558
|
}
|
|
528
|
-
return database
|
|
559
|
+
return database
|
|
560
|
+
.getAllInstanceContainersOfEntity("Aspect")
|
|
561
|
+
.map(({ id, content }) => ({
|
|
529
562
|
id: Case("Aspect", id),
|
|
530
563
|
content: {
|
|
531
564
|
parent: entryId,
|
|
@@ -539,7 +572,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
539
572
|
}));
|
|
540
573
|
}
|
|
541
574
|
case "Diseases":
|
|
542
|
-
return database
|
|
575
|
+
return database
|
|
576
|
+
.getAllInstanceContainersOfEntity("Disease")
|
|
577
|
+
.map(({ id, content }) => ({
|
|
543
578
|
id: Case("Disease", id),
|
|
544
579
|
content: {
|
|
545
580
|
parent: entryId,
|
|
@@ -588,7 +623,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
588
623
|
return assertExhaustive(poison.source_type);
|
|
589
624
|
}
|
|
590
625
|
};
|
|
591
|
-
return database
|
|
626
|
+
return database
|
|
627
|
+
.getAllInstanceContainersOfEntity("Poison")
|
|
628
|
+
.map(({ id, content }) => ({
|
|
592
629
|
id: Case("Poison", id),
|
|
593
630
|
content: {
|
|
594
631
|
parent: entryId,
|
|
@@ -619,7 +656,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
619
656
|
}
|
|
620
657
|
return undefined;
|
|
621
658
|
};
|
|
622
|
-
return database
|
|
659
|
+
return database
|
|
660
|
+
.getAllInstanceContainersOfEntity("Language")
|
|
661
|
+
.map(({ id, content }) => ({
|
|
623
662
|
id: Case("Language", id),
|
|
624
663
|
content: {
|
|
625
664
|
parent: entryId,
|
|
@@ -695,7 +734,9 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database, idMap)
|
|
|
695
734
|
return assertExhaustive(selectOptionCategory);
|
|
696
735
|
}
|
|
697
736
|
};
|
|
698
|
-
const getExplicitSelectOptions = (id, database) => database
|
|
737
|
+
const getExplicitSelectOptions = (id, database) => database
|
|
738
|
+
.getAllChildInstanceContainersForParent("GeneralSelectOption", id)
|
|
739
|
+
.map(({ id, content }) => ({
|
|
699
740
|
id: Case("General", id),
|
|
700
741
|
content: {
|
|
701
742
|
...content,
|
|
@@ -704,14 +745,14 @@ const getExplicitSelectOptions = (id, database) => database.getAllChildInstanceC
|
|
|
704
745
|
newApplications: [], // database.getAllChildInstanceContainersForParent("NewSkillApplication", Case("GeneralSelectOption", id)), // prevent duplicates as these can already be queried from the database
|
|
705
746
|
uses: [], // database.getAllChildInstanceContainersForParent("SkillUse", Case("GeneralSelectOption", id)), // prevent duplicates as these can already be queried from the database
|
|
706
747
|
}));
|
|
707
|
-
const getSelectOptions = (selectOptions, id, database
|
|
748
|
+
const getSelectOptions = (selectOptions, id, database) => [
|
|
708
749
|
...(selectOptions.derived === undefined
|
|
709
750
|
? []
|
|
710
|
-
: getDerivedSelectOptions(selectOptions.derived, id, database
|
|
751
|
+
: getDerivedSelectOptions(selectOptions.derived, id, database)),
|
|
711
752
|
...getExplicitSelectOptions(id, database),
|
|
712
753
|
];
|
|
713
|
-
const getSelectOptionsForResults = (database,
|
|
714
|
-
const options = getSelectOptions(content.select_options ?? {}, Case(entity, id), database
|
|
754
|
+
const getSelectOptionsForResults = (database, entity, results) => results.reduce((acc, { id, content }) => {
|
|
755
|
+
const options = getSelectOptions(content.select_options ?? {}, Case(entity, id), database);
|
|
715
756
|
if (options.length > 0) {
|
|
716
757
|
acc[id] = options;
|
|
717
758
|
}
|
|
@@ -775,7 +816,7 @@ const cacheKeyBase = {
|
|
|
775
816
|
WandEnchantment: null,
|
|
776
817
|
WeaponEnchantment: null,
|
|
777
818
|
};
|
|
778
|
-
export const activatableSelectOptionsCacheBuilder =
|
|
819
|
+
export const activatableSelectOptionsCacheBuilder = database => Object.fromEntries(Object.keys(cacheKeyBase).map((entity) => [
|
|
779
820
|
entity,
|
|
780
|
-
getSelectOptionsForResults(database,
|
|
821
|
+
getSelectOptionsForResults(database, entity, database.getAllInstanceContainersOfEntity(entity)),
|
|
781
822
|
]));
|
package/lib/cache/index.d.ts
CHANGED
|
@@ -5,15 +5,6 @@ import { type AncestorBloodAdvantagesCache } from "./ancestorBloodAdvantages.ts"
|
|
|
5
5
|
import { type MagicalAndBlessedAdvantagesAndDisadvantagesCache } from "./magicalAndBlessedAdvantagesAndDisadvantages.ts";
|
|
6
6
|
import { type NewApplicationsAndUsesCache, type ResolvedNewSkillApplication, type ResolvedSkillUse } from "./newApplicationsAndUses.ts";
|
|
7
7
|
import { type DerivedTradeSecretsCache } from "./tradeSecrets.ts";
|
|
8
|
-
/**
|
|
9
|
-
* Identifiers of specific entries in the database that are used for creating the cache.
|
|
10
|
-
*/
|
|
11
|
-
export type IdMap = {
|
|
12
|
-
Advantage: Record<"Blessed" | "Spellcaster", string>;
|
|
13
|
-
GeneralSpecialAbility: Record<"Weaponsmith" | "Armorer", string>;
|
|
14
|
-
MagicalSpecialAbility: Record<"PropertyKnowledge", string>;
|
|
15
|
-
KarmaSpecialAbility: Record<"AspectKnowledge", string>;
|
|
16
|
-
};
|
|
17
8
|
/**
|
|
18
9
|
* The cache object containing all precomputed data.
|
|
19
10
|
*/
|
|
@@ -31,4 +22,4 @@ export type { ActivatableSelectOptionsCache, AncestorBloodAdvantagesCache, Magic
|
|
|
31
22
|
* @param idMap An object containing identifiers of specific entries in the database that are used for creating the cache.
|
|
32
23
|
* @returns The created cache object.
|
|
33
24
|
*/
|
|
34
|
-
export declare const createCache: (db: TSONDB<TSONDBTypes
|
|
25
|
+
export declare const createCache: (db: TSONDB<TSONDBTypes>) => Cache;
|
package/lib/cache/index.js
CHANGED
|
@@ -9,12 +9,16 @@ import { buildDerivedTradeSecretsCache } from "./tradeSecrets.js";
|
|
|
9
9
|
* @param idMap An object containing identifiers of specific entries in the database that are used for creating the cache.
|
|
10
10
|
* @returns The created cache object.
|
|
11
11
|
*/
|
|
12
|
-
export const createCache = (db
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
12
|
+
export const createCache = (db) => {
|
|
13
|
+
const settings = db.getSingletonInstanceOfEntity("Settings");
|
|
14
|
+
if (!settings) {
|
|
15
|
+
throw new Error("Settings not found in the database.");
|
|
16
|
+
}
|
|
17
|
+
const activatableSelectOptions = activatableSelectOptionsCacheBuilder(db, settings);
|
|
18
|
+
const ancestorBloodAdvantages = buildAncestorBloodAdvantagesCache(db, settings);
|
|
19
|
+
const derivedTradeSecrets = buildDerivedTradeSecretsCache(db, settings);
|
|
20
|
+
const magicalAndBlessedAdvantagesAndDisadvantages = buildMagicalAndBlessedAdvantagesAndDisadvantagesCache(db, settings);
|
|
21
|
+
const newApplicationsAndUses = buildNewApplicationsAndUsesCache(db, settings, activatableSelectOptions);
|
|
18
22
|
return {
|
|
19
23
|
activatableSelectOptions,
|
|
20
24
|
ancestorBloodAdvantages,
|
package/lib/cache/internal.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TSONDB } from "tsondb";
|
|
2
|
+
import type { Settings } from "../../gen/types.js";
|
|
2
3
|
import type { TSONDBTypes } from "../main.ts";
|
|
3
|
-
|
|
4
|
-
export type CacheBuilder<T = unknown, Args extends unknown[] = []> = (db: TSONDB<TSONDBTypes>, idMap: IdMap, ...args: Args) => T;
|
|
4
|
+
export type CacheBuilder<T = unknown, Args extends unknown[] = []> = (db: TSONDB<TSONDBTypes>, settings: Settings, ...args: Args) => T;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { assertExhaustive } from "@elyukai/utils/typeSafety";
|
|
2
|
-
const getAdvantageId = (
|
|
2
|
+
const getAdvantageId = (settings, type) => {
|
|
3
3
|
switch (type) {
|
|
4
4
|
case "Magical":
|
|
5
|
-
return
|
|
5
|
+
return settings.supernaturalBaseAdvantages.spellcasters;
|
|
6
6
|
case "Blessed":
|
|
7
|
-
return
|
|
7
|
+
return settings.supernaturalBaseAdvantages.blessed;
|
|
8
8
|
default:
|
|
9
9
|
return assertExhaustive(type);
|
|
10
10
|
}
|
|
@@ -26,16 +26,16 @@ const isRatedFor = (type, ratedId) => {
|
|
|
26
26
|
return assertExhaustive(ratedId);
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
const isPrerequisiteFor = (
|
|
29
|
+
const isPrerequisiteFor = (settings, type, prerequisite, getById, traversedIds) => {
|
|
30
30
|
switch (prerequisite.kind) {
|
|
31
31
|
case "Activatable": {
|
|
32
32
|
if (prerequisite.Activatable.id.kind === "Advantage" &&
|
|
33
|
-
prerequisite.Activatable.id.Advantage === getAdvantageId(
|
|
33
|
+
prerequisite.Activatable.id.Advantage === getAdvantageId(settings, type) &&
|
|
34
34
|
prerequisite.Activatable.active) {
|
|
35
35
|
return true;
|
|
36
36
|
}
|
|
37
37
|
const entry = getById(prerequisite.Activatable.id);
|
|
38
|
-
return entry !== undefined && is(
|
|
38
|
+
return entry !== undefined && is(settings, type, entry, getById, traversedIds);
|
|
39
39
|
}
|
|
40
40
|
case "Rated":
|
|
41
41
|
return isRatedFor(type, prerequisite.Rated.id);
|
|
@@ -64,7 +64,7 @@ const isPrerequisiteFor = (idMap, type, prerequisite, getById, traversedIds) =>
|
|
|
64
64
|
return assertExhaustive(prerequisite);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
const is = (
|
|
67
|
+
const is = (settings, type, entry, getById, traversedIds) => {
|
|
68
68
|
if (!entry.content.prerequisites || traversedIds.includes(entry.id)) {
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
@@ -73,11 +73,11 @@ const is = (idMap, type, entry, getById, traversedIds) => {
|
|
|
73
73
|
entry.content.prerequisites.some(prerequisite => {
|
|
74
74
|
switch (prerequisite.prerequisite.kind) {
|
|
75
75
|
case "Single":
|
|
76
|
-
return isPrerequisiteFor(
|
|
76
|
+
return isPrerequisiteFor(settings, type, prerequisite.prerequisite.Single, getById, newTraversedIds);
|
|
77
77
|
case "Disjunction":
|
|
78
|
-
return prerequisite.prerequisite.Disjunction.list.some(p => isPrerequisiteFor(
|
|
78
|
+
return prerequisite.prerequisite.Disjunction.list.some(p => isPrerequisiteFor(settings, type, p, getById, newTraversedIds));
|
|
79
79
|
case "Group":
|
|
80
|
-
return prerequisite.prerequisite.Group.list.some(p => isPrerequisiteFor(
|
|
80
|
+
return prerequisite.prerequisite.Group.list.some(p => isPrerequisiteFor(settings, type, p, getById, newTraversedIds));
|
|
81
81
|
default:
|
|
82
82
|
return assertExhaustive(prerequisite.prerequisite);
|
|
83
83
|
}
|
|
@@ -91,16 +91,16 @@ const typeKeyMap = {
|
|
|
91
91
|
Magical: null,
|
|
92
92
|
Blessed: null,
|
|
93
93
|
};
|
|
94
|
-
const collectIds = (entity, type, database,
|
|
94
|
+
const collectIds = (entity, type, database, settings) => database
|
|
95
95
|
.getAllInstanceContainersOfEntity(entity)
|
|
96
|
-
.filter(entry => is(
|
|
96
|
+
.filter(entry => is(settings, type, entry, database.getInstanceContainerOfEntityById.bind(database), []))
|
|
97
97
|
.map(({ id }) => id);
|
|
98
|
-
export const buildMagicalAndBlessedAdvantagesAndDisadvantagesCache = (database,
|
|
98
|
+
export const buildMagicalAndBlessedAdvantagesAndDisadvantagesCache = (database, settings) => {
|
|
99
99
|
return Object.fromEntries(Object.keys(entityKeyMap).map((entity) => [
|
|
100
100
|
entity,
|
|
101
101
|
Object.fromEntries(Object.keys(typeKeyMap).map((type) => [
|
|
102
102
|
type,
|
|
103
|
-
collectIds(entity, type, database,
|
|
103
|
+
collectIds(entity, type, database, settings),
|
|
104
104
|
])),
|
|
105
105
|
]));
|
|
106
106
|
};
|
|
@@ -31,7 +31,7 @@ const emptyDerivedHerbaryTradeSecretsCache = {
|
|
|
31
31
|
HerbalAid: {},
|
|
32
32
|
Poison: {},
|
|
33
33
|
};
|
|
34
|
-
export const buildDerivedTradeSecretsCache = (database,
|
|
34
|
+
export const buildDerivedTradeSecretsCache = (database, settings) => {
|
|
35
35
|
const cache = {
|
|
36
36
|
equipment: emptyDerivedEquipmentTradeSecretsCache,
|
|
37
37
|
herbary: emptyDerivedHerbaryTradeSecretsCache,
|
|
@@ -49,14 +49,14 @@ export const buildDerivedTradeSecretsCache = (database, idMap) => {
|
|
|
49
49
|
prerequisites: entity === "Weapon"
|
|
50
50
|
? [
|
|
51
51
|
Case("Single", Case("Activatable", {
|
|
52
|
-
id:
|
|
52
|
+
id: settings.derivedTradeSecrets.requiredSpecialAbilityForWeapons,
|
|
53
53
|
active: true,
|
|
54
54
|
})),
|
|
55
55
|
]
|
|
56
56
|
: entity === "Armor"
|
|
57
57
|
? [
|
|
58
58
|
Case("Single", Case("Activatable", {
|
|
59
|
-
id:
|
|
59
|
+
id: settings.derivedTradeSecrets.requiredSpecialAbilityForArmor,
|
|
60
60
|
active: true,
|
|
61
61
|
})),
|
|
62
62
|
]
|
package/lib/main.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Schema } from "tsondb/schema";
|
|
2
|
-
import type { ChildEntityMap, EntityMap, EnumMap, TypeAliasMap } from "../gen/types.js";
|
|
2
|
+
import type { ChildEntityMap, EntityMap, EnumMap, SingletonEntityMap, TypeAliasMap } from "../gen/types.js";
|
|
3
3
|
declare module "tsondb/schema/gen" {
|
|
4
4
|
interface Register {
|
|
5
5
|
entityMap: EntityMap;
|
|
6
6
|
childEntityMap: ChildEntityMap;
|
|
7
|
+
singletonEntityMap: SingletonEntityMap;
|
|
7
8
|
enumMap: EnumMap;
|
|
8
9
|
typeAliasMap: TypeAliasMap;
|
|
9
10
|
}
|
|
@@ -11,6 +12,7 @@ declare module "tsondb/schema/gen" {
|
|
|
11
12
|
export interface TSONDBTypes {
|
|
12
13
|
entityMap: EntityMap;
|
|
13
14
|
childEntityMap: ChildEntityMap;
|
|
15
|
+
singletonEntityMap: SingletonEntityMap;
|
|
14
16
|
enumMap: EnumMap;
|
|
15
17
|
typeAliasMap: TypeAliasMap;
|
|
16
18
|
}
|
package/lib/main.js
CHANGED
package/lib/types/Advantage.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export declare const Advantage: DB.Entity<"Advantage", {
|
|
|
8
8
|
MagicalPunishment: DB.EnumCase<null>;
|
|
9
9
|
BlessedRank: DB.EnumCase<null>;
|
|
10
10
|
BlessedTitle: DB.EnumCase<null>;
|
|
11
|
+
BlessedHonor: DB.EnumCase<null>;
|
|
12
|
+
BlessedPunishment: DB.EnumCase<null>;
|
|
11
13
|
}, []>>, false>;
|
|
12
14
|
nameBuilderRules: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ActivatableNameBuilderRules", DB.Object<{
|
|
13
15
|
levelPlacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ActivatableNameLevelPlacement", {
|
|
@@ -32,19 +34,137 @@ export declare const Advantage: DB.Entity<"Advantage", {
|
|
|
32
34
|
HomunculusTypes: DB.EnumCase<null>;
|
|
33
35
|
BlessedTraditions: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"BlessedTraditionsSelectOptionCategory", DB.Object<{
|
|
34
36
|
require_principles: DB.MemberDecl<DB.Boolean, false>;
|
|
37
|
+
onlyType: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"BlessedTraditionTypeForSelectOptionCategory", {
|
|
38
|
+
Church: DB.EnumCase<null>;
|
|
39
|
+
Shamanistic: DB.EnumCase<null>;
|
|
40
|
+
}, []>>, false>;
|
|
35
41
|
}>, []>>>;
|
|
36
42
|
Elements: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ElementsSelectOptionCategory", DB.Object<{
|
|
37
43
|
specific: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
|
|
38
44
|
}>, []>>>;
|
|
39
45
|
Properties: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"PropertiesSelectOptionCategory", DB.Object<{
|
|
40
|
-
|
|
46
|
+
requireActiveSelectionOnEntry: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ActivatableIdentifier", {
|
|
47
|
+
ArcaneOrbEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
48
|
+
AttireEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
49
|
+
Beutelzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
50
|
+
BowlEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
51
|
+
CauldronEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
52
|
+
ChronicleEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
53
|
+
DaggerRitual: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
54
|
+
FoolsHatEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
55
|
+
Haubenzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
56
|
+
Hauerkettenzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
57
|
+
InstrumentEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
58
|
+
Keulenzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
59
|
+
Krallenkettenzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
60
|
+
Kristallkugelzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
61
|
+
OrbEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
62
|
+
RingEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
63
|
+
Schweinetrommelzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
64
|
+
SickleRitual: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
65
|
+
SpellSwordEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
66
|
+
StaffEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
67
|
+
ToyEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
68
|
+
Trinkhornzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
69
|
+
WandEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
70
|
+
WeaponEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
71
|
+
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
72
|
+
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
73
|
+
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
74
|
+
AdvancedSkillSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
75
|
+
AncestorGlyph: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
76
|
+
BlessedTradition: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
77
|
+
BrawlingSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
78
|
+
CeremonialItemSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
79
|
+
CombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
80
|
+
CombatStyleSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
81
|
+
CommandSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
82
|
+
FamiliarSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
83
|
+
FatePointSexSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
84
|
+
FatePointSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
85
|
+
GeneralSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
86
|
+
KarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
87
|
+
LiturgicalStyleSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
88
|
+
LycantropicGift: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
89
|
+
MagicalSign: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
90
|
+
MagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
91
|
+
MagicalTradition: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
92
|
+
MagicStyleSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
93
|
+
PactGift: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
94
|
+
ProtectiveWardingCircleSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
95
|
+
Sermon: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
96
|
+
SexSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
97
|
+
SikaryanDrainSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
98
|
+
SkillStyleSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
99
|
+
VampiricGift: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
100
|
+
Vision: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
101
|
+
Advantage: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
102
|
+
Disadvantage: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
103
|
+
}, []>>, false>;
|
|
41
104
|
require_minimum_spellworks_on: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RequiredMinimumSkillsToBeOnSkillRating", DB.Object<{
|
|
42
105
|
number: DB.MemberDecl<DB.Integer, true>;
|
|
43
106
|
rating: DB.MemberDecl<DB.Integer, true>;
|
|
44
107
|
}>, []>>, false>;
|
|
45
108
|
}>, []>>>;
|
|
46
109
|
Aspects: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"AspectSelectOptionCategory", DB.Object<{
|
|
47
|
-
|
|
110
|
+
requireActiveSelectionOnEntry: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ActivatableIdentifier", {
|
|
111
|
+
ArcaneOrbEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
112
|
+
AttireEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
113
|
+
Beutelzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
114
|
+
BowlEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
115
|
+
CauldronEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
116
|
+
ChronicleEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
117
|
+
DaggerRitual: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
118
|
+
FoolsHatEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
119
|
+
Haubenzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
120
|
+
Hauerkettenzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
121
|
+
InstrumentEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
122
|
+
Keulenzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
123
|
+
Krallenkettenzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
124
|
+
Kristallkugelzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
125
|
+
OrbEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
126
|
+
RingEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
127
|
+
Schweinetrommelzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
128
|
+
SickleRitual: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
129
|
+
SpellSwordEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
130
|
+
StaffEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
131
|
+
ToyEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
132
|
+
Trinkhornzauber: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
133
|
+
WandEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
134
|
+
WeaponEnchantment: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
135
|
+
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
136
|
+
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
137
|
+
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
138
|
+
AdvancedSkillSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
139
|
+
AncestorGlyph: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
140
|
+
BlessedTradition: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
141
|
+
BrawlingSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
142
|
+
CeremonialItemSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
143
|
+
CombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
144
|
+
CombatStyleSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
145
|
+
CommandSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
146
|
+
FamiliarSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
147
|
+
FatePointSexSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
148
|
+
FatePointSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
149
|
+
GeneralSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
150
|
+
KarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
151
|
+
LiturgicalStyleSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
152
|
+
LycantropicGift: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
153
|
+
MagicalSign: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
154
|
+
MagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
155
|
+
MagicalTradition: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
156
|
+
MagicStyleSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
157
|
+
PactGift: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
158
|
+
ProtectiveWardingCircleSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
159
|
+
Sermon: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
160
|
+
SexSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
161
|
+
SikaryanDrainSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
162
|
+
SkillStyleSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
163
|
+
VampiricGift: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
164
|
+
Vision: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
165
|
+
Advantage: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
166
|
+
Disadvantage: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
167
|
+
}, []>>, false>;
|
|
48
168
|
use_master_of_suffix_as_name: DB.MemberDecl<DB.Boolean, false>;
|
|
49
169
|
require_minimum_liturgies_on: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RequiredMinimumSkillsToBeOnSkillRating", DB.Object<{
|
|
50
170
|
number: DB.MemberDecl<DB.Integer, true>;
|
|
@@ -1178,6 +1298,7 @@ export declare const Advantage: DB.Entity<"Advantage", {
|
|
|
1178
1298
|
style: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ValueMapStyle", {
|
|
1179
1299
|
Compressed: DB.EnumCase<null>;
|
|
1180
1300
|
Verbose: DB.EnumCase<null>;
|
|
1301
|
+
Grouped: DB.EnumCase<null>;
|
|
1181
1302
|
}, []>>, true>;
|
|
1182
1303
|
translations: DB.MemberDecl<DB.NestedEntityMap<"ValueMapTranslation", {
|
|
1183
1304
|
listPrefix: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
|
|
@@ -2,9 +2,12 @@ import * as DB from "tsondb/schema/dsl";
|
|
|
2
2
|
export declare const AnimalDisease: DB.Entity<"AnimalDisease", {
|
|
3
3
|
level: DB.MemberDecl<DB.Integer, true>;
|
|
4
4
|
resistance: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Resistance", {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Single: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"SingleResistance", DB.Object<{
|
|
6
|
+
derivedCharacteristic: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
7
|
+
}>, []>>>;
|
|
8
|
+
Minimum: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"MinimumResistance", DB.Object<{
|
|
9
|
+
derivedCharacteristics: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
|
|
10
|
+
}>, []>>>;
|
|
8
11
|
}, []>>, true>;
|
|
9
12
|
cause: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Cause", DB.Object<{
|
|
10
13
|
chance: DB.MemberDecl<DB.Integer, false>;
|