@optolith/database-schema 0.61.0 → 0.62.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 CHANGED
@@ -2,6 +2,15 @@
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.62.0](https://github.com/Optolith/database-schema/compare/v0.61.0...v0.62.0) (2026-09-15)
6
+
7
+ ### ⚠ BREAKING CHANGES
8
+
9
+ * removable prerequisites in profession variants
10
+
11
+ ### Features
12
+
13
+ * removable prerequisites in profession variants ([da532f7](https://github.com/Optolith/database-schema/commit/da532f7fd939602dd042ecd4599bda74cca4fc8c))
5
14
  ## [0.61.0](https://github.com/Optolith/database-schema/compare/v0.60.0...v0.61.0) (2026-09-13)
6
15
 
7
16
  ### ⚠ BREAKING CHANGES
package/gen/types.d.ts CHANGED
@@ -395,6 +395,7 @@ export type EnumMap = {
395
395
  PoisonStart: PoisonStart
396
396
  PoisonTimeUnit: PoisonTimeUnit
397
397
  PreconditionGroup: PreconditionGroup
398
+ PrerequisiteDiff: PrerequisiteDiff<unknown>
398
399
  PrerequisitesElement: PrerequisitesElement<unknown>
399
400
  PrimaryAttributeCategory: PrimaryAttributeCategory
400
401
  PrimaryAttributeDamageThreshold: PrimaryAttributeDamageThreshold
@@ -792,6 +793,7 @@ export type TypeAliasMap = {
792
793
  PersonalityTraitPrerequisites: PersonalityTraitPrerequisites
793
794
  PlainBookRules: PlainBookRules
794
795
  PlainCommonProfessions: PlainCommonProfessions
796
+ PlainDiffPrerequisites: PlainDiffPrerequisites<unknown>
795
797
  PlainGeneralPrerequisites: PlainGeneralPrerequisites
796
798
  PlainPrerequisites: PlainPrerequisites<unknown>
797
799
  PlantEffect: PlantEffect
@@ -817,6 +819,7 @@ export type TypeAliasMap = {
817
819
  ProfessionSpecialAbilitySelection: ProfessionSpecialAbilitySelection
818
820
  ProfessionSpellworkIdentifier: ProfessionSpellworkIdentifier
819
821
  ProfessionVariantPackageOptions: ProfessionVariantPackageOptions
822
+ ProfessionVariantPrerequisites: ProfessionVariantPrerequisites
820
823
  ProfessionVariantSpecialAbility: ProfessionVariantSpecialAbility
821
824
  PropertiesSelectOptionCategory: PropertiesSelectOptionCategory
822
825
  Protection: Protection
@@ -2171,6 +2174,7 @@ export interface Locale {
2171
2174
  "no advantage": string
2172
2175
  "disadvantage": string
2173
2176
  "no disadvantage": string
2177
+ "no prerequisite {$prerequisite}": string & { __params: { "prerequisite": StringableTranslationParameter } }
2174
2178
  "domain {$domain}": string & { __params: { "domain": StringableTranslationParameter } }
2175
2179
  "{$pact} level {$pactLevel}": string & { __params: { "pact": StringableTranslationParameter; "pactLevel": StringableTranslationParameter } }
2176
2180
  "Level {$level}": string & { __params: { "level": StringableTranslationParameter } }
@@ -9851,7 +9855,7 @@ export interface ProfessionVariant {
9851
9855
  /**
9852
9856
  * Which prerequisites must be met to buy the stat block? For example, a character might need the advantage Spellcaster or Blessed. Note: the AP cost for a profession package does not include these prerequisites.
9853
9857
  */
9854
- prerequisites?: ProfessionPrerequisites
9858
+ prerequisites?: ProfessionVariantPrerequisites
9855
9859
 
9856
9860
  /**
9857
9861
  * In some areas, the profession package grants a loose set of stats where the player must choose between different options for the profession package. The variant may override or remove those options.
@@ -9913,6 +9917,20 @@ export interface ProfessionVariantTranslation {
9913
9917
  concluding_text?: string
9914
9918
  }
9915
9919
 
9920
+ export type ProfessionVariantPrerequisites = PlainDiffPrerequisites<ProfessionPrerequisiteGroup>
9921
+
9922
+ export type PlainDiffPrerequisites<T> = PrerequisiteDiff<PrerequisitesElement<T>>[]
9923
+
9924
+ export type PrerequisiteDiff<T> =
9925
+ | {
9926
+ kind: "Add"
9927
+ Add: T
9928
+ }
9929
+ | {
9930
+ kind: "Remove"
9931
+ Remove: T
9932
+ }
9933
+
9916
9934
  /**
9917
9935
  * In some areas, the profession package grants a loose set of stats where the player must choose between different options for the profession package. The variant may override or remove those options.
9918
9936
  */
@@ -1085,6 +1085,7 @@ export declare const Locale: DB.Entity<"Locale", {
1085
1085
  "no advantage": null;
1086
1086
  disadvantage: null;
1087
1087
  "no disadvantage": null;
1088
+ "no prerequisite {$prerequisite}": null;
1088
1089
  "domain {$domain}": null;
1089
1090
  "{$pact} level {$pactLevel}": null;
1090
1091
  "Level {$level}": null;
@@ -1110,6 +1110,7 @@ export const Locale = DB.Entity(import.meta.url, {
1110
1110
  "no advantage": null,
1111
1111
  "disadvantage": null,
1112
1112
  "no disadvantage": null,
1113
+ "no prerequisite {$prerequisite}": null,
1113
1114
  "domain {$domain}": null,
1114
1115
  "{$pact} level {$pactLevel}": null,
1115
1116
  // Personality Trait prerequisite
@@ -297,29 +297,9 @@ export declare const Profession: DB.Entity<"Profession", {
297
297
  variants: DB.MemberDecl<DB.ChildEntities<DB.Entity<"ProfessionVariant", {
298
298
  profession_package: DB.MemberDecl<DB.ReferenceIdentifier, true>;
299
299
  ap_value: DB.MemberDecl<DB.Integer, false>;
300
- prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
301
- Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
302
- Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
303
- list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
304
- display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
305
- Hide: DB.EnumCase<null>;
306
- ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
307
- sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
308
- Standalone: DB.EnumCase<null>;
309
- Connected: DB.EnumCase<null>;
310
- }, []>>, false>;
311
- translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
312
- replacement: DB.MemberDecl<DB.String, true>;
313
- }>, true>;
314
- }>, []>>>;
315
- }, []>>, false>;
316
- }>, [T: DB.Param<"T", DB.Type>]>>>;
317
- Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteGroup", DB.Object<{
318
- list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
319
- translations: DB.MemberDecl<DB.NestedEntityMap<"PrerequisiteGroupTranslation", {
320
- text: DB.MemberDecl<DB.String, true>;
321
- }>, true>;
322
- }>, [T: DB.Param<"T", DB.Type>]>>>;
300
+ prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionVariantPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainDiffPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisiteDiff", {
301
+ Add: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
302
+ Remove: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
323
303
  }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>>, false>;
324
304
  options: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionVariantPackageOptions", DB.Object<{
325
305
  skill_specialization: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
@@ -1084,29 +1064,9 @@ export declare const ProfessionVersion: DB.Entity<"ProfessionVersion", {
1084
1064
  variants: DB.MemberDecl<DB.ChildEntities<DB.Entity<"ProfessionVariant", {
1085
1065
  profession_package: DB.MemberDecl<DB.ReferenceIdentifier, true>;
1086
1066
  ap_value: DB.MemberDecl<DB.Integer, false>;
1087
- prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
1088
- Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1089
- Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
1090
- list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
1091
- display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
1092
- Hide: DB.EnumCase<null>;
1093
- ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
1094
- sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
1095
- Standalone: DB.EnumCase<null>;
1096
- Connected: DB.EnumCase<null>;
1097
- }, []>>, false>;
1098
- translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
1099
- replacement: DB.MemberDecl<DB.String, true>;
1100
- }>, true>;
1101
- }>, []>>>;
1102
- }, []>>, false>;
1103
- }>, [T: DB.Param<"T", DB.Type>]>>>;
1104
- Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteGroup", DB.Object<{
1105
- list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
1106
- translations: DB.MemberDecl<DB.NestedEntityMap<"PrerequisiteGroupTranslation", {
1107
- text: DB.MemberDecl<DB.String, true>;
1108
- }>, true>;
1109
- }>, [T: DB.Param<"T", DB.Type>]>>>;
1067
+ prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionVariantPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainDiffPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisiteDiff", {
1068
+ Add: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1069
+ Remove: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1110
1070
  }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>>, false>;
1111
1071
  options: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionVariantPackageOptions", DB.Object<{
1112
1072
  skill_specialization: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
@@ -1863,29 +1823,9 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
1863
1823
  variants: DB.MemberDecl<DB.ChildEntities<DB.Entity<"ProfessionVariant", {
1864
1824
  profession_package: DB.MemberDecl<DB.ReferenceIdentifier, true>;
1865
1825
  ap_value: DB.MemberDecl<DB.Integer, false>;
1866
- prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
1867
- Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1868
- Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
1869
- list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
1870
- display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
1871
- Hide: DB.EnumCase<null>;
1872
- ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
1873
- sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
1874
- Standalone: DB.EnumCase<null>;
1875
- Connected: DB.EnumCase<null>;
1876
- }, []>>, false>;
1877
- translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
1878
- replacement: DB.MemberDecl<DB.String, true>;
1879
- }>, true>;
1880
- }>, []>>>;
1881
- }, []>>, false>;
1882
- }>, [T: DB.Param<"T", DB.Type>]>>>;
1883
- Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteGroup", DB.Object<{
1884
- list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
1885
- translations: DB.MemberDecl<DB.NestedEntityMap<"PrerequisiteGroupTranslation", {
1886
- text: DB.MemberDecl<DB.String, true>;
1887
- }>, true>;
1888
- }>, [T: DB.Param<"T", DB.Type>]>>>;
1826
+ prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionVariantPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainDiffPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisiteDiff", {
1827
+ Add: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1828
+ Remove: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
1889
1829
  }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>>, false>;
1890
1830
  options: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionVariantPackageOptions", DB.Object<{
1891
1831
  skill_specialization: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
@@ -2151,29 +2091,9 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
2151
2091
  export declare const ProfessionVariant: DB.Entity<"ProfessionVariant", {
2152
2092
  profession_package: DB.MemberDecl<DB.ReferenceIdentifier, true>;
2153
2093
  ap_value: DB.MemberDecl<DB.Integer, false>;
2154
- prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
2155
- Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
2156
- Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
2157
- list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
2158
- display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
2159
- Hide: DB.EnumCase<null>;
2160
- ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
2161
- sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
2162
- Standalone: DB.EnumCase<null>;
2163
- Connected: DB.EnumCase<null>;
2164
- }, []>>, false>;
2165
- translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
2166
- replacement: DB.MemberDecl<DB.String, true>;
2167
- }>, true>;
2168
- }>, []>>>;
2169
- }, []>>, false>;
2170
- }>, [T: DB.Param<"T", DB.Type>]>>>;
2171
- Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteGroup", DB.Object<{
2172
- list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
2173
- translations: DB.MemberDecl<DB.NestedEntityMap<"PrerequisiteGroupTranslation", {
2174
- text: DB.MemberDecl<DB.String, true>;
2175
- }>, true>;
2176
- }>, [T: DB.Param<"T", DB.Type>]>>>;
2094
+ prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionVariantPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainDiffPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisiteDiff", {
2095
+ Add: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
2096
+ Remove: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
2177
2097
  }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>>, false>;
2178
2098
  options: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionVariantPackageOptions", DB.Object<{
2179
2099
  skill_specialization: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"VariantOptionAction", {
@@ -3,7 +3,7 @@ import * as DB from "tsondb/schema/dsl";
3
3
  import { CommonnessRatedAdvantageDisadvantage } from "./_CommonnessRatedAdvantageDisadvantage.js";
4
4
  import { AdvantageIdentifier, CantripIdentifier, CurriculumIdentifier, DisadvantageIdentifier, ExperienceLevelIdentifier, MagicalTraditionIdentifier, ProfessionIdentifier, ProfessionPackageIdentifier, ProfessionVersionIdentifier, SkillGroupIdentifier, SkillIdentifier, } from "./_Identifier.js";
5
5
  import { CombatTechniqueIdentifier, LiturgyIdentifier, MagicalActionIdentifier, ProfessionSpecialAbilityIdentifier, RequirableSelectOptionIdentifier, SpellworkIdentifier, } from "./_IdentifierGroup.js";
6
- import { ProfessionPrerequisites } from "./_Prerequisite.js";
6
+ import { ProfessionPrerequisites, ProfessionVariantPrerequisites } from "./_Prerequisite.js";
7
7
  import { NestedTranslationMap } from "./Locale.js";
8
8
  import { Errata } from "./source/_Erratum.js";
9
9
  import { src } from "./source/_PublicationRef.js";
@@ -244,7 +244,7 @@ export const ProfessionVariant = DB.Entity(import.meta.url, {
244
244
  }),
245
245
  prerequisites: DB.Optional({
246
246
  comment: "Which prerequisites must be met to buy the stat block? For example, a character might need the advantage Spellcaster or Blessed. Note: the AP cost for a profession package does not include these prerequisites.",
247
- type: DB.IncludeIdentifier(ProfessionPrerequisites),
247
+ type: DB.IncludeIdentifier(ProfessionVariantPrerequisites),
248
248
  }),
249
249
  options: DB.Optional({
250
250
  comment: "In some areas, the profession package grants a loose set of stats where the player must choose between different options for the profession package. The variant may override or remove those options.",
@@ -149,6 +149,10 @@ export declare const ProfessionPrerequisites: DB.TypeAlias<"ProfessionPrerequisi
149
149
  }>, true>;
150
150
  }>, [T: DB.Param<"T", DB.Type>]>>>;
151
151
  }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>;
152
+ export declare const ProfessionVariantPrerequisites: DB.TypeAlias<"ProfessionVariantPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainDiffPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisiteDiff", {
153
+ Add: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
154
+ Remove: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
155
+ }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>;
152
156
  export declare const AdvantageDisadvantagePrerequisites: DB.TypeAlias<"AdvantageDisadvantagePrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesForLevels", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteForLevel", DB.Object<{
153
157
  level: DB.MemberDecl<DB.Integer, true>;
154
158
  prerequisite: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
@@ -50,6 +50,27 @@ const PlainPrerequisites = DB.GenTypeAlias(import.meta.url, {
50
50
  parameters: [DB.Param("T")],
51
51
  type: T => DB.Array(DB.GenIncludeIdentifier(PrerequisitesElement, [DB.TypeArgument(T)]), { minItems: 1 }),
52
52
  });
53
+ const PrerequisiteDiff = DB.GenEnum(import.meta.url, {
54
+ name: "PrerequisiteDiff",
55
+ parameters: [DB.Param("T")],
56
+ values: T => ({
57
+ Add: DB.EnumCase({
58
+ comment: "This prerequisite is added to the list of existing prerequisites.",
59
+ type: DB.TypeArgument(T),
60
+ }),
61
+ Remove: DB.EnumCase({
62
+ comment: "This prerequisite is removed from the list of existing prerequisites.",
63
+ type: DB.TypeArgument(T),
64
+ }),
65
+ }),
66
+ });
67
+ const PlainDiffPrerequisites = DB.GenTypeAlias(import.meta.url, {
68
+ name: "PlainDiffPrerequisites",
69
+ parameters: [DB.Param("T")],
70
+ type: T => DB.Array(DB.GenIncludeIdentifier(PrerequisiteDiff, [
71
+ DB.GenIncludeIdentifier(PrerequisitesElement, [DB.TypeArgument(T)]),
72
+ ]), { minItems: 1 }),
73
+ });
53
74
  const PrerequisiteForLevel = DB.GenTypeAlias(import.meta.url, {
54
75
  name: "PrerequisiteForLevel",
55
76
  parameters: [DB.Param("T")],
@@ -103,6 +124,12 @@ export const ProfessionPrerequisites = DB.TypeAlias(import.meta.url, {
103
124
  DB.IncludeIdentifier(ProfessionPrerequisiteGroup),
104
125
  ]),
105
126
  });
127
+ export const ProfessionVariantPrerequisites = DB.TypeAlias(import.meta.url, {
128
+ name: "ProfessionVariantPrerequisites",
129
+ type: () => DB.GenIncludeIdentifier(PlainDiffPrerequisites, [
130
+ DB.IncludeIdentifier(ProfessionPrerequisiteGroup),
131
+ ]),
132
+ });
106
133
  export const AdvantageDisadvantagePrerequisites = DB.TypeAlias(import.meta.url, {
107
134
  name: "AdvantageDisadvantagePrerequisites",
108
135
  type: () => DB.GenIncludeIdentifier(PrerequisitesForLevels, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optolith/database-schema",
3
- "version": "0.61.0",
3
+ "version": "0.62.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",