@optolith/database-schema 0.99.0 → 0.101.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/gen/types.d.ts +628 -123
  3. package/lib/main.js +1 -0
  4. package/lib/types/Culture.d.ts +312 -152
  5. package/lib/types/Locale.d.ts +8 -1
  6. package/lib/types/Locale.js +5 -0
  7. package/lib/types/Profession.d.ts +807 -466
  8. package/lib/types/Profession.js +20 -0
  9. package/lib/types/Race.d.ts +624 -304
  10. package/lib/types/_ActivatableAdvanced.d.ts +28 -0
  11. package/lib/types/_ActivatableAdvanced.js +57 -1
  12. package/lib/types/_ActivatableCombat.d.ts +45 -41
  13. package/lib/types/_ActivatableCombat.js +71 -77
  14. package/lib/types/_CommonnessRatedAdvantageDisadvantage.d.ts +80 -2
  15. package/lib/types/_CommonnessRatedAdvantageDisadvantage.js +58 -3
  16. package/lib/types/_Identifier.d.ts +1 -0
  17. package/lib/types/_Identifier.js +2 -0
  18. package/lib/types/_IdentifierGroup.d.ts +1 -0
  19. package/lib/types/_IdentifierGroup.js +2 -1
  20. package/lib/types/equipment/EquipmentPackage.d.ts +1 -0
  21. package/lib/types/equipment/item/ItemComponent.d.ts +128 -0
  22. package/lib/types/equipment/item/ItemComponent.js +316 -0
  23. package/lib/types/index.d.ts +1 -0
  24. package/lib/types/index.js +1 -0
  25. package/lib/types/prerequisites/PrerequisiteGroups.d.ts +80 -5
  26. package/lib/types/prerequisites/PrerequisiteGroups.js +5 -1
  27. package/lib/types/prerequisites/single/RatedMinimumNumberPrerequisite.js +2 -2
  28. package/lib/types/prerequisites/single/RatedMinimumNumberPrerequisiteForProfession.d.ts +150 -0
  29. package/lib/types/prerequisites/single/RatedMinimumNumberPrerequisiteForProfession.js +53 -0
  30. package/lib/types/specialAbility/AdvancedCombatSpecialAbility.d.ts +42 -41
  31. package/lib/types/specialAbility/BrawlingSpecialAbility.d.ts +42 -41
  32. package/lib/types/specialAbility/CombatSpecialAbility.d.ts +42 -41
  33. package/lib/types/specialAbility/CombatStyleSpecialAbility.d.ts +70 -41
  34. package/lib/types/specialAbility/CommandSpecialAbility.d.ts +42 -41
  35. package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.d.ts +28 -0
  36. package/lib/types/specialAbility/MagicStyleSpecialAbility.d.ts +28 -0
  37. package/lib/types/specialAbility/MagicalTradition.d.ts +1 -0
  38. package/lib/types/specialAbility/MagicalTradition.js +5 -1
  39. package/lib/types/specialAbility/SkillStyleSpecialAbility.d.ts +28 -0
  40. package/package.json +2 -2
@@ -47,5 +47,33 @@ export declare const advanced: (identifier: DB.Type) => DB.MemberDecl<DB.Array<D
47
47
  }>, []>>>;
48
48
  }, []>>, false>;
49
49
  }>, [Identifier: DB.Param<"Identifier", DB.Type>]>>>;
50
+ ByOption: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"AdvancedSpecialAbilityByOption", DB.Object<{
51
+ map: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"AdvancedSpecialAbilityByOptionMapping", DB.Object<{
52
+ option: DB.MemberDecl<DB.ReferenceIdentifier, true>;
53
+ associatedAdvanced: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"AdvancedSpecialAbilityByOptionMappingRule", {
54
+ General: DB.EnumCase<DB.TypeArgument<DB.Param<"Identifier", DB.Type>>>;
55
+ OneOf: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"OneOfAdvancedSpecialAbilityOptions", DB.Object<{
56
+ options: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"Identifier", DB.Type>>>, true>;
57
+ is_selection_required_on_purchase: DB.MemberDecl<DB.Boolean, true>;
58
+ display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
59
+ Hide: DB.EnumCase<null>;
60
+ ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
61
+ sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
62
+ Standalone: DB.EnumCase<null>;
63
+ Connected: DB.EnumCase<null>;
64
+ }, []>>, false>;
65
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
66
+ replacement: DB.MemberDecl<DB.String, true>;
67
+ }>, true>;
68
+ }>, []>>>;
69
+ }, []>>, false>;
70
+ }>, [Identifier: DB.Param<"Identifier", DB.Type>]>>>;
71
+ }, [Identifier: DB.Param<"Identifier", DB.Type>]>>, true>;
72
+ }>, [Identifier: DB.Param<"Identifier", DB.Type>]>>>, true>;
73
+ fallbackOption: DB.MemberDecl<DB.ReferenceIdentifier, false>;
74
+ translations: DB.MemberDecl<DB.NestedEntityMap<"AdvancedSpecialAbilityByOptionTranslation", {
75
+ label: DB.MemberDecl<DB.String, true>;
76
+ }>, false>;
77
+ }>, [Identifier: DB.Param<"Identifier", DB.Type>]>>>;
50
78
  Any: DB.EnumCase<null>;
51
79
  }, [Identifier: DB.Param<"Identifier", DB.Type>]>>>, true>;
@@ -1,6 +1,7 @@
1
1
  import * as DB from "tsondb/schema/dsl";
2
- import { MagicalTraditionIdentifier, PatronIdentifier } from "./_Identifier.js";
2
+ import { GeneralSelectOptionIdentifier, MagicalTraditionIdentifier, PatronIdentifier, } from "./_Identifier.js";
3
3
  import { AdvancedSpecialAbilityRestrictedOptionIdentifier } from "./_IdentifierGroup.js";
4
+ import { NestedTranslationMap } from "./Locale.js";
4
5
  import { DisplayOption } from "./prerequisites/DisplayOption.js";
5
6
  const AdvancedSpecialAbility = DB.GenEnum(import.meta.url, {
6
7
  name: "AdvancedSpecialAbility",
@@ -23,6 +24,9 @@ const AdvancedSpecialAbility = DB.GenEnum(import.meta.url, {
23
24
  DB.TypeArgument(Identifier),
24
25
  ]),
25
26
  }),
27
+ ByOption: DB.EnumCase({
28
+ type: DB.GenIncludeIdentifier(AdvancedSpecialAbilityByOption, [DB.TypeArgument(Identifier)]),
29
+ }),
26
30
  Any: DB.EnumCase({
27
31
  comment: "Any advanced special ability is possible.",
28
32
  type: null,
@@ -96,6 +100,58 @@ const AdvancedSpecialAbilityDerivedFromExternalOptionMapping = DB.GenTypeAlias(i
96
100
  }),
97
101
  }),
98
102
  });
103
+ const AdvancedSpecialAbilityByOption = DB.GenTypeAlias(import.meta.url, {
104
+ name: "AdvancedSpecialAbilityByOption",
105
+ parameters: [DB.Param("Identifier")],
106
+ type: Identifier => DB.Object({
107
+ map: DB.Required({
108
+ comment: "Map options from the external entry to allowed advanced special abilities.",
109
+ type: DB.Array(DB.GenIncludeIdentifier(AdvancedSpecialAbilityByOptionMapping, [
110
+ DB.TypeArgument(Identifier),
111
+ ]), { minItems: 1 }),
112
+ }),
113
+ fallbackOption: DB.Optional({
114
+ comment: "One of the options counts all fallback options and should be sorted last in the list.",
115
+ type: GeneralSelectOptionIdentifier(),
116
+ }),
117
+ translations: NestedTranslationMap(DB.Optional, "AdvancedSpecialAbilityByOption", DB.Object({
118
+ label: DB.Required({
119
+ comment: "How to label all options before listing each option with its advanced special ability/-ies.",
120
+ type: DB.String({ minLength: 1 }),
121
+ }),
122
+ })),
123
+ }),
124
+ });
125
+ const AdvancedSpecialAbilityByOptionMapping = DB.GenTypeAlias(import.meta.url, {
126
+ name: "AdvancedSpecialAbilityByOptionMapping",
127
+ parameters: [DB.Param("Identifier")],
128
+ comment: "Mapping from an option of this entry to an allowed advanced special ability.",
129
+ type: Identifier => DB.Object({
130
+ option: DB.Required({
131
+ comment: "The select option’s identifier.",
132
+ type: PatronIdentifier(),
133
+ }),
134
+ associatedAdvanced: DB.Required({
135
+ comment: "The advanced special ability’s identifier.",
136
+ type: DB.GenIncludeIdentifier(AdvancedSpecialAbilityByOptionMappingRule, [
137
+ DB.TypeArgument(Identifier),
138
+ ]),
139
+ }),
140
+ }),
141
+ });
142
+ const AdvancedSpecialAbilityByOptionMappingRule = DB.GenEnum(import.meta.url, {
143
+ name: "AdvancedSpecialAbilityByOptionMappingRule",
144
+ comment: "A reference to an advanced special ability.",
145
+ parameters: [DB.Param("Identifier")],
146
+ values: Identifier => ({
147
+ General: DB.EnumCase({ type: DB.TypeArgument(Identifier) }),
148
+ OneOf: DB.EnumCase({
149
+ type: DB.GenIncludeIdentifier(OneOfAdvancedSpecialAbilityOptions, [
150
+ DB.TypeArgument(Identifier),
151
+ ]),
152
+ }),
153
+ }),
154
+ });
99
155
  export const advanced = (identifier) => DB.Required({
100
156
  comment: "The Advanced Special Abilities for the respective Style Special Ability. Sometimes, only a specific select option or a set of select options of an entry is allowed, which can be modelled by the option property. It can also be that you can choose from a set of special abilities, but then you can’t specify an option.",
101
157
  type: DB.Array(DB.GenIncludeIdentifier(AdvancedSpecialAbility, [identifier]), {
@@ -69,41 +69,44 @@ export declare const combat_techniques: DB.MemberDecl<DB.IncludeIdentifier<[], D
69
69
  None: DB.EnumCase<null>;
70
70
  DependingOnCombatStyle: DB.EnumCase<null>;
71
71
  All: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"AllApplicableCombatTechniques", DB.Object<{
72
- restriction: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ApplicableAllCombatTechniquesRestriction", {
73
- Improvised: DB.EnumCase<null>;
74
- PointedBlade: DB.EnumCase<null>;
75
- Mount: DB.EnumCase<null>;
76
- Race: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableCombatTechniquesRaceRestriction", DB.ReferenceIdentifier, []>>>;
77
- ExcludeCombatTechniques: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"ApplicableCombatTechniquesNegativeCombatTechniquesRestriction", DB.Object<{
72
+ restrictions: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableAllCombatTechniquesRestrictions", DB.Object<{
73
+ isImprovised: DB.MemberDecl<DB.Boolean, false>;
74
+ hasPointedBlade: DB.MemberDecl<DB.Boolean, false>;
75
+ whileMounted: DB.MemberDecl<DB.Boolean, false>;
76
+ race: DB.MemberDecl<DB.ReferenceIdentifier, false>;
77
+ excludeCombatTechniques: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"ApplicableCombatTechniquesNegativeCombatTechniquesRestriction", DB.Object<{
78
78
  list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"Ref", DB.Type>>>, true>;
79
- }>, [Ref: DB.Param<"Ref", DB.Type>]>>>;
80
- }, []>>, false>;
79
+ }>, [Ref: DB.Param<"Ref", DB.Type>]>>, false>;
80
+ }>, []>>, false>;
81
81
  }>, []>>>;
82
82
  AllClose: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"AllApplicableCloseCombatTechniques", DB.Object<{
83
- restriction: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ApplicableCloseCombatTechniquesRestriction", {
84
- Improvised: DB.EnumCase<null>;
85
- PointedBlade: DB.EnumCase<null>;
86
- Mount: DB.EnumCase<null>;
87
- HasParry: DB.EnumCase<null>;
88
- OneHanded: DB.EnumCase<null>;
89
- TwoHanded: DB.EnumCase<null>;
90
- ParryingWeapon: DB.EnumCase<null>;
91
- Race: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableCombatTechniquesRaceRestriction", DB.ReferenceIdentifier, []>>>;
92
- ExcludeCombatTechniques: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"ApplicableCombatTechniquesNegativeCombatTechniquesRestriction", DB.Object<{
83
+ restrictions: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableCloseCombatTechniquesRestrictions", DB.Object<{
84
+ isImprovised: DB.MemberDecl<DB.Boolean, false>;
85
+ hasPointedBlade: DB.MemberDecl<DB.Boolean, false>;
86
+ whileMounted: DB.MemberDecl<DB.Boolean, false>;
87
+ hasParry: DB.MemberDecl<DB.Boolean, false>;
88
+ isOneHanded: DB.MemberDecl<DB.Boolean, false>;
89
+ isTwoHanded: DB.MemberDecl<DB.Boolean, false>;
90
+ isParryingWeapon: DB.MemberDecl<DB.Boolean, false>;
91
+ race: DB.MemberDecl<DB.ReferenceIdentifier, false>;
92
+ weaponClass: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"MeleeWeaponClass", {
93
+ Axe: DB.EnumCase<null>;
94
+ }, []>>, false>;
95
+ excludeCombatTechniques: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"ApplicableCombatTechniquesNegativeCombatTechniquesRestriction", DB.Object<{
93
96
  list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"Ref", DB.Type>>>, true>;
94
- }>, [Ref: DB.Param<"Ref", DB.Type>]>>>;
95
- }, []>>, false>;
97
+ }>, [Ref: DB.Param<"Ref", DB.Type>]>>, false>;
98
+ }>, []>>, false>;
96
99
  }>, []>>>;
97
100
  AllRanged: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"AllApplicableRangedCombatTechniques", DB.Object<{
98
- restriction: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ApplicableRangedCombatTechniquesRestriction", {
99
- Improvised: DB.EnumCase<null>;
100
- PointedBlade: DB.EnumCase<null>;
101
- Mount: DB.EnumCase<null>;
102
- Race: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableCombatTechniquesRaceRestriction", DB.ReferenceIdentifier, []>>>;
103
- ExcludeCombatTechniques: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"ApplicableCombatTechniquesNegativeCombatTechniquesRestriction", DB.Object<{
101
+ restrictions: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableRangedCombatTechniquesRestrictions", DB.Object<{
102
+ isImprovised: DB.MemberDecl<DB.Boolean, false>;
103
+ hasPointedBlade: DB.MemberDecl<DB.Boolean, false>;
104
+ whileMounted: DB.MemberDecl<DB.Boolean, false>;
105
+ race: DB.MemberDecl<DB.ReferenceIdentifier, false>;
106
+ excludeCombatTechniques: DB.MemberDecl<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"ApplicableCombatTechniquesNegativeCombatTechniquesRestriction", DB.Object<{
104
107
  list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"Ref", DB.Type>>>, true>;
105
- }>, [Ref: DB.Param<"Ref", DB.Type>]>>>;
106
- }, []>>, false>;
108
+ }>, [Ref: DB.Param<"Ref", DB.Type>]>>, false>;
109
+ }>, []>>, false>;
107
110
  }>, []>>>;
108
111
  Specific: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"SpecificApplicableCombatTechniques", DB.Object<{
109
112
  list: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"SpecificApplicableCombatTechnique", DB.Object<{
@@ -111,20 +114,21 @@ export declare const combat_techniques: DB.MemberDecl<DB.IncludeIdentifier<[], D
111
114
  CloseCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
112
115
  RangedCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
113
116
  }, []>>, true>;
114
- restriction: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ApplicableSpecificCombatTechniquesRestriction", {
115
- Improvised: DB.EnumCase<null>;
116
- PointedBlade: DB.EnumCase<null>;
117
- Mount: DB.EnumCase<null>;
118
- Race: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableCombatTechniquesRaceRestriction", DB.ReferenceIdentifier, []>>>;
119
- Level: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableCombatTechniquesLevelRestriction", DB.Object<{
120
- level: DB.MemberDecl<DB.Integer, true>;
121
- }>, []>>>;
122
- OneBluntSide: DB.EnumCase<null>;
123
- }, []>>, false>;
124
- translation: DB.MemberDecl<DB.NestedEntityMap<"SpecificApplicableCombatTechniqueTranslation", {
125
- restriction: DB.MemberDecl<DB.String, true>;
117
+ restrictions: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableSpecificCombatTechniquesRestrictions", DB.Object<{
118
+ isImprovised: DB.MemberDecl<DB.Boolean, false>;
119
+ hasPointedBlade: DB.MemberDecl<DB.Boolean, false>;
120
+ whileMounted: DB.MemberDecl<DB.Boolean, false>;
121
+ race: DB.MemberDecl<DB.ReferenceIdentifier, false>;
122
+ level: DB.MemberDecl<DB.Integer, false>;
123
+ hasOneBluntSide: DB.MemberDecl<DB.Boolean, false>;
124
+ weapons: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
125
+ }>, []>>, false>;
126
+ translations: DB.MemberDecl<DB.NestedEntityMap<"SpecificApplicableCombatTechniqueTranslation", {
127
+ restrictions: DB.MemberDecl<DB.String, true>;
126
128
  }>, false>;
127
- weapons: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
128
129
  }>, []>>>, true>;
129
130
  }>, []>>>;
130
131
  }, []>>, true>;
132
+ export declare const MeleeWeaponClass: DB.Enum<"MeleeWeaponClass", {
133
+ Axe: DB.EnumCase<null>;
134
+ }, []>;
@@ -237,24 +237,24 @@ export const combat_techniques = DB.Required({
237
237
  const AllApplicableCombatTechniques = DB.TypeAlias(import.meta.url, {
238
238
  name: "AllApplicableCombatTechniques",
239
239
  type: () => DB.Object({
240
- restriction: DB.Optional({
241
- type: DB.IncludeIdentifier(ApplicableAllCombatTechniquesRestriction),
240
+ restrictions: DB.Optional({
241
+ type: DB.IncludeIdentifier(ApplicableAllCombatTechniquesRestrictions),
242
242
  }),
243
243
  }),
244
244
  });
245
245
  const AllApplicableCloseCombatTechniques = DB.TypeAlias(import.meta.url, {
246
246
  name: "AllApplicableCloseCombatTechniques",
247
247
  type: () => DB.Object({
248
- restriction: DB.Optional({
249
- type: DB.IncludeIdentifier(ApplicableCloseCombatTechniquesRestriction),
248
+ restrictions: DB.Optional({
249
+ type: DB.IncludeIdentifier(ApplicableCloseCombatTechniquesRestrictions),
250
250
  }),
251
251
  }),
252
252
  });
253
253
  const AllApplicableRangedCombatTechniques = DB.TypeAlias(import.meta.url, {
254
254
  name: "AllApplicableRangedCombatTechniques",
255
255
  type: () => DB.Object({
256
- restriction: DB.Optional({
257
- type: DB.IncludeIdentifier(ApplicableRangedCombatTechniquesRestriction),
256
+ restrictions: DB.Optional({
257
+ type: DB.IncludeIdentifier(ApplicableRangedCombatTechniquesRestrictions),
258
258
  }),
259
259
  }),
260
260
  });
@@ -272,77 +272,84 @@ const SpecificApplicableCombatTechnique = DB.TypeAlias(import.meta.url, {
272
272
  id: DB.Required({
273
273
  type: DB.IncludeIdentifier(CombatTechniqueIdentifier),
274
274
  }),
275
- restriction: DB.Optional({
276
- type: DB.IncludeIdentifier(ApplicableSpecificCombatTechniquesRestriction),
275
+ restrictions: DB.Optional({
276
+ type: DB.IncludeIdentifier(ApplicableSpecificCombatTechniquesRestrictions),
277
277
  }),
278
- translation: NestedTranslationMap(DB.Optional, "SpecificApplicableCombatTechnique", DB.Object({
279
- restriction: DB.Required({
280
- comment: "The additional restriction of the combat technique.",
278
+ translations: NestedTranslationMap(DB.Optional, "SpecificApplicableCombatTechnique", DB.Object({
279
+ restrictions: DB.Required({
280
+ comment: "The additional restriction(s) of the combat technique.",
281
281
  type: DB.String({ minLength: 1, markdown: "inline" }),
282
282
  }),
283
283
  })),
284
- weapons: DB.Optional({
285
- comment: "The specific weapons this combat special ability is only applicable to.",
286
- type: DB.Array(WeaponIdentifier(), { minItems: 1 }),
287
- }),
288
284
  }),
289
285
  });
290
- const ApplicableAllCombatTechniquesRestriction = DB.Enum(import.meta.url, {
291
- name: "ApplicableAllCombatTechniquesRestriction",
292
- values: () => ({
293
- Improvised: DB.EnumCase({ type: null }),
294
- PointedBlade: DB.EnumCase({ type: null }),
295
- Mount: DB.EnumCase({ type: null }),
296
- Race: DB.EnumCase({ type: DB.IncludeIdentifier(ApplicableCombatTechniquesRaceRestriction) }),
297
- ExcludeCombatTechniques: DB.EnumCase({
298
- type: DB.GenIncludeIdentifier(ApplicableCombatTechniquesNegativeCombatTechniquesRestriction, [
299
- DB.IncludeIdentifier(CombatTechniqueIdentifier),
300
- ]),
286
+ const ApplicableAllCombatTechniquesRestrictions = DB.TypeAlias(import.meta.url, {
287
+ name: "ApplicableAllCombatTechniquesRestrictions",
288
+ type: () => DB.Object({
289
+ isImprovised: DB.Optional({ type: DB.Boolean() }),
290
+ hasPointedBlade: DB.Optional({ type: DB.Boolean() }),
291
+ whileMounted: DB.Optional({ type: DB.Boolean() }),
292
+ race: DB.Optional({ type: RaceIdentifier() }),
293
+ excludeCombatTechniques: DB.Optional({
294
+ type: DB.GenIncludeIdentifier(ApplicableCombatTechniquesNegativeCombatTechniquesRestriction, [DB.IncludeIdentifier(CombatTechniqueIdentifier)]),
301
295
  }),
302
- }),
296
+ }, { minProperties: 1 }),
303
297
  });
304
- const ApplicableCloseCombatTechniquesRestriction = DB.Enum(import.meta.url, {
305
- name: "ApplicableCloseCombatTechniquesRestriction",
298
+ const ApplicableCloseCombatTechniquesRestrictions = DB.TypeAlias(import.meta.url, {
299
+ name: "ApplicableCloseCombatTechniquesRestrictions",
300
+ type: () => DB.Object({
301
+ isImprovised: DB.Optional({ type: DB.Boolean() }),
302
+ hasPointedBlade: DB.Optional({ type: DB.Boolean() }),
303
+ whileMounted: DB.Optional({ type: DB.Boolean() }),
304
+ hasParry: DB.Optional({ type: DB.Boolean() }),
305
+ isOneHanded: DB.Optional({ type: DB.Boolean() }),
306
+ isTwoHanded: DB.Optional({ type: DB.Boolean() }),
307
+ isParryingWeapon: DB.Optional({ type: DB.Boolean() }),
308
+ race: DB.Optional({ type: RaceIdentifier() }),
309
+ weaponClass: DB.Optional({
310
+ comment: "Only a class of melee weapon is allowed",
311
+ type: DB.IncludeIdentifier(MeleeWeaponClass),
312
+ }),
313
+ excludeCombatTechniques: DB.Optional({
314
+ type: DB.GenIncludeIdentifier(ApplicableCombatTechniquesNegativeCombatTechniquesRestriction, [CloseCombatTechniqueIdentifier()]),
315
+ }),
316
+ }, { minProperties: 1 }),
317
+ });
318
+ export const MeleeWeaponClass = DB.Enum(import.meta.url, {
319
+ name: "MeleeWeaponClass",
306
320
  values: () => ({
307
- Improvised: DB.EnumCase({ type: null }),
308
- PointedBlade: DB.EnumCase({ type: null }),
309
- Mount: DB.EnumCase({ type: null }),
310
- HasParry: DB.EnumCase({ type: null }),
311
- OneHanded: DB.EnumCase({ type: null }),
312
- TwoHanded: DB.EnumCase({ type: null }),
313
- ParryingWeapon: DB.EnumCase({ type: null }),
314
- Race: DB.EnumCase({ type: DB.IncludeIdentifier(ApplicableCombatTechniquesRaceRestriction) }),
315
- ExcludeCombatTechniques: DB.EnumCase({
316
- type: DB.GenIncludeIdentifier(ApplicableCombatTechniquesNegativeCombatTechniquesRestriction, [
317
- CloseCombatTechniqueIdentifier(),
318
- ]),
319
- }),
321
+ Axe: DB.EnumCase({ type: null }),
320
322
  }),
321
323
  });
322
- const ApplicableRangedCombatTechniquesRestriction = DB.Enum(import.meta.url, {
323
- name: "ApplicableRangedCombatTechniquesRestriction",
324
- values: () => ({
325
- Improvised: DB.EnumCase({ type: null }),
326
- PointedBlade: DB.EnumCase({ type: null }),
327
- Mount: DB.EnumCase({ type: null }),
328
- Race: DB.EnumCase({ type: DB.IncludeIdentifier(ApplicableCombatTechniquesRaceRestriction) }),
329
- ExcludeCombatTechniques: DB.EnumCase({
330
- type: DB.GenIncludeIdentifier(ApplicableCombatTechniquesNegativeCombatTechniquesRestriction, [
331
- RangedCombatTechniqueIdentifier(),
332
- ]),
324
+ const ApplicableRangedCombatTechniquesRestrictions = DB.TypeAlias(import.meta.url, {
325
+ name: "ApplicableRangedCombatTechniquesRestrictions",
326
+ type: () => DB.Object({
327
+ isImprovised: DB.Optional({ type: DB.Boolean() }),
328
+ hasPointedBlade: DB.Optional({ type: DB.Boolean() }),
329
+ whileMounted: DB.Optional({ type: DB.Boolean() }),
330
+ race: DB.Optional({ type: RaceIdentifier() }),
331
+ excludeCombatTechniques: DB.Optional({
332
+ type: DB.GenIncludeIdentifier(ApplicableCombatTechniquesNegativeCombatTechniquesRestriction, [RangedCombatTechniqueIdentifier()]),
333
333
  }),
334
- }),
334
+ }, { minProperties: 1 }),
335
335
  });
336
- const ApplicableSpecificCombatTechniquesRestriction = DB.Enum(import.meta.url, {
337
- name: "ApplicableSpecificCombatTechniquesRestriction",
338
- values: () => ({
339
- Improvised: DB.EnumCase({ type: null }),
340
- PointedBlade: DB.EnumCase({ type: null }),
341
- Mount: DB.EnumCase({ type: null }),
342
- Race: DB.EnumCase({ type: DB.IncludeIdentifier(ApplicableCombatTechniquesRaceRestriction) }),
343
- Level: DB.EnumCase({ type: DB.IncludeIdentifier(ApplicableCombatTechniquesLevelRestriction) }),
344
- OneBluntSide: DB.EnumCase({ type: null }),
345
- }),
336
+ const ApplicableSpecificCombatTechniquesRestrictions = DB.TypeAlias(import.meta.url, {
337
+ name: "ApplicableSpecificCombatTechniquesRestrictions",
338
+ type: () => DB.Object({
339
+ isImprovised: DB.Optional({ type: DB.Boolean() }),
340
+ hasPointedBlade: DB.Optional({ type: DB.Boolean() }),
341
+ whileMounted: DB.Optional({ type: DB.Boolean() }),
342
+ race: DB.Optional({ type: RaceIdentifier() }),
343
+ level: DB.Optional({
344
+ comment: "The combat special ability is only applicable on a certain level.",
345
+ type: DB.Integer({ minimum: 1 }),
346
+ }),
347
+ hasOneBluntSide: DB.Optional({ type: DB.Boolean() }),
348
+ weapons: DB.Optional({
349
+ comment: "The specific weapons this combat special ability is only applicable to.",
350
+ type: DB.Array(WeaponIdentifier(), { minItems: 1 }),
351
+ }),
352
+ }, { minProperties: 1 }),
346
353
  });
347
354
  const ApplicableCombatTechniquesNegativeCombatTechniquesRestriction = DB.GenTypeAlias(import.meta.url, {
348
355
  name: "ApplicableCombatTechniquesNegativeCombatTechniquesRestriction",
@@ -354,16 +361,3 @@ const ApplicableCombatTechniquesNegativeCombatTechniquesRestriction = DB.GenType
354
361
  }),
355
362
  }),
356
363
  });
357
- const ApplicableCombatTechniquesRaceRestriction = DB.TypeAlias(import.meta.url, {
358
- name: "ApplicableCombatTechniquesRaceRestriction",
359
- type: () => RaceIdentifier(),
360
- });
361
- const ApplicableCombatTechniquesLevelRestriction = DB.TypeAlias(import.meta.url, {
362
- name: "ApplicableCombatTechniquesLevelRestriction",
363
- type: () => DB.Object({
364
- level: DB.Required({
365
- comment: "The combat special ability is only applicable on a certain level.",
366
- type: DB.Integer({ minimum: 1 }),
367
- }),
368
- }),
369
- });
@@ -1,5 +1,5 @@
1
1
  import * as DB from "tsondb/schema/dsl";
2
- export declare const CommonnessRatedAdvantageDisadvantage: DB.TypeAlias<"CommonnessRatedAdvantageDisadvantage", DB.Object<{
2
+ export declare const SingleCommonnessRatedAdvantageDisadvantage: DB.TypeAlias<"SingleCommonnessRatedAdvantageDisadvantage", DB.Object<{
3
3
  id: DB.MemberDecl<DB.TypeArgument<DB.Param<"Identifier", DB.Type>>, true>;
4
4
  level: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CommonnessRatedAdvantageDisadvantageLevel", {
5
5
  Constant: DB.EnumCase<DB.Integer>;
@@ -31,9 +31,87 @@ export declare const CommonnessRatedAdvantageDisadvantage: DB.TypeAlias<"Commonn
31
31
  ArcaneDancerTradition: DB.EnumCase<DB.ReferenceIdentifier>;
32
32
  Element: DB.EnumCase<DB.ReferenceIdentifier>;
33
33
  }, []>>>, false>;
34
- translations: DB.MemberDecl<DB.NestedEntityMap<"CommonnessRatedAdvantageDisadvantageTranslation", {
34
+ translations: DB.MemberDecl<DB.NestedEntityMap<"SingleCommonnessRatedAdvantageDisadvantageTranslation", {
35
35
  options: DB.MemberDecl<DB.String, false>;
36
36
  note: DB.MemberDecl<DB.String, false>;
37
37
  full: DB.MemberDecl<DB.String, false>;
38
38
  }>, false>;
39
39
  }>, [Identifier: DB.Param<"Identifier", DB.Type>]>;
40
+ export declare const CommonnessRatedAdvantageDisadvantage: DB.Enum<"CommonnessRatedAdvantageDisadvantage", {
41
+ Single: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"SingleCommonnessRatedAdvantageDisadvantage", DB.Object<{
42
+ id: DB.MemberDecl<DB.TypeArgument<DB.Param<"Identifier", DB.Type>>, true>;
43
+ level: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CommonnessRatedAdvantageDisadvantageLevel", {
44
+ Constant: DB.EnumCase<DB.Integer>;
45
+ Range: DB.EnumCase<DB.Object<{
46
+ min: DB.MemberDecl<DB.Integer, true>;
47
+ max: DB.MemberDecl<DB.Integer, true>;
48
+ }>>;
49
+ }, []>>, false>;
50
+ options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"CommonnessSelectOptionIdentifier", {
51
+ SkillGroup: DB.EnumCase<DB.ReferenceIdentifier>;
52
+ General: DB.EnumCase<DB.ReferenceIdentifier>;
53
+ Race: DB.EnumCase<DB.ReferenceIdentifier>;
54
+ Skill: DB.EnumCase<DB.ReferenceIdentifier>;
55
+ SkillApplication: DB.EnumCase<DB.ReferenceIdentifier>;
56
+ CloseCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
57
+ RangedCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
58
+ Property: DB.EnumCase<DB.ReferenceIdentifier>;
59
+ Aspect: DB.EnumCase<DB.ReferenceIdentifier>;
60
+ Disease: DB.EnumCase<DB.ReferenceIdentifier>;
61
+ Poison: DB.EnumCase<DB.ReferenceIdentifier>;
62
+ Language: DB.EnumCase<DB.ReferenceIdentifier>;
63
+ AnimalShape: DB.EnumCase<DB.ReferenceIdentifier>;
64
+ LiturgicalChant: DB.EnumCase<DB.ReferenceIdentifier>;
65
+ Ceremony: DB.EnumCase<DB.ReferenceIdentifier>;
66
+ Spell: DB.EnumCase<DB.ReferenceIdentifier>;
67
+ Ritual: DB.EnumCase<DB.ReferenceIdentifier>;
68
+ TradeSecret: DB.EnumCase<DB.ReferenceIdentifier>;
69
+ ArcaneBardTradition: DB.EnumCase<DB.ReferenceIdentifier>;
70
+ ArcaneDancerTradition: DB.EnumCase<DB.ReferenceIdentifier>;
71
+ Element: DB.EnumCase<DB.ReferenceIdentifier>;
72
+ }, []>>>, false>;
73
+ translations: DB.MemberDecl<DB.NestedEntityMap<"SingleCommonnessRatedAdvantageDisadvantageTranslation", {
74
+ options: DB.MemberDecl<DB.String, false>;
75
+ note: DB.MemberDecl<DB.String, false>;
76
+ full: DB.MemberDecl<DB.String, false>;
77
+ }>, false>;
78
+ }>, [Identifier: DB.Param<"Identifier", DB.Type>]>>>;
79
+ Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"CommonnessRatedAdvantageDisadvantageGroup", DB.Object<{
80
+ list: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"SingleCommonnessRatedAdvantageDisadvantageInGroup", DB.Object<{
81
+ id: DB.MemberDecl<DB.TypeArgument<DB.Param<"Identifier", DB.Type>>, true>;
82
+ level: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CommonnessRatedAdvantageDisadvantageLevel", {
83
+ Constant: DB.EnumCase<DB.Integer>;
84
+ Range: DB.EnumCase<DB.Object<{
85
+ min: DB.MemberDecl<DB.Integer, true>;
86
+ max: DB.MemberDecl<DB.Integer, true>;
87
+ }>>;
88
+ }, []>>, false>;
89
+ options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"CommonnessSelectOptionIdentifier", {
90
+ SkillGroup: DB.EnumCase<DB.ReferenceIdentifier>;
91
+ General: DB.EnumCase<DB.ReferenceIdentifier>;
92
+ Race: DB.EnumCase<DB.ReferenceIdentifier>;
93
+ Skill: DB.EnumCase<DB.ReferenceIdentifier>;
94
+ SkillApplication: DB.EnumCase<DB.ReferenceIdentifier>;
95
+ CloseCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
96
+ RangedCombatTechnique: DB.EnumCase<DB.ReferenceIdentifier>;
97
+ Property: DB.EnumCase<DB.ReferenceIdentifier>;
98
+ Aspect: DB.EnumCase<DB.ReferenceIdentifier>;
99
+ Disease: DB.EnumCase<DB.ReferenceIdentifier>;
100
+ Poison: DB.EnumCase<DB.ReferenceIdentifier>;
101
+ Language: DB.EnumCase<DB.ReferenceIdentifier>;
102
+ AnimalShape: DB.EnumCase<DB.ReferenceIdentifier>;
103
+ LiturgicalChant: DB.EnumCase<DB.ReferenceIdentifier>;
104
+ Ceremony: DB.EnumCase<DB.ReferenceIdentifier>;
105
+ Spell: DB.EnumCase<DB.ReferenceIdentifier>;
106
+ Ritual: DB.EnumCase<DB.ReferenceIdentifier>;
107
+ TradeSecret: DB.EnumCase<DB.ReferenceIdentifier>;
108
+ ArcaneBardTradition: DB.EnumCase<DB.ReferenceIdentifier>;
109
+ ArcaneDancerTradition: DB.EnumCase<DB.ReferenceIdentifier>;
110
+ Element: DB.EnumCase<DB.ReferenceIdentifier>;
111
+ }, []>>>, false>;
112
+ }>, [Identifier: DB.Param<"Identifier", DB.Type>]>>>, true>;
113
+ translations: DB.MemberDecl<DB.NestedEntityMap<"CommonnessRatedAdvantageDisadvantageGroupTranslation", {
114
+ text: DB.MemberDecl<DB.String, true>;
115
+ }>, true>;
116
+ }>, [Identifier: DB.Param<"Identifier", DB.Type>]>>>;
117
+ }, [Identifier: DB.Param<"Identifier", DB.Type>]>;
@@ -1,8 +1,8 @@
1
1
  import * as DB from "tsondb/schema/dsl";
2
2
  import { CommonnessSelectOptionIdentifier } from "./_IdentifierGroup.js";
3
3
  import { NestedTranslationMap } from "./Locale.js";
4
- export const CommonnessRatedAdvantageDisadvantage = DB.GenTypeAlias(import.meta.url, {
5
- name: "CommonnessRatedAdvantageDisadvantage",
4
+ export const SingleCommonnessRatedAdvantageDisadvantage = DB.GenTypeAlias(import.meta.url, {
5
+ name: "SingleCommonnessRatedAdvantageDisadvantage",
6
6
  comment: "Reference to a commonness-rated advantage or disadvantage. Commonness-rating terms used in the source books are strongly recommended, common, uncommon, suggested and unsuitable.",
7
7
  parameters: [DB.Param("Identifier")],
8
8
  type: Identifier => DB.Object({
@@ -18,7 +18,7 @@ export const CommonnessRatedAdvantageDisadvantage = DB.GenTypeAlias(import.meta.
18
18
  comment: "The options the commonness rating applies to.",
19
19
  type: DB.Array(DB.IncludeIdentifier(CommonnessSelectOptionIdentifier), { minItems: 1 }),
20
20
  }),
21
- translations: NestedTranslationMap(DB.Optional, "CommonnessRatedAdvantageDisadvantage", DB.Object({
21
+ translations: NestedTranslationMap(DB.Optional, "SingleCommonnessRatedAdvantageDisadvantage", DB.Object({
22
22
  options: DB.Optional({
23
23
  comment: "The options the commonness rating applies to. This can be specified if plain options cannot exactly describe the options as written in the publication.",
24
24
  type: DB.String({ minLength: 1 }),
@@ -47,3 +47,58 @@ const CommonnessRatedAdvantageDisadvantageLevel = DB.Enum(import.meta.url, {
47
47
  }),
48
48
  }),
49
49
  });
50
+ const SingleCommonnessRatedAdvantageDisadvantageInGroup = DB.GenTypeAlias(import.meta.url, {
51
+ name: "SingleCommonnessRatedAdvantageDisadvantageInGroup",
52
+ comment: "Reference to a commonness-rated advantage or disadvantage. Commonness-rating terms used in the source books are strongly recommended, common, uncommon, suggested and unsuitable.",
53
+ parameters: [DB.Param("Identifier")],
54
+ type: Identifier => DB.Object({
55
+ id: DB.Required({
56
+ comment: "The advantage’s or disadvantage’s identifier.",
57
+ type: DB.TypeArgument(Identifier),
58
+ }),
59
+ level: DB.Optional({
60
+ comment: "The level of a commonness-rated advantage or disadvantage.",
61
+ type: DB.IncludeIdentifier(CommonnessRatedAdvantageDisadvantageLevel),
62
+ }),
63
+ options: DB.Optional({
64
+ comment: "The options the commonness rating applies to.",
65
+ type: DB.Array(DB.IncludeIdentifier(CommonnessSelectOptionIdentifier), { minItems: 1 }),
66
+ }),
67
+ }),
68
+ });
69
+ const CommonnessRatedAdvantageDisadvantageGroup = DB.GenTypeAlias(import.meta.url, {
70
+ name: "CommonnessRatedAdvantageDisadvantageGroup",
71
+ comment: "Reference to a commonness-rated advantage or disadvantage. Commonness-rating terms used in the source books are strongly recommended, common, uncommon, suggested and unsuitable.",
72
+ parameters: [DB.Param("Identifier")],
73
+ type: Identifier => DB.Object({
74
+ list: DB.Required({
75
+ type: DB.Array(DB.GenIncludeIdentifier(SingleCommonnessRatedAdvantageDisadvantageInGroup, [
76
+ DB.TypeArgument(Identifier),
77
+ ]), {
78
+ minItems: 2,
79
+ }),
80
+ }),
81
+ translations: NestedTranslationMap(DB.Required, "CommonnessRatedAdvantageDisadvantageGroup", DB.Object({
82
+ text: DB.Required({
83
+ comment: "The text replacing all entries in the group.",
84
+ type: DB.String({ minLength: 1, markdown: "inline" }),
85
+ }),
86
+ })),
87
+ }),
88
+ });
89
+ export const CommonnessRatedAdvantageDisadvantage = DB.GenEnum(import.meta.url, {
90
+ name: "CommonnessRatedAdvantageDisadvantage",
91
+ parameters: [DB.Param("Identifier")],
92
+ values: Identifier => ({
93
+ Single: DB.EnumCase({
94
+ type: DB.GenIncludeIdentifier(SingleCommonnessRatedAdvantageDisadvantage, [
95
+ DB.TypeArgument(Identifier),
96
+ ]),
97
+ }),
98
+ Group: DB.EnumCase({
99
+ type: DB.GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantageGroup, [
100
+ DB.TypeArgument(Identifier),
101
+ ]),
102
+ }),
103
+ }),
104
+ });
@@ -89,6 +89,7 @@ export declare const IlluminationRefillOrSupplyIdentifier: () => R;
89
89
  export declare const InfluenceIdentifier: () => R;
90
90
  export declare const InstrumentEnchantmentIdentifier: () => R;
91
91
  export declare const ItemIdentifier: () => R;
92
+ export declare const ItemComponentIdentifier: () => R;
92
93
  export declare const JesterTrickIdentifier: () => R;
93
94
  export declare const JewelryIdentifier: () => R;
94
95
  export declare const KarmaSpecialAbilityIdentifier: () => R;
@@ -39,6 +39,7 @@ import { HerbalPreservation } from "./equipment/item/HerbalPreservation.js";
39
39
  import { IlluminationLightSource } from "./equipment/item/IlluminationLightSource.js";
40
40
  import { IlluminationRefillOrSupply } from "./equipment/item/IlluminationRefillOrSupply.js";
41
41
  import { Item } from "./equipment/item/Item.js";
42
+ import { ItemComponent } from "./equipment/item/ItemComponent.js";
42
43
  import { Jewelry } from "./equipment/item/Jewelry.js";
43
44
  import { Laboratory } from "./equipment/item/Laboratory.js";
44
45
  import { Liebesspielzeug } from "./equipment/item/Liebesspielzeug.js";
@@ -258,6 +259,7 @@ export const IlluminationRefillOrSupplyIdentifier = () => R(IlluminationRefillOr
258
259
  export const InfluenceIdentifier = () => R(Influence);
259
260
  export const InstrumentEnchantmentIdentifier = () => R(InstrumentEnchantment);
260
261
  export const ItemIdentifier = () => R(Item);
262
+ export const ItemComponentIdentifier = () => R(ItemComponent);
261
263
  export const JesterTrickIdentifier = () => R(JesterTrick);
262
264
  export const JewelryIdentifier = () => R(Jewelry);
263
265
  export const KarmaSpecialAbilityIdentifier = () => R(KarmaSpecialAbility);
@@ -448,6 +448,7 @@ export declare const EquipmentIdentifier: DB.Enum<"EquipmentIdentifier", {
448
448
  GemOrPreciousStone: DB.EnumCase<DB.ReferenceIdentifier>;
449
449
  IlluminationLightSource: DB.EnumCase<DB.ReferenceIdentifier>;
450
450
  IlluminationRefillOrSupply: DB.EnumCase<DB.ReferenceIdentifier>;
451
+ ItemComponent: DB.EnumCase<DB.ReferenceIdentifier>;
451
452
  Jewelry: DB.EnumCase<DB.ReferenceIdentifier>;
452
453
  Laboratory: DB.EnumCase<DB.ReferenceIdentifier>;
453
454
  Liebesspielzeug: DB.EnumCase<DB.ReferenceIdentifier>;