@optolith/database-schema 0.60.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 +18 -0
- package/gen/types.d.ts +20 -1
- package/lib/types/Locale.d.ts +2 -0
- package/lib/types/Locale.js +2 -0
- package/lib/types/Profession.d.ts +12 -92
- package/lib/types/Profession.js +2 -2
- package/lib/types/_Prerequisite.d.ts +4 -0
- package/lib/types/_Prerequisite.js +27 -0
- package/package.json +1 -1
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.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))
|
|
14
|
+
## [0.61.0](https://github.com/Optolith/database-schema/compare/v0.60.0...v0.61.0) (2026-09-13)
|
|
15
|
+
|
|
16
|
+
### ⚠ BREAKING CHANGES
|
|
17
|
+
|
|
18
|
+
* **content:** add STD translation
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **content:** add STD translation ([3ff3417](https://github.com/Optolith/database-schema/commit/3ff34175d031be21801f7b9449919897523256e4))
|
|
5
23
|
## [0.60.0](https://github.com/Optolith/database-schema/compare/v0.59.0...v0.60.0) (2026-09-12)
|
|
6
24
|
|
|
7
25
|
### ⚠ 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 } }
|
|
@@ -2616,6 +2620,7 @@ export interface Locale {
|
|
|
2616
2620
|
"Communicability to Intelligent Creatures": string
|
|
2617
2621
|
"childhood disease": string
|
|
2618
2622
|
"magical disease": string
|
|
2623
|
+
"sexually transmittable disease": string
|
|
2619
2624
|
"Can be combined with": string
|
|
2620
2625
|
"Skill": string
|
|
2621
2626
|
"{$defaultDuration}, but no more than {$maximumDuration}": string & { __params: { "defaultDuration": StringableTranslationParameter; "maximumDuration": StringableTranslationParameter } }
|
|
@@ -9850,7 +9855,7 @@ export interface ProfessionVariant {
|
|
|
9850
9855
|
/**
|
|
9851
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.
|
|
9852
9857
|
*/
|
|
9853
|
-
prerequisites?:
|
|
9858
|
+
prerequisites?: ProfessionVariantPrerequisites
|
|
9854
9859
|
|
|
9855
9860
|
/**
|
|
9856
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.
|
|
@@ -9912,6 +9917,20 @@ export interface ProfessionVariantTranslation {
|
|
|
9912
9917
|
concluding_text?: string
|
|
9913
9918
|
}
|
|
9914
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
|
+
|
|
9915
9934
|
/**
|
|
9916
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.
|
|
9917
9936
|
*/
|
package/lib/types/Locale.d.ts
CHANGED
|
@@ -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;
|
|
@@ -1545,6 +1546,7 @@ export declare const Locale: DB.Entity<"Locale", {
|
|
|
1545
1546
|
"Communicability to Intelligent Creatures": null;
|
|
1546
1547
|
"childhood disease": null;
|
|
1547
1548
|
"magical disease": null;
|
|
1549
|
+
"sexually transmittable disease": null;
|
|
1548
1550
|
"Can be combined with": null;
|
|
1549
1551
|
Skill: null;
|
|
1550
1552
|
"{$defaultDuration}, but no more than {$maximumDuration}": null;
|
package/lib/types/Locale.js
CHANGED
|
@@ -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
|
|
@@ -1590,6 +1591,7 @@ export const Locale = DB.Entity(import.meta.url, {
|
|
|
1590
1591
|
"Communicability to Intelligent Creatures": null,
|
|
1591
1592
|
"childhood disease": null,
|
|
1592
1593
|
"magical disease": null,
|
|
1594
|
+
"sexually transmittable disease": null,
|
|
1593
1595
|
// personality traits
|
|
1594
1596
|
"Can be combined with": null,
|
|
1595
1597
|
// magical actions
|
|
@@ -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<"
|
|
301
|
-
|
|
302
|
-
|
|
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<"
|
|
1088
|
-
|
|
1089
|
-
|
|
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<"
|
|
1867
|
-
|
|
1868
|
-
|
|
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<"
|
|
2155
|
-
|
|
2156
|
-
|
|
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", {
|
package/lib/types/Profession.js
CHANGED
|
@@ -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(
|
|
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.
|
|
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",
|