@optolith/database-schema 0.63.1 → 0.65.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/lib/main.js CHANGED
@@ -40,6 +40,7 @@ export const schema = new Schema([
40
40
  Types.CauldronEnchantment,
41
41
  Types.CeremonialItem,
42
42
  Types.CeremonialItemSpecialAbility,
43
+ Types.CeremonialItemSpecialAbilityGroup,
43
44
  Types.Ceremony,
44
45
  Types.ChronicleEnchantment,
45
46
  Types.CloseCombatTechnique,
@@ -6,6 +6,8 @@ export declare const Advantage: DB.Entity<"Advantage", {
6
6
  MagicalTitle: DB.EnumCase<null>;
7
7
  MagicalHonor: DB.EnumCase<null>;
8
8
  MagicalPunishment: DB.EnumCase<null>;
9
+ BlessedRank: DB.EnumCase<null>;
10
+ BlessedTitle: DB.EnumCase<null>;
9
11
  }, []>>, false>;
10
12
  nameBuilderRules: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ActivatableNameBuilderRules", DB.Object<{
11
13
  levelPlacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ActivatableNameLevelPlacement", {
@@ -6,6 +6,8 @@ export declare const Disadvantage: DB.Entity<"Disadvantage", {
6
6
  MagicalTitle: DB.EnumCase<null>;
7
7
  MagicalHonor: DB.EnumCase<null>;
8
8
  MagicalPunishment: DB.EnumCase<null>;
9
+ BlessedRank: DB.EnumCase<null>;
10
+ BlessedTitle: DB.EnumCase<null>;
9
11
  }, []>>, false>;
10
12
  nameBuilderRules: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ActivatableNameBuilderRules", DB.Object<{
11
13
  levelPlacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ActivatableNameLevelPlacement", {
@@ -1380,6 +1380,8 @@ export declare const Locale: DB.Entity<"Locale", {
1380
1380
  "Magical Title": null;
1381
1381
  "Magical Honor": null;
1382
1382
  "Magical Punishment": null;
1383
+ "Blessed Rank": null;
1384
+ "Blessed Title": null;
1383
1385
  ".input {$ord :number} {{{$ord}. attack}}": null;
1384
1386
  ".input {$ord :number} {{{$ord}. throw}}": null;
1385
1387
  "depending on the level of the special ability {$name}": null;
@@ -1616,6 +1618,10 @@ export declare const Locale: DB.Entity<"Locale", {
1616
1618
  "maximum SR per skill: {$maxSR}": null;
1617
1619
  "no AP to improve other {$skillsOfGroup}": null;
1618
1620
  ".input {$count :number} {{{$count} cantrips}}": null;
1621
+ "{$apValue} AP to distribute among the following combat techniques: {$list}": null;
1622
+ "no AP to distribute among the following combat techniques: {$list}": null;
1623
+ ".input {$count :number} {{{$count} more spellworks totaling {$apValue} AP}}": null;
1624
+ "{$count} more spellworks totaling {$apValue} AP": null;
1619
1625
  "{$count} from the following list": null;
1620
1626
  "The Twelve Blessings": null;
1621
1627
  "except for {$list :list type=conjunction}": null;
@@ -1416,6 +1416,8 @@ export const Locale = DB.Entity(import.meta.url, {
1416
1416
  "Magical Title": null,
1417
1417
  "Magical Honor": null,
1418
1418
  "Magical Punishment": null,
1419
+ "Blessed Rank": null,
1420
+ "Blessed Title": null,
1419
1421
  // combat special ability -- penalty
1420
1422
  ".input {$ord :number} {{{$ord}. attack}}": null,
1421
1423
  ".input {$ord :number} {{{$ord}. throw}}": null,
@@ -1667,6 +1669,10 @@ export const Locale = DB.Entity(import.meta.url, {
1667
1669
  "maximum SR per skill: {$maxSR}": null,
1668
1670
  "no AP to improve other {$skillsOfGroup}": null,
1669
1671
  ".input {$count :number} {{{$count} cantrips}}": null,
1672
+ "{$apValue} AP to distribute among the following combat techniques: {$list}": null,
1673
+ "no AP to distribute among the following combat techniques: {$list}": null,
1674
+ ".input {$count :number} {{{$count} more spellworks totaling {$apValue} AP}}": null,
1675
+ "{$count} more spellworks totaling {$apValue} AP": null,
1670
1676
  "{$count} from the following list": null,
1671
1677
  "The Twelve Blessings": null,
1672
1678
  "except for {$list :list type=conjunction}": null,
@@ -62,6 +62,13 @@ export declare const Profession: DB.Entity<"Profession", {
62
62
  RangedCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
63
63
  }, []>>>, true>;
64
64
  }>, []>>, false>;
65
+ combatTechniquesForAdventurePoints: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"CombatTechniquesForAdventurePointsOption", DB.Object<{
66
+ apValue: DB.MemberDecl<DB.Integer, true>;
67
+ options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"CombatTechniqueIdentifier", {
68
+ CloseCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
69
+ RangedCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
70
+ }, []>>>, true>;
71
+ }>, []>>, false>;
65
72
  cantrips: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"CantripsOptions", DB.Object<{
66
73
  number: DB.MemberDecl<DB.Integer, true>;
67
74
  options: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
@@ -74,6 +81,10 @@ export declare const Profession: DB.Entity<"Profession", {
74
81
  specific: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
75
82
  ap_value: DB.MemberDecl<DB.Integer, true>;
76
83
  }>, []>>, false>;
84
+ spellworks: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"SpellworksOptions", DB.Object<{
85
+ number: DB.MemberDecl<DB.Integer, true>;
86
+ apValue: DB.MemberDecl<DB.Integer, true>;
87
+ }>, []>>, false>;
77
88
  liturgies: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"LiturgiesOptions", DB.Object<{
78
89
  ap_value: DB.MemberDecl<DB.Integer, true>;
79
90
  }>, []>>, false>;
@@ -314,6 +325,10 @@ export declare const Profession: DB.Entity<"Profession", {
314
325
  Remove: DB.EnumCase<null>;
315
326
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
316
327
  }, [T: DB.Param<"T", DB.Type>]>>, false>;
328
+ combatTechniquesForAdventurePoints: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
329
+ Remove: DB.EnumCase<null>;
330
+ Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
331
+ }, [T: DB.Param<"T", DB.Type>]>>, false>;
317
332
  cantrips: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
318
333
  Remove: DB.EnumCase<null>;
319
334
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
@@ -326,6 +341,10 @@ export declare const Profession: DB.Entity<"Profession", {
326
341
  Remove: DB.EnumCase<null>;
327
342
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
328
343
  }, [T: DB.Param<"T", DB.Type>]>>, false>;
344
+ spellworks: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
345
+ Remove: DB.EnumCase<null>;
346
+ Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
347
+ }, [T: DB.Param<"T", DB.Type>]>>, false>;
329
348
  liturgies: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
330
349
  Remove: DB.EnumCase<null>;
331
350
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
@@ -829,6 +848,13 @@ export declare const ProfessionVersion: DB.Entity<"ProfessionVersion", {
829
848
  RangedCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
830
849
  }, []>>>, true>;
831
850
  }>, []>>, false>;
851
+ combatTechniquesForAdventurePoints: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"CombatTechniquesForAdventurePointsOption", DB.Object<{
852
+ apValue: DB.MemberDecl<DB.Integer, true>;
853
+ options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"CombatTechniqueIdentifier", {
854
+ CloseCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
855
+ RangedCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
856
+ }, []>>>, true>;
857
+ }>, []>>, false>;
832
858
  cantrips: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"CantripsOptions", DB.Object<{
833
859
  number: DB.MemberDecl<DB.Integer, true>;
834
860
  options: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
@@ -841,6 +867,10 @@ export declare const ProfessionVersion: DB.Entity<"ProfessionVersion", {
841
867
  specific: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
842
868
  ap_value: DB.MemberDecl<DB.Integer, true>;
843
869
  }>, []>>, false>;
870
+ spellworks: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"SpellworksOptions", DB.Object<{
871
+ number: DB.MemberDecl<DB.Integer, true>;
872
+ apValue: DB.MemberDecl<DB.Integer, true>;
873
+ }>, []>>, false>;
844
874
  liturgies: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"LiturgiesOptions", DB.Object<{
845
875
  ap_value: DB.MemberDecl<DB.Integer, true>;
846
876
  }>, []>>, false>;
@@ -1081,6 +1111,10 @@ export declare const ProfessionVersion: DB.Entity<"ProfessionVersion", {
1081
1111
  Remove: DB.EnumCase<null>;
1082
1112
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1083
1113
  }, [T: DB.Param<"T", DB.Type>]>>, false>;
1114
+ combatTechniquesForAdventurePoints: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
1115
+ Remove: DB.EnumCase<null>;
1116
+ Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1117
+ }, [T: DB.Param<"T", DB.Type>]>>, false>;
1084
1118
  cantrips: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
1085
1119
  Remove: DB.EnumCase<null>;
1086
1120
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
@@ -1093,6 +1127,10 @@ export declare const ProfessionVersion: DB.Entity<"ProfessionVersion", {
1093
1127
  Remove: DB.EnumCase<null>;
1094
1128
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1095
1129
  }, [T: DB.Param<"T", DB.Type>]>>, false>;
1130
+ spellworks: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
1131
+ Remove: DB.EnumCase<null>;
1132
+ Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1133
+ }, [T: DB.Param<"T", DB.Type>]>>, false>;
1096
1134
  liturgies: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
1097
1135
  Remove: DB.EnumCase<null>;
1098
1136
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
@@ -1588,6 +1626,13 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
1588
1626
  RangedCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
1589
1627
  }, []>>>, true>;
1590
1628
  }>, []>>, false>;
1629
+ combatTechniquesForAdventurePoints: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"CombatTechniquesForAdventurePointsOption", DB.Object<{
1630
+ apValue: DB.MemberDecl<DB.Integer, true>;
1631
+ options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"CombatTechniqueIdentifier", {
1632
+ CloseCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
1633
+ RangedCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
1634
+ }, []>>>, true>;
1635
+ }>, []>>, false>;
1591
1636
  cantrips: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"CantripsOptions", DB.Object<{
1592
1637
  number: DB.MemberDecl<DB.Integer, true>;
1593
1638
  options: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
@@ -1600,6 +1645,10 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
1600
1645
  specific: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
1601
1646
  ap_value: DB.MemberDecl<DB.Integer, true>;
1602
1647
  }>, []>>, false>;
1648
+ spellworks: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"SpellworksOptions", DB.Object<{
1649
+ number: DB.MemberDecl<DB.Integer, true>;
1650
+ apValue: DB.MemberDecl<DB.Integer, true>;
1651
+ }>, []>>, false>;
1603
1652
  liturgies: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"LiturgiesOptions", DB.Object<{
1604
1653
  ap_value: DB.MemberDecl<DB.Integer, true>;
1605
1654
  }>, []>>, false>;
@@ -1840,6 +1889,10 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
1840
1889
  Remove: DB.EnumCase<null>;
1841
1890
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1842
1891
  }, [T: DB.Param<"T", DB.Type>]>>, false>;
1892
+ combatTechniquesForAdventurePoints: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
1893
+ Remove: DB.EnumCase<null>;
1894
+ Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1895
+ }, [T: DB.Param<"T", DB.Type>]>>, false>;
1843
1896
  cantrips: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
1844
1897
  Remove: DB.EnumCase<null>;
1845
1898
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
@@ -1852,6 +1905,10 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
1852
1905
  Remove: DB.EnumCase<null>;
1853
1906
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1854
1907
  }, [T: DB.Param<"T", DB.Type>]>>, false>;
1908
+ spellworks: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
1909
+ Remove: DB.EnumCase<null>;
1910
+ Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1911
+ }, [T: DB.Param<"T", DB.Type>]>>, false>;
1855
1912
  liturgies: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
1856
1913
  Remove: DB.EnumCase<null>;
1857
1914
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
@@ -2108,6 +2165,10 @@ export declare const ProfessionVariant: DB.Entity<"ProfessionVariant", {
2108
2165
  Remove: DB.EnumCase<null>;
2109
2166
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
2110
2167
  }, [T: DB.Param<"T", DB.Type>]>>, false>;
2168
+ combatTechniquesForAdventurePoints: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
2169
+ Remove: DB.EnumCase<null>;
2170
+ Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
2171
+ }, [T: DB.Param<"T", DB.Type>]>>, false>;
2111
2172
  cantrips: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
2112
2173
  Remove: DB.EnumCase<null>;
2113
2174
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
@@ -2120,6 +2181,10 @@ export declare const ProfessionVariant: DB.Entity<"ProfessionVariant", {
2120
2181
  Remove: DB.EnumCase<null>;
2121
2182
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
2122
2183
  }, [T: DB.Param<"T", DB.Type>]>>, false>;
2184
+ spellworks: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
2185
+ Remove: DB.EnumCase<null>;
2186
+ Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
2187
+ }, [T: DB.Param<"T", DB.Type>]>>, false>;
2123
2188
  liturgies: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
2124
2189
  Remove: DB.EnumCase<null>;
2125
2190
  Override: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
@@ -438,6 +438,9 @@ const ProfessionPackageOptions = DB.TypeAlias(import.meta.url, {
438
438
  combat_techniques: DB.Optional({
439
439
  type: DB.IncludeIdentifier(CombatTechniquesOptions),
440
440
  }),
441
+ combatTechniquesForAdventurePoints: DB.Optional({
442
+ type: DB.IncludeIdentifier(CombatTechniquesForAdventurePointsOption),
443
+ }),
441
444
  cantrips: DB.Optional({
442
445
  type: DB.IncludeIdentifier(CantripsOptions),
443
446
  }),
@@ -447,6 +450,9 @@ const ProfessionPackageOptions = DB.TypeAlias(import.meta.url, {
447
450
  skills: DB.Optional({
448
451
  type: DB.IncludeIdentifier(SkillsOptions),
449
452
  }),
453
+ spellworks: DB.Optional({
454
+ type: DB.IncludeIdentifier(SpellworksOptions),
455
+ }),
450
456
  liturgies: DB.Optional({
451
457
  type: DB.IncludeIdentifier(LiturgiesOptions),
452
458
  }),
@@ -471,6 +477,11 @@ const ProfessionVariantPackageOptions = DB.TypeAlias(import.meta.url, {
471
477
  DB.IncludeIdentifier(CombatTechniquesOptions),
472
478
  ]),
473
479
  }),
480
+ combatTechniquesForAdventurePoints: DB.Optional({
481
+ type: DB.GenIncludeIdentifier(VariantOptionAction, [
482
+ DB.IncludeIdentifier(CombatTechniquesForAdventurePointsOption),
483
+ ]),
484
+ }),
474
485
  cantrips: DB.Optional({
475
486
  type: DB.GenIncludeIdentifier(VariantOptionAction, [
476
487
  DB.IncludeIdentifier(CantripsOptions),
@@ -482,6 +493,11 @@ const ProfessionVariantPackageOptions = DB.TypeAlias(import.meta.url, {
482
493
  skills: DB.Optional({
483
494
  type: DB.GenIncludeIdentifier(VariantOptionAction, [DB.IncludeIdentifier(SkillsOptions)]),
484
495
  }),
496
+ spellworks: DB.Optional({
497
+ type: DB.GenIncludeIdentifier(VariantOptionAction, [
498
+ DB.IncludeIdentifier(SpellworksOptions),
499
+ ]),
500
+ }),
485
501
  liturgies: DB.Optional({
486
502
  type: DB.GenIncludeIdentifier(VariantOptionAction, [
487
503
  DB.IncludeIdentifier(LiturgiesOptions),
@@ -558,6 +574,20 @@ const RatingForCombatTechniquesNumber = DB.TypeAlias(import.meta.url, {
558
574
  }),
559
575
  }),
560
576
  });
577
+ const CombatTechniquesForAdventurePointsOption = DB.TypeAlias(import.meta.url, {
578
+ name: "CombatTechniquesForAdventurePointsOption",
579
+ comment: `Distribe a set amount of Adventure Points among a given set of combat techniques.`,
580
+ type: () => DB.Object({
581
+ apValue: DB.Required({
582
+ comment: `The AP value to distribute.`,
583
+ type: DB.Integer({ minimum: 2 }),
584
+ }),
585
+ options: DB.Required({
586
+ comment: "The list of combat techniques to distribute to.",
587
+ type: DB.Array(DB.IncludeIdentifier(CombatTechniqueIdentifier), { minItems: 2 }),
588
+ }),
589
+ }),
590
+ });
561
591
  const CantripsOptions = DB.TypeAlias(import.meta.url, {
562
592
  name: "CantripsOptions",
563
593
  comment: `Select one or more cantrips you receive.`,
@@ -605,6 +635,20 @@ const SkillsOptions = DB.TypeAlias(import.meta.url, {
605
635
  : undefined,
606
636
  ].filter(isNotNullish),
607
637
  });
638
+ const SpellworksOptions = DB.TypeAlias(import.meta.url, {
639
+ name: "SpellworksOptions",
640
+ comment: `Buy a set number of spells and rituals for a specific amount of AP.`,
641
+ type: () => DB.Object({
642
+ number: DB.Required({
643
+ comment: "The number of spells and rituals to select.",
644
+ type: DB.Integer({ minimum: 1 }),
645
+ }),
646
+ apValue: DB.Required({
647
+ comment: "The AP value you can buy spells and rituals for.",
648
+ type: DB.Integer({ minimum: 1 }),
649
+ }),
650
+ }),
651
+ });
608
652
  const LiturgiesOptions = DB.TypeAlias(import.meta.url, {
609
653
  name: "LiturgiesOptions",
610
654
  comment: `Buy liturgical chants and ceremonies for a specific amount of AP.`,
@@ -23,7 +23,7 @@ export declare const Race: DB.Entity<"Race", {
23
23
  number: DB.MemberDecl<DB.Integer, true>;
24
24
  sides: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DieType", DB.Integer, []>>, true>;
25
25
  }>, []>>, true>;
26
- }>, true>;
26
+ }>, false>;
27
27
  variants: DB.MemberDecl<DB.ChildEntities<DB.Entity<"RaceVariant", {
28
28
  race: DB.MemberDecl<DB.ReferenceIdentifier, true>;
29
29
  attribute_adjustments: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"AttributeAdjustments", DB.Object<{
package/lib/types/Race.js CHANGED
@@ -29,7 +29,7 @@ export const Race = DB.Entity(import.meta.url, {
29
29
  comment: "Configuration for random weight generation.",
30
30
  type: DB.IncludeIdentifier(RandomWeightGeneration),
31
31
  }),
32
- starting_age: DB.Required({
32
+ starting_age: DB.Optional({
33
33
  comment: "Defines the starting ages for the race. It depends on the selected experience level.",
34
34
  type: DB.NestedEntityMap({
35
35
  name: "StartingAgeConfigForExperienceLevel",
@@ -4,4 +4,6 @@ export declare const subtype: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Ad
4
4
  MagicalTitle: DB.EnumCase<null>;
5
5
  MagicalHonor: DB.EnumCase<null>;
6
6
  MagicalPunishment: DB.EnumCase<null>;
7
+ BlessedRank: DB.EnumCase<null>;
8
+ BlessedTitle: DB.EnumCase<null>;
7
9
  }, []>>, false>;
@@ -6,6 +6,8 @@ const AdvantageDisadvantageSubtype = DB.Enum(import.meta.url, {
6
6
  MagicalTitle: DB.EnumCase({ type: null }),
7
7
  MagicalHonor: DB.EnumCase({ type: null }),
8
8
  MagicalPunishment: DB.EnumCase({ type: null }),
9
+ BlessedRank: DB.EnumCase({ type: null }),
10
+ BlessedTitle: DB.EnumCase({ type: null }),
9
11
  }),
10
12
  });
11
13
  export const subtype = DB.Optional({ type: DB.IncludeIdentifier(AdvantageDisadvantageSubtype) });
@@ -36,6 +36,7 @@ export declare const CantripIdentifier: () => R;
36
36
  export declare const CauldronEnchantmentIdentifier: () => R;
37
37
  export declare const CeremonialItemIdentifier: () => R;
38
38
  export declare const CeremonialItemSpecialAbilityIdentifier: () => R;
39
+ export declare const CeremonialItemSpecialAbilityGroupIdentifier: () => R;
39
40
  export declare const CeremonyIdentifier: () => R;
40
41
  export declare const ChronicleEnchantmentIdentifier: () => R;
41
42
  export declare const CloseCombatTechniqueIdentifier: () => R;
@@ -127,6 +127,7 @@ import { Sermon } from "./specialAbility/Sermon.js";
127
127
  import { SexSpecialAbility } from "./specialAbility/SexSpecialAbility.js";
128
128
  import { SikaryanDrainSpecialAbility } from "./specialAbility/SikaryanDrainSpecialAbility.js";
129
129
  import { SkillStyleSpecialAbility } from "./specialAbility/SkillStyleSpecialAbility.js";
130
+ import { CeremonialItemSpecialAbilityGroup } from "./specialAbility/sub/CeremonialItemSpecialAbilityGroup.js";
130
131
  import { Language, LanguageSpecialization } from "./specialAbility/sub/Language.js";
131
132
  import { Script } from "./specialAbility/sub/Script.js";
132
133
  import { TradeSecret } from "./specialAbility/sub/TradeSecret.js";
@@ -200,6 +201,7 @@ export const CantripIdentifier = () => R(Cantrip);
200
201
  export const CauldronEnchantmentIdentifier = () => R(CauldronEnchantment);
201
202
  export const CeremonialItemIdentifier = () => R(CeremonialItem);
202
203
  export const CeremonialItemSpecialAbilityIdentifier = () => R(CeremonialItemSpecialAbility);
204
+ export const CeremonialItemSpecialAbilityGroupIdentifier = () => R(CeremonialItemSpecialAbilityGroup);
203
205
  export const CeremonyIdentifier = () => R(Ceremony);
204
206
  export const ChronicleEnchantmentIdentifier = () => R(ChronicleEnchantment);
205
207
  export const CloseCombatTechniqueIdentifier = () => R(CloseCombatTechnique);
@@ -48,9 +48,9 @@ export { RopeOrChain } from "./equipment/item/RopeOrChain.js";
48
48
  export { Stationery } from "./equipment/item/Stationery.js";
49
49
  export { ArmorType } from "./equipment/item/sub/ArmorType.js";
50
50
  export { Biome } from "./equipment/item/sub/Biome.js";
51
- export { SubBiome } from "./equipment/item/sub/SubBiome.js";
52
- export { Reach } from "./equipment/item/sub/Reach.js";
53
51
  export { BotanicRegion } from "./equipment/item/sub/BotanicRegion.js";
52
+ export { Reach } from "./equipment/item/sub/Reach.js";
53
+ export { SubBiome } from "./equipment/item/sub/SubBiome.js";
54
54
  export { ThievesTool } from "./equipment/item/ThievesTool.js";
55
55
  export { ToolOfTheTrade } from "./equipment/item/ToolOfTheTrade.js";
56
56
  export { TravelGearOrTool } from "./equipment/item/TravelGearOrTool.js";
@@ -130,6 +130,7 @@ export { Sermon } from "./specialAbility/Sermon.js";
130
130
  export { SexSpecialAbility } from "./specialAbility/SexSpecialAbility.js";
131
131
  export { SikaryanDrainSpecialAbility } from "./specialAbility/SikaryanDrainSpecialAbility.js";
132
132
  export { SkillStyleSpecialAbility } from "./specialAbility/SkillStyleSpecialAbility.js";
133
+ export { CeremonialItemSpecialAbilityGroup } from "./specialAbility/sub/CeremonialItemSpecialAbilityGroup.js";
133
134
  export { Language } from "./specialAbility/sub/Language.js";
134
135
  export { Script } from "./specialAbility/sub/Script.js";
135
136
  export { TradeSecret } from "./specialAbility/sub/TradeSecret.js";
@@ -48,9 +48,9 @@ export { RopeOrChain } from "./equipment/item/RopeOrChain.js";
48
48
  export { Stationery } from "./equipment/item/Stationery.js";
49
49
  export { ArmorType } from "./equipment/item/sub/ArmorType.js";
50
50
  export { Biome } from "./equipment/item/sub/Biome.js";
51
- export { SubBiome } from "./equipment/item/sub/SubBiome.js";
52
- export { Reach } from "./equipment/item/sub/Reach.js";
53
51
  export { BotanicRegion } from "./equipment/item/sub/BotanicRegion.js";
52
+ export { Reach } from "./equipment/item/sub/Reach.js";
53
+ export { SubBiome } from "./equipment/item/sub/SubBiome.js";
54
54
  export { ThievesTool } from "./equipment/item/ThievesTool.js";
55
55
  export { ToolOfTheTrade } from "./equipment/item/ToolOfTheTrade.js";
56
56
  export { TravelGearOrTool } from "./equipment/item/TravelGearOrTool.js";
@@ -130,6 +130,7 @@ export { Sermon } from "./specialAbility/Sermon.js";
130
130
  export { SexSpecialAbility } from "./specialAbility/SexSpecialAbility.js";
131
131
  export { SikaryanDrainSpecialAbility } from "./specialAbility/SikaryanDrainSpecialAbility.js";
132
132
  export { SkillStyleSpecialAbility } from "./specialAbility/SkillStyleSpecialAbility.js";
133
+ export { CeremonialItemSpecialAbilityGroup } from "./specialAbility/sub/CeremonialItemSpecialAbilityGroup.js";
133
134
  export { Language } from "./specialAbility/sub/Language.js";
134
135
  export { Script } from "./specialAbility/sub/Script.js";
135
136
  export { TradeSecret } from "./specialAbility/sub/TradeSecret.js";
@@ -1,5 +1,6 @@
1
1
  import * as DB from "tsondb/schema/dsl";
2
2
  export declare const CeremonialItemSpecialAbility: DB.Entity<"CeremonialItemSpecialAbility", {
3
+ associatedItem: DB.MemberDecl<DB.ReferenceIdentifier, false>;
3
4
  levels: DB.MemberDecl<DB.Integer, false>;
4
5
  nameBuilderRules: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ActivatableNameBuilderRules", DB.Object<{
5
6
  levelPlacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ActivatableNameLevelPlacement", {
@@ -1,10 +1,11 @@
1
1
  import * as DB from "tsondb/schema/dsl";
2
2
  import { effect, levels, maximum, name, name_in_library } from "../_Activatable.js";
3
3
  import { ap_value, ap_value_append, ap_value_l10n } from "../_ActivatableAdventurePointsValue.js";
4
- import { activatableDisplayNameCustomizer, nameBuilderRules } from "../_ActivatableNames.js";
4
+ import { nameBuilderRules } from "../_ActivatableNames.js";
5
5
  import { aspectOptional } from "../_ActivatableNonMundane.js";
6
6
  import { explicit_select_options, select_options } from "../_ActivatableSelectOptions.js";
7
7
  import { skill_applications, skill_uses } from "../_ActivatableSkillApplicationsAndUses.js";
8
+ import { CeremonialItemSpecialAbilityGroupIdentifier } from "../_Identifier.js";
8
9
  import { GeneralPrerequisites } from "../_Prerequisite.js";
9
10
  import { NestedTranslationMap } from "../Locale.js";
10
11
  import { Errata } from "../source/_Erratum.js";
@@ -13,6 +14,9 @@ export const CeremonialItemSpecialAbility = DB.Entity(import.meta.url, {
13
14
  name: "CeremonialItemSpecialAbility",
14
15
  namePlural: "CeremonialItemSpecialAbilities",
15
16
  type: () => DB.Object({
17
+ associatedItem: DB.Optional({
18
+ type: CeremonialItemSpecialAbilityGroupIdentifier(),
19
+ }),
16
20
  levels,
17
21
  nameBuilderRules,
18
22
  select_options,
@@ -38,7 +42,29 @@ export const CeremonialItemSpecialAbility = DB.Entity(import.meta.url, {
38
42
  })),
39
43
  }),
40
44
  instanceDisplayName: {},
41
- instanceDisplayNameCustomizer: activatableDisplayNameCustomizer,
45
+ instanceDisplayNameCustomizer: ({ instance, instanceDisplayName, instanceDisplayNameLocaleId, locales, getDisplayNameForInstanceId, }) => {
46
+ for (const locale of locales) {
47
+ const translation = instance.translations[locale];
48
+ if (translation) {
49
+ const parent = instance.associatedItem === undefined
50
+ ? undefined
51
+ : getDisplayNameForInstanceId("CeremonialItemSpecialAbilityGroup", instance.associatedItem);
52
+ return {
53
+ name: (parent === undefined ? "" : parent.name + " — ") +
54
+ (translation.name_in_library ?? translation.name),
55
+ localeId: locale,
56
+ };
57
+ }
58
+ }
59
+ // {
60
+ // name:
61
+ // instanceDisplayName.length > 0
62
+ // ? instanceDisplayName
63
+ // : (getDisplayNameForInstanceId(instance.parent)?.name ?? ""),
64
+ // localeId: instanceDisplayNameLocaleId,
65
+ // }
66
+ return { name: instanceDisplayName, localeId: instanceDisplayNameLocaleId };
67
+ },
42
68
  uniqueConstraints: [
43
69
  [
44
70
  {
@@ -0,0 +1,7 @@
1
+ import * as DB from "tsondb/schema/dsl";
2
+ export declare const CeremonialItemSpecialAbilityGroup: DB.Entity<"CeremonialItemSpecialAbilityGroup", {
3
+ translations: DB.MemberDecl<DB.NestedEntityMap<"CeremonialItemSpecialAbilityGroupTranslation", {
4
+ name: DB.MemberDecl<DB.String, true>;
5
+ nameForSorting: DB.MemberDecl<DB.String, true>;
6
+ }>, true>;
7
+ }, undefined>;
@@ -0,0 +1,31 @@
1
+ import * as DB from "tsondb/schema/dsl";
2
+ import { NestedTranslationMap } from "../../Locale.js";
3
+ export const CeremonialItemSpecialAbilityGroup = DB.Entity(import.meta.url, {
4
+ name: "CeremonialItemSpecialAbilityGroup",
5
+ namePlural: "CeremonialItemSpecialAbilityGroups",
6
+ type: () => DB.Object({
7
+ translations: NestedTranslationMap(DB.Required, "CeremonialItemSpecialAbilityGroup", DB.Object({
8
+ name: DB.Required({
9
+ comment: "The name of the ceremonial item. This should be the heading used in the respective publication.",
10
+ type: DB.String({ minLength: 1 }),
11
+ }),
12
+ nameForSorting: DB.Required({
13
+ comment: "The name of the ceremonial item for sorting purposes, if different from the actual name.",
14
+ type: DB.String({ minLength: 1 }),
15
+ }),
16
+ })),
17
+ }),
18
+ instanceDisplayName: {
19
+ pathInLocaleMap: "nameForSorting",
20
+ },
21
+ uniqueConstraints: [
22
+ {
23
+ entityMapKeyPath: "translations",
24
+ keyPathInEntityMap: "name",
25
+ },
26
+ {
27
+ entityMapKeyPath: "translations",
28
+ keyPathInEntityMap: "nameForSorting",
29
+ },
30
+ ],
31
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optolith/database-schema",
3
- "version": "0.63.1",
3
+ "version": "0.65.0",
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",
@@ -39,7 +39,7 @@
39
39
  "license": "MPL-2.0",
40
40
  "dependencies": {
41
41
  "@elyukai/utils": "^0.3.6",
42
- "tsondb": "^0.20.4",
42
+ "tsondb": "^0.21.1",
43
43
  "yaml": "^2.9.0"
44
44
  },
45
45
  "devDependencies": {