@optolith/database-schema 0.96.0 → 0.97.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.97.1](https://github.com/Optolith/database-schema/compare/v0.97.0...v0.97.1) (2026-10-13)
6
+
7
+ ### Bug Fixes
8
+
9
+ * advantages and disadvantages may only differ by subtype ([2c36b0d](https://github.com/Optolith/database-schema/commit/2c36b0d2f3bf81ae1e7d66eacd6f43742ad835ee))
10
+
11
+ ## [0.97.0](https://github.com/Optolith/database-schema/compare/v0.96.0...v0.97.0) (2026-10-13)
12
+
13
+ ### ⚠ BREAKING CHANGES
14
+
15
+ * herbal preservation longevity can be translation-only
16
+ * translations for book value and profession spellworks with magical actions
17
+
18
+ ### Bug Fixes
19
+
20
+ * herbal preservation longevity can be translation-only ([4e9b529](https://github.com/Optolith/database-schema/commit/4e9b5291c04f338d6de8019bd83ed3b86aec484e)), closes [#204](https://github.com/Optolith/database-schema/issues/204), references [#203](https://github.com/Optolith/database-schema/issues/203)
21
+ * translations for book value and profession spellworks with magical actions ([883178a](https://github.com/Optolith/database-schema/commit/883178af886579002950bcd76b99b49a030c9344))
22
+
5
23
  ## [0.96.0](https://github.com/Optolith/database-schema/compare/v0.95.0...v0.96.0) (2026-10-12)
6
24
 
7
25
  ### ⚠ BREAKING CHANGES
package/gen/types.d.ts CHANGED
@@ -349,6 +349,7 @@ export type EnumMap = {
349
349
  GoblinRitualRangeValue: GoblinRitualRangeValue
350
350
  GradientColor: GradientColor
351
351
  HerbalAidCombatUse: HerbalAidCombatUse
352
+ HerbalPreservationLongevity: HerbalPreservationLongevity
352
353
  HerbalPreservationLongevityValue: HerbalPreservationLongevityValue
353
354
  HitZone: HitZone
354
355
  ImprovementCost: ImprovementCost
@@ -658,6 +659,7 @@ export type TypeAliasMap = {
658
659
  Erratum: Erratum
659
660
  ExclusiveCantripNote: ExclusiveCantripNote
660
661
  ExpressionBasedDuration: ExpressionBasedDuration
662
+ ExpressionBasedHerbalPreservationLongevity: ExpressionBasedHerbalPreservationLongevity
661
663
  ExpressionBasedParameterValue: ExpressionBasedParameterValue
662
664
  ExpressionBasedPoisonTime: ExpressionBasedPoisonTime
663
665
  ExpressionBasedPoisonTimeValue: ExpressionBasedPoisonTimeValue
@@ -715,7 +717,6 @@ export type TypeAliasMap = {
715
717
  HeadHitZone: HeadHitZone
716
718
  HeadHitZoneCombinationPossibilities: HeadHitZoneCombinationPossibilities
717
719
  HerbalAidRecipe: HerbalAidRecipe
718
- HerbalPreservationLongevity: HerbalPreservationLongevity
719
720
  HerbalPreservationLongevityExpression: HerbalPreservationLongevityExpression
720
721
  Immediate: Immediate
721
722
  ImprovisedWeapon: ImprovisedWeapon
@@ -728,6 +729,7 @@ export type TypeAliasMap = {
728
729
  IndefiniteDominationRitualDuration: IndefiniteDominationRitualDuration
729
730
  IndefiniteDuration: IndefiniteDuration
730
731
  IndefiniteFamiliarsTrickProperty: IndefiniteFamiliarsTrickProperty
732
+ IndefiniteHerbalPreservationLongevity: IndefiniteHerbalPreservationLongevity
731
733
  IndefiniteMagicalDanceCost: IndefiniteMagicalDanceCost
732
734
  IndefiniteOneTimeCost: IndefiniteOneTimeCost
733
735
  IndefinitePlantDescription: IndefinitePlantDescription
@@ -2763,6 +2765,7 @@ export interface Locale {
2763
2765
  "Entertainment": string
2764
2766
  "Topics": string
2765
2767
  "Place of Publication": string
2768
+ "Value": string
2766
2769
  "Failed": string
2767
2770
  "Progress": string
2768
2771
  "Incubation Time": string
@@ -2832,6 +2835,7 @@ export interface Locale {
2832
2835
  "Magic Dilettante": string
2833
2836
  "mostly {$variants :list type=conjunction}": string & { __params: { "variants": string[] } }
2834
2837
  "only {$variants :list type=conjunction}": string & { __params: { "variants": string[] } }
2838
+ "Spellworks/Magical Actions": string
2835
2839
  "Suggested Advantages": string
2836
2840
  "Suggested Disadvantages": string
2837
2841
  "Unsuitable Advantages": string
@@ -27218,7 +27222,17 @@ export type HerbalAidCombatUse =
27218
27222
  Armor: Armor_ID
27219
27223
  }
27220
27224
 
27221
- export interface HerbalPreservationLongevity {
27225
+ export type HerbalPreservationLongevity =
27226
+ | {
27227
+ kind: "Expression"
27228
+ Expression: ExpressionBasedHerbalPreservationLongevity
27229
+ }
27230
+ | {
27231
+ kind: "Indefinite"
27232
+ Indefinite: IndefiniteHerbalPreservationLongevity
27233
+ }
27234
+
27235
+ export interface ExpressionBasedHerbalPreservationLongevity {
27222
27236
  /**
27223
27237
  * An expression that evaluates to the duration.
27224
27238
  */
@@ -27233,11 +27247,11 @@ export interface HerbalPreservationLongevity {
27233
27247
  * All translations for the entry, identified by IETF language tag (BCP47).
27234
27248
  */
27235
27249
  translations?: {
27236
- [localeId: string]: HerbalPreservationLongevityTranslation
27250
+ [localeId: string]: ExpressionHerbalPreservationLongevityTranslation
27237
27251
  }
27238
27252
  }
27239
27253
 
27240
- export interface HerbalPreservationLongevityTranslation {
27254
+ export interface ExpressionHerbalPreservationLongevityTranslation {
27241
27255
  /**
27242
27256
  * A replacement string.
27243
27257
  */
@@ -27256,6 +27270,22 @@ export type HerbalPreservationLongevityValue =
27256
27270
  Dice: Dice
27257
27271
  }
27258
27272
 
27273
+ export interface IndefiniteHerbalPreservationLongevity {
27274
+ /**
27275
+ * All translations for the entry, identified by IETF language tag (BCP47).
27276
+ */
27277
+ translations: {
27278
+ [localeId: string]: IndefiniteHerbalPreservationLongevityTranslation
27279
+ }
27280
+ }
27281
+
27282
+ export interface IndefiniteHerbalPreservationLongevityTranslation {
27283
+ /**
27284
+ * A text describing the duration.
27285
+ */
27286
+ text: ResponsiveText
27287
+ }
27288
+
27259
27289
  export interface HerbalPreservation {
27260
27290
  /**
27261
27291
  * The types of this preservation.
@@ -52,11 +52,14 @@ export const Advantage = DB.Entity(import.meta.url, {
52
52
  instanceDisplayName: {},
53
53
  instanceDisplayNameCustomizer: activatableDisplayNameCustomizer,
54
54
  uniqueConstraints: [
55
- {
56
- entityMapKeyPath: "translations",
57
- keyPathInEntityMap: "name_in_library",
58
- keyPathInEntityMapFallback: "name",
59
- },
55
+ [
56
+ {
57
+ entityMapKeyPath: "translations",
58
+ keyPathInEntityMap: "name_in_library",
59
+ keyPathInEntityMapFallback: "name",
60
+ },
61
+ { keyPath: "subtype" },
62
+ ],
60
63
  ],
61
64
  customConstraints: deps => verifySelectOptionRules("Advantage", deps),
62
65
  });
@@ -53,11 +53,14 @@ export const Disadvantage = DB.Entity(import.meta.url, {
53
53
  instanceDisplayName: {},
54
54
  instanceDisplayNameCustomizer: activatableDisplayNameCustomizer,
55
55
  uniqueConstraints: [
56
- {
57
- entityMapKeyPath: "translations",
58
- keyPathInEntityMap: "name_in_library",
59
- keyPathInEntityMapFallback: "name",
60
- },
56
+ [
57
+ {
58
+ entityMapKeyPath: "translations",
59
+ keyPathInEntityMap: "name_in_library",
60
+ keyPathInEntityMapFallback: "name",
61
+ },
62
+ { keyPath: "subtype" },
63
+ ],
61
64
  ],
62
65
  customConstraints: deps => verifySelectOptionRules("Disadvantage", deps),
63
66
  });
@@ -1604,6 +1604,7 @@ export declare const Locale: DB.Entity<"Locale", {
1604
1604
  Entertainment: null;
1605
1605
  Topics: null;
1606
1606
  "Place of Publication": null;
1607
+ Value: null;
1607
1608
  Failed: null;
1608
1609
  Progress: null;
1609
1610
  "Incubation Time": null;
@@ -1673,6 +1674,7 @@ export declare const Locale: DB.Entity<"Locale", {
1673
1674
  "Magic Dilettante": null;
1674
1675
  "mostly {$variants :list type=conjunction}": null;
1675
1676
  "only {$variants :list type=conjunction}": null;
1677
+ "Spellworks/Magical Actions": null;
1676
1678
  "Suggested Advantages": null;
1677
1679
  "Suggested Disadvantages": null;
1678
1680
  "Unsuitable Advantages": null;
@@ -1650,6 +1650,7 @@ export const Locale = DB.Entity(import.meta.url, {
1650
1650
  "Entertainment": null,
1651
1651
  "Topics": null,
1652
1652
  "Place of Publication": null,
1653
+ "Value": null,
1653
1654
  // sex practices
1654
1655
  "Failed": null,
1655
1656
  // diseases
@@ -1727,6 +1728,7 @@ export const Locale = DB.Entity(import.meta.url, {
1727
1728
  "mostly {$variants :list type=conjunction}": null,
1728
1729
  "only {$variants :list type=conjunction}": null,
1729
1730
  // professions
1731
+ "Spellworks/Magical Actions": null,
1730
1732
  "Suggested Advantages": null,
1731
1733
  "Suggested Disadvantages": null,
1732
1734
  "Unsuitable Advantages": null,
@@ -82,38 +82,48 @@ export declare const HerbalAid: DB.Entity<"HerbalAid", {
82
82
  Weapon: DB.EnumCase<DB.ReferenceIdentifier>;
83
83
  Armor: DB.EnumCase<DB.ReferenceIdentifier>;
84
84
  }, []>>, false>;
85
- longevity: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"HerbalPreservationLongevity", DB.Object<{
86
- value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"HerbalPreservationLongevityExpression", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], import("../../_MathExpression.ts").MathOperation>, []>>, true>;
87
- unit: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DurationUnit", {
88
- Seconds: DB.EnumCase<null>;
89
- Minutes: DB.EnumCase<null>;
90
- Hours: DB.EnumCase<null>;
91
- Days: DB.EnumCase<null>;
92
- Weeks: DB.EnumCase<null>;
93
- Months: DB.EnumCase<null>;
94
- Years: DB.EnumCase<null>;
95
- Decades: DB.EnumCase<null>;
96
- Centuries: DB.EnumCase<null>;
97
- Actions: DB.EnumCase<null>;
98
- CombatRounds: DB.EnumCase<null>;
99
- Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
100
- translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
101
- name: DB.MemberDecl<DB.String, true>;
102
- fullNumber: DB.MemberDecl<DB.String, true>;
85
+ longevity: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"HerbalPreservationLongevity", {
86
+ Expression: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ExpressionBasedHerbalPreservationLongevity", DB.Object<{
87
+ value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"HerbalPreservationLongevityExpression", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], import("../../_MathExpression.ts").MathOperation>, []>>, true>;
88
+ unit: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DurationUnit", {
89
+ Seconds: DB.EnumCase<null>;
90
+ Minutes: DB.EnumCase<null>;
91
+ Hours: DB.EnumCase<null>;
92
+ Days: DB.EnumCase<null>;
93
+ Weeks: DB.EnumCase<null>;
94
+ Months: DB.EnumCase<null>;
95
+ Years: DB.EnumCase<null>;
96
+ Decades: DB.EnumCase<null>;
97
+ Centuries: DB.EnumCase<null>;
98
+ Actions: DB.EnumCase<null>;
99
+ CombatRounds: DB.EnumCase<null>;
100
+ Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
101
+ translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
102
+ name: DB.MemberDecl<DB.String, true>;
103
+ fullNumber: DB.MemberDecl<DB.String, true>;
104
+ full: DB.MemberDecl<DB.String, true>;
105
+ symbol: DB.MemberDecl<DB.String, true>;
106
+ compressedNumber: DB.MemberDecl<DB.String, true>;
107
+ compressed: DB.MemberDecl<DB.String, true>;
108
+ }>, true>;
109
+ }>, []>>>;
110
+ }, []>>, true>;
111
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ExpressionHerbalPreservationLongevityTranslation", {
112
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
103
113
  full: DB.MemberDecl<DB.String, true>;
104
- symbol: DB.MemberDecl<DB.String, true>;
105
- compressedNumber: DB.MemberDecl<DB.String, true>;
106
114
  compressed: DB.MemberDecl<DB.String, true>;
107
- }>, true>;
108
- }>, []>>>;
109
- }, []>>, true>;
110
- translations: DB.MemberDecl<DB.NestedEntityMap<"HerbalPreservationLongevityTranslation", {
111
- replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
112
- full: DB.MemberDecl<DB.String, true>;
113
- compressed: DB.MemberDecl<DB.String, true>;
114
- }>, []>>, true>;
115
- }>, false>;
116
- }>, []>>, false>;
115
+ }>, []>>, true>;
116
+ }>, false>;
117
+ }>, []>>>;
118
+ Indefinite: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"IndefiniteHerbalPreservationLongevity", DB.Object<{
119
+ translations: DB.MemberDecl<DB.NestedEntityMap<"IndefiniteHerbalPreservationLongevityTranslation", {
120
+ text: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveText", DB.Object<{
121
+ full: DB.MemberDecl<DB.String, true>;
122
+ compressed: DB.MemberDecl<DB.String, true>;
123
+ }>, []>>, true>;
124
+ }>, true>;
125
+ }>, []>>>;
126
+ }, []>>, false>;
117
127
  src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
118
128
  id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
119
129
  occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
@@ -10,38 +10,48 @@ export declare const HerbalPreservation: DB.Entity<"HerbalPreservation", {
10
10
  Defensive: DB.EnumCase<null>;
11
11
  Supernatural: DB.EnumCase<null>;
12
12
  }, []>>>, true>;
13
- longevity: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"HerbalPreservationLongevity", DB.Object<{
14
- value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"HerbalPreservationLongevityExpression", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], MathOperation>, []>>, true>;
15
- unit: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DurationUnit", {
16
- Seconds: DB.EnumCase<null>;
17
- Minutes: DB.EnumCase<null>;
18
- Hours: DB.EnumCase<null>;
19
- Days: DB.EnumCase<null>;
20
- Weeks: DB.EnumCase<null>;
21
- Months: DB.EnumCase<null>;
22
- Years: DB.EnumCase<null>;
23
- Decades: DB.EnumCase<null>;
24
- Centuries: DB.EnumCase<null>;
25
- Actions: DB.EnumCase<null>;
26
- CombatRounds: DB.EnumCase<null>;
27
- Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
28
- translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
29
- name: DB.MemberDecl<DB.String, true>;
30
- fullNumber: DB.MemberDecl<DB.String, true>;
13
+ longevity: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"HerbalPreservationLongevity", {
14
+ Expression: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ExpressionBasedHerbalPreservationLongevity", DB.Object<{
15
+ value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"HerbalPreservationLongevityExpression", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], MathOperation>, []>>, true>;
16
+ unit: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DurationUnit", {
17
+ Seconds: DB.EnumCase<null>;
18
+ Minutes: DB.EnumCase<null>;
19
+ Hours: DB.EnumCase<null>;
20
+ Days: DB.EnumCase<null>;
21
+ Weeks: DB.EnumCase<null>;
22
+ Months: DB.EnumCase<null>;
23
+ Years: DB.EnumCase<null>;
24
+ Decades: DB.EnumCase<null>;
25
+ Centuries: DB.EnumCase<null>;
26
+ Actions: DB.EnumCase<null>;
27
+ CombatRounds: DB.EnumCase<null>;
28
+ Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
29
+ translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
30
+ name: DB.MemberDecl<DB.String, true>;
31
+ fullNumber: DB.MemberDecl<DB.String, true>;
32
+ full: DB.MemberDecl<DB.String, true>;
33
+ symbol: DB.MemberDecl<DB.String, true>;
34
+ compressedNumber: DB.MemberDecl<DB.String, true>;
35
+ compressed: DB.MemberDecl<DB.String, true>;
36
+ }>, true>;
37
+ }>, []>>>;
38
+ }, []>>, true>;
39
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ExpressionHerbalPreservationLongevityTranslation", {
40
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
31
41
  full: DB.MemberDecl<DB.String, true>;
32
- symbol: DB.MemberDecl<DB.String, true>;
33
- compressedNumber: DB.MemberDecl<DB.String, true>;
34
42
  compressed: DB.MemberDecl<DB.String, true>;
35
- }>, true>;
36
- }>, []>>>;
37
- }, []>>, true>;
38
- translations: DB.MemberDecl<DB.NestedEntityMap<"HerbalPreservationLongevityTranslation", {
39
- replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
40
- full: DB.MemberDecl<DB.String, true>;
41
- compressed: DB.MemberDecl<DB.String, true>;
42
- }>, []>>, true>;
43
- }>, false>;
44
- }>, []>>, true>;
43
+ }>, []>>, true>;
44
+ }>, false>;
45
+ }>, []>>>;
46
+ Indefinite: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"IndefiniteHerbalPreservationLongevity", DB.Object<{
47
+ translations: DB.MemberDecl<DB.NestedEntityMap<"IndefiniteHerbalPreservationLongevityTranslation", {
48
+ text: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveText", DB.Object<{
49
+ full: DB.MemberDecl<DB.String, true>;
50
+ compressed: DB.MemberDecl<DB.String, true>;
51
+ }>, []>>, true>;
52
+ }>, true>;
53
+ }>, []>>>;
54
+ }, []>>, true>;
45
55
  src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
46
56
  id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
47
57
  occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
@@ -89,43 +99,45 @@ export declare const HerbalPreservation: DB.Entity<"HerbalPreservation", {
89
99
  alternative_effect: DB.MemberDecl<DB.String, true>;
90
100
  }>, true>;
91
101
  }, undefined>;
92
- export declare const HerbalPreservationLongevity: DB.TypeAlias<"HerbalPreservationLongevity", DB.Object<{
93
- value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"HerbalPreservationLongevityExpression", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], MathOperation>, []>>, true>;
94
- unit: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DurationUnit", {
95
- Seconds: DB.EnumCase<null>;
96
- Minutes: DB.EnumCase<null>;
97
- Hours: DB.EnumCase<null>;
98
- Days: DB.EnumCase<null>;
99
- Weeks: DB.EnumCase<null>;
100
- Months: DB.EnumCase<null>;
101
- Years: DB.EnumCase<null>;
102
- Decades: DB.EnumCase<null>;
103
- Centuries: DB.EnumCase<null>;
104
- Actions: DB.EnumCase<null>;
105
- CombatRounds: DB.EnumCase<null>;
106
- Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
107
- translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
108
- name: DB.MemberDecl<DB.String, true>;
109
- fullNumber: DB.MemberDecl<DB.String, true>;
102
+ export declare const HerbalPreservationLongevity: DB.Enum<"HerbalPreservationLongevity", {
103
+ Expression: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ExpressionBasedHerbalPreservationLongevity", DB.Object<{
104
+ value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"HerbalPreservationLongevityExpression", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], MathOperation>, []>>, true>;
105
+ unit: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DurationUnit", {
106
+ Seconds: DB.EnumCase<null>;
107
+ Minutes: DB.EnumCase<null>;
108
+ Hours: DB.EnumCase<null>;
109
+ Days: DB.EnumCase<null>;
110
+ Weeks: DB.EnumCase<null>;
111
+ Months: DB.EnumCase<null>;
112
+ Years: DB.EnumCase<null>;
113
+ Decades: DB.EnumCase<null>;
114
+ Centuries: DB.EnumCase<null>;
115
+ Actions: DB.EnumCase<null>;
116
+ CombatRounds: DB.EnumCase<null>;
117
+ Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
118
+ translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
119
+ name: DB.MemberDecl<DB.String, true>;
120
+ fullNumber: DB.MemberDecl<DB.String, true>;
121
+ full: DB.MemberDecl<DB.String, true>;
122
+ symbol: DB.MemberDecl<DB.String, true>;
123
+ compressedNumber: DB.MemberDecl<DB.String, true>;
124
+ compressed: DB.MemberDecl<DB.String, true>;
125
+ }>, true>;
126
+ }>, []>>>;
127
+ }, []>>, true>;
128
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ExpressionHerbalPreservationLongevityTranslation", {
129
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
110
130
  full: DB.MemberDecl<DB.String, true>;
111
- symbol: DB.MemberDecl<DB.String, true>;
112
- compressedNumber: DB.MemberDecl<DB.String, true>;
113
131
  compressed: DB.MemberDecl<DB.String, true>;
114
- }>, true>;
115
- }>, []>>>;
116
- }, []>>, true>;
117
- translations: DB.MemberDecl<DB.NestedEntityMap<"HerbalPreservationLongevityTranslation", {
118
- replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
119
- full: DB.MemberDecl<DB.String, true>;
120
- compressed: DB.MemberDecl<DB.String, true>;
121
- }>, []>>, true>;
122
- }>, false>;
123
- }>, []>;
124
- export declare const HerbalPreservationLongevityExpression: DB.TypeAlias<"HerbalPreservationLongevityExpression", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], MathOperation>, []>;
125
- export declare const HerbalPreservationLongevityValue: DB.Enum<"HerbalPreservationLongevityValue", {
126
- Constant: DB.EnumCase<DB.Integer>;
127
- Dice: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"Dice", DB.Object<{
128
- number: DB.MemberDecl<DB.Integer, true>;
129
- sides: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DieType", DB.Integer, []>>, true>;
132
+ }>, []>>, true>;
133
+ }>, false>;
134
+ }>, []>>>;
135
+ Indefinite: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"IndefiniteHerbalPreservationLongevity", DB.Object<{
136
+ translations: DB.MemberDecl<DB.NestedEntityMap<"IndefiniteHerbalPreservationLongevityTranslation", {
137
+ text: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveText", DB.Object<{
138
+ full: DB.MemberDecl<DB.String, true>;
139
+ compressed: DB.MemberDecl<DB.String, true>;
140
+ }>, []>>, true>;
141
+ }>, true>;
130
142
  }>, []>>>;
131
143
  }, []>;
@@ -2,7 +2,7 @@ import * as DB from "tsondb/schema/dsl";
2
2
  import { DurationUnit } from "../../_ActivatableSkillDuration.js";
3
3
  import { Dice } from "../../_Dice.js";
4
4
  import { MathOperation } from "../../_MathExpression.js";
5
- import { ResponsiveTextReplace } from "../../_ResponsiveText.js";
5
+ import { ResponsiveText, ResponsiveTextReplace } from "../../_ResponsiveText.js";
6
6
  import { NestedTranslationMap } from "../../Locale.js";
7
7
  import { src } from "../../source/_PublicationRef.js";
8
8
  import { EffectType } from "./_Herbary.js";
@@ -12,7 +12,10 @@ export const HerbalPreservation = DB.Entity(import.meta.url, {
12
12
  type: () => DB.Object({
13
13
  types: DB.Required({
14
14
  comment: "The types of this preservation.",
15
- type: DB.Array(DB.IncludeIdentifier(EffectType), { minItems: 1, uniqueItems: true }),
15
+ type: DB.Array(DB.IncludeIdentifier(EffectType), {
16
+ minItems: 1,
17
+ uniqueItems: true,
18
+ }),
16
19
  }),
17
20
  longevity: DB.Required({
18
21
  comment: "How long this preservation lasts.",
@@ -42,8 +45,17 @@ export const HerbalPreservation = DB.Entity(import.meta.url, {
42
45
  },
43
46
  ],
44
47
  });
45
- export const HerbalPreservationLongevity = DB.TypeAlias(import.meta.url, {
48
+ export const HerbalPreservationLongevity = DB.Enum(import.meta.url, {
46
49
  name: "HerbalPreservationLongevity",
50
+ values: () => ({
51
+ Expression: DB.EnumCase({
52
+ type: DB.IncludeIdentifier(ExpressionBasedHerbalPreservationLongevity),
53
+ }),
54
+ Indefinite: DB.EnumCase({ type: DB.IncludeIdentifier(IndefiniteHerbalPreservationLongevity) }),
55
+ }),
56
+ });
57
+ const ExpressionBasedHerbalPreservationLongevity = DB.TypeAlias(import.meta.url, {
58
+ name: "ExpressionBasedHerbalPreservationLongevity",
47
59
  type: () => DB.Object({
48
60
  value: DB.Required({
49
61
  comment: "An expression that evaluates to the duration.",
@@ -53,7 +65,7 @@ export const HerbalPreservationLongevity = DB.TypeAlias(import.meta.url, {
53
65
  comment: "The duration unit.",
54
66
  type: DB.IncludeIdentifier(DurationUnit),
55
67
  }),
56
- translations: NestedTranslationMap(DB.Optional, "HerbalPreservationLongevity", DB.Object({
68
+ translations: NestedTranslationMap(DB.Optional, "ExpressionHerbalPreservationLongevity", DB.Object({
57
69
  replacement: DB.Required({
58
70
  comment: "A replacement string.",
59
71
  type: DB.IncludeIdentifier(ResponsiveTextReplace),
@@ -61,13 +73,13 @@ export const HerbalPreservationLongevity = DB.TypeAlias(import.meta.url, {
61
73
  })),
62
74
  }),
63
75
  });
64
- export const HerbalPreservationLongevityExpression = DB.TypeAlias(import.meta.url, {
76
+ const HerbalPreservationLongevityExpression = DB.TypeAlias(import.meta.url, {
65
77
  name: "HerbalPreservationLongevityExpression",
66
78
  type: () => DB.GenIncludeIdentifier(MathOperation, [
67
79
  DB.IncludeIdentifier(HerbalPreservationLongevityValue),
68
80
  ]),
69
81
  });
70
- export const HerbalPreservationLongevityValue = DB.Enum(import.meta.url, {
82
+ const HerbalPreservationLongevityValue = DB.Enum(import.meta.url, {
71
83
  name: "HerbalPreservationLongevityValue",
72
84
  values: () => ({
73
85
  Constant: DB.EnumCase({ type: DB.Integer({ minimum: 1 }) }),
@@ -76,3 +88,14 @@ export const HerbalPreservationLongevityValue = DB.Enum(import.meta.url, {
76
88
  }),
77
89
  }),
78
90
  });
91
+ const IndefiniteHerbalPreservationLongevity = DB.TypeAlias(import.meta.url, {
92
+ name: "IndefiniteHerbalPreservationLongevity",
93
+ type: () => DB.Object({
94
+ translations: NestedTranslationMap(DB.Required, "IndefiniteHerbalPreservationLongevity", DB.Object({
95
+ text: DB.Required({
96
+ comment: "A text describing the duration.",
97
+ type: DB.IncludeIdentifier(ResponsiveText),
98
+ }),
99
+ })),
100
+ }),
101
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optolith/database-schema",
3
- "version": "0.96.0",
3
+ "version": "0.97.1",
4
4
  "description": "Definitions and utilities for the flat-file database of Optolith, a character creation tool for the Pen and Paper RPG “The Dark Eye 5”, and its external integrations into other software.",
5
5
  "keywords": [
6
6
  "tde",