@optolith/database-schema 0.94.0 → 0.95.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,18 @@
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.95.0](https://github.com/Optolith/database-schema/compare/v0.94.0...v0.95.0) (2026-10-12)
6
+
7
+ ### ⚠ BREAKING CHANGES
8
+
9
+ * armor accessory entity
10
+ * rearrange book values for Aventurische Bibliothek
11
+
12
+ ### Features
13
+
14
+ * armor accessory entity ([3ecd251](https://github.com/Optolith/database-schema/commit/3ecd25145811c115228fb2c10e31501ff7e1acd2))
15
+ * rearrange book values for Aventurische Bibliothek ([bc36e58](https://github.com/Optolith/database-schema/commit/bc36e58957e3e9ac96d40998e762dff72b62bdaa)), closes [#154](https://github.com/Optolith/database-schema/issues/154), references [#153](https://github.com/Optolith/database-schema/issues/153)
16
+
5
17
  ## [0.94.0](https://github.com/Optolith/database-schema/compare/v0.93.0...v0.94.0) (2026-10-12)
6
18
 
7
19
  ### ⚠ BREAKING CHANGES
package/gen/types.d.ts CHANGED
@@ -21,6 +21,7 @@ export type EntityMap = {
21
21
  ArcaneDancerTradition: ArcaneDancerTradition
22
22
  ArcaneOrbEnchantment: ArcaneOrbEnchantment
23
23
  Armor: Armor
24
+ ArmorAccessory: ArmorAccessory
24
25
  Aspect: Aspect
25
26
  AttireEnchantment: AttireEnchantment
26
27
  Attribute: Attribute
@@ -271,6 +272,7 @@ export type EnumMap = {
271
272
  BookContentQuality: BookContentQuality
272
273
  BookCost: BookCost
273
274
  BookCostVariant: BookCostVariant
275
+ BookPrerequisiteGroup: BookPrerequisiteGroup
274
276
  BookRules: BookRules
275
277
  BookType: BookType
276
278
  BurningTime: BurningTime
@@ -570,6 +572,7 @@ export type TypeAliasMap = {
570
572
  BlessedTraditionPrerequisite: BlessedTraditionPrerequisite
571
573
  BlessedTraditionsSelectOptionCategory: BlessedTraditionsSelectOptionCategory
572
574
  BlessingPerformanceParameters: BlessingPerformanceParameters
575
+ BookPrerequisites: BookPrerequisites
573
576
  BookRulesByEdition: BookRulesByEdition
574
577
  BookRulesOfEdition: BookRulesOfEdition
575
578
  BySizeCategory: BySizeCategory<unknown>
@@ -750,6 +753,7 @@ export type TypeAliasMap = {
750
753
  JewelryMaterialDifference: JewelryMaterialDifference<unknown>
751
754
  KnownItemSpecifics: KnownItemSpecifics
752
755
  KnownItemSpecificsTranslation: KnownItemSpecificsTranslation
756
+ LanguagePrerequisite: LanguagePrerequisite
753
757
  LanguagePrerequisites: LanguagePrerequisites
754
758
  LanguagesScriptsOptions: LanguagesScriptsOptions
755
759
  LanguagesSelectOptionCategory: LanguagesSelectOptionCategory
@@ -906,6 +910,7 @@ export type TypeAliasMap = {
906
910
  ReversalisEffect: ReversalisEffect
907
911
  RulePrerequisite: RulePrerequisite
908
912
  RulePrerequisites: RulePrerequisites
913
+ ScriptPrerequisite: ScriptPrerequisite
909
914
  SecondaryArmor: SecondaryArmor
910
915
  SelectableAttributeAdjustment: SelectableAttributeAdjustment
911
916
  SelectOptionRule: SelectOptionRule
@@ -2661,6 +2666,7 @@ export interface Locale {
2661
2666
  "Helmets": string
2662
2667
  "Pieces of Armor": string
2663
2668
  "Weapon Accessories": string
2669
+ "Armor Accessories": string
2664
2670
  "Clothes": string
2665
2671
  "Clothing Packages for Social Status": string
2666
2672
  "Travel Gear and Tools": string
@@ -23875,7 +23881,7 @@ export interface HeadHitZoneCombinationPossibilities {
23875
23881
  protection?: number
23876
23882
  }
23877
23883
 
23878
- export interface BandageOrRemedy {
23884
+ export interface ArmorAccessory {
23879
23885
  /**
23880
23886
  * The cost in silverthalers.
23881
23887
  */
@@ -23884,7 +23890,7 @@ export interface BandageOrRemedy {
23884
23890
  /**
23885
23891
  * The weight in kg.
23886
23892
  */
23887
- weight: Weight
23893
+ weight?: Weight
23888
23894
 
23889
23895
  /**
23890
23896
  * The complexity of crafting the item.
@@ -23910,16 +23916,16 @@ export interface BandageOrRemedy {
23910
23916
  * All translations for the entry, identified by IETF language tag (BCP47).
23911
23917
  */
23912
23918
  translations: {
23913
- [localeId: string]: BandageOrRemedyTranslation
23919
+ [localeId: string]: ArmorAccessoryTranslation
23914
23920
  }
23915
23921
  }
23916
23922
 
23917
23923
  /**
23918
23924
  * The entity’s identifier. A UUID or a locale code if it is registered as the locale entity.
23919
23925
  */
23920
- export type BandageOrRemedy_ID = string
23926
+ export type ArmorAccessory_ID = string
23921
23927
 
23922
- export interface BandageOrRemedyTranslation {
23928
+ export interface ArmorAccessoryTranslation {
23923
23929
  /**
23924
23930
  * The item’s name.
23925
23931
  */
@@ -24051,6 +24057,74 @@ export interface SecondaryArmorTranslation {
24051
24057
  disadvantage?: string
24052
24058
  }
24053
24059
 
24060
+ export interface BandageOrRemedy {
24061
+ /**
24062
+ * The cost in silverthalers.
24063
+ */
24064
+ cost: Cost
24065
+
24066
+ /**
24067
+ * The weight in kg.
24068
+ */
24069
+ weight: Weight
24070
+
24071
+ /**
24072
+ * The complexity of crafting the item.
24073
+ */
24074
+ complexity?: Complexity
24075
+
24076
+ /**
24077
+ * The structure points of the item. Use an array if the item consists of multiple components that have individual structure points.
24078
+ */
24079
+ structure_points?: StructurePoints
24080
+
24081
+ /**
24082
+ * The item can also be used either as an improvised weapon or as an armor, although this is not the primary use case of the item.
24083
+ */
24084
+ combat_use?: CombatUse
24085
+
24086
+ /**
24087
+ * References to where in which publications this entry has been defined. Entries may also be added or removed in later printings.
24088
+ */
24089
+ src: PublicationRefs
24090
+
24091
+ /**
24092
+ * All translations for the entry, identified by IETF language tag (BCP47).
24093
+ */
24094
+ translations: {
24095
+ [localeId: string]: BandageOrRemedyTranslation
24096
+ }
24097
+ }
24098
+
24099
+ /**
24100
+ * The entity’s identifier. A UUID or a locale code if it is registered as the locale entity.
24101
+ */
24102
+ export type BandageOrRemedy_ID = string
24103
+
24104
+ export interface BandageOrRemedyTranslation {
24105
+ /**
24106
+ * The item’s name.
24107
+ */
24108
+ name: string
24109
+
24110
+ /**
24111
+ * An auxiliary name or label of the item, if available.
24112
+ */
24113
+ secondary_name?: string
24114
+
24115
+ /**
24116
+ * Note text.
24117
+ */
24118
+ note?: string
24119
+
24120
+ /**
24121
+ * Special rules text.
24122
+ */
24123
+ rules?: string
24124
+
24125
+ errata?: Errata
24126
+ }
24127
+
24054
24128
  export interface Biome {
24055
24129
  /**
24056
24130
  * All translations for the entry, identified by IETF language tag (BCP47).
@@ -24130,6 +24204,11 @@ export interface Book {
24130
24204
  */
24131
24205
  types: BookType[]
24132
24206
 
24207
+ /**
24208
+ * The language(s) and script(s) the book is written in.
24209
+ */
24210
+ languageAndScript?: BookPrerequisites
24211
+
24133
24212
  /**
24134
24213
  * The cost in silverthalers.
24135
24214
  */
@@ -24155,6 +24234,11 @@ export interface Book {
24155
24234
  */
24156
24235
  contentQuality?: BookContentQuality
24157
24236
 
24237
+ /**
24238
+ * Skills and abilities you can learn by reading the book, as well as any other rules and effects concerning the book.
24239
+ */
24240
+ rules: BookRules
24241
+
24158
24242
  /**
24159
24243
  * References to where in which publications this entry has been defined. Entries may also be added or removed in later printings.
24160
24244
  */
@@ -24185,25 +24269,15 @@ export interface BookTranslation {
24185
24269
  secondary_name?: string
24186
24270
 
24187
24271
  /**
24188
- * The language the book is written in, if specified.
24272
+ * The language(s) and script(s) the book is written in.
24189
24273
  */
24190
- language?: string
24191
-
24192
- /**
24193
- * The script that was used for the book, if specified.
24194
- */
24195
- script?: string
24274
+ languageAndScript?: string
24196
24275
 
24197
24276
  /**
24198
24277
  * Note text.
24199
24278
  */
24200
24279
  note?: string
24201
24280
 
24202
- /**
24203
- * Special rules text.
24204
- */
24205
- rules?: BookRules
24206
-
24207
24281
  /**
24208
24282
  * The legality of the item, if specified.
24209
24283
  */
@@ -24264,6 +24338,37 @@ export type MundaneBookType =
24264
24338
  ProfessionalPublication: Skill_ID
24265
24339
  }
24266
24340
 
24341
+ export type BookPrerequisites = PlainPrerequisites<BookPrerequisiteGroup>
24342
+
24343
+ export type BookPrerequisiteGroup =
24344
+ | {
24345
+ kind: "Language"
24346
+ Language: LanguagePrerequisite
24347
+ }
24348
+ | {
24349
+ kind: "Script"
24350
+ Script: ScriptPrerequisite
24351
+ }
24352
+
24353
+ export interface LanguagePrerequisite {
24354
+ /**
24355
+ * The language’s identifier.
24356
+ */
24357
+ id: Language_ID
24358
+
24359
+ /**
24360
+ * The required minimum level of the language.
24361
+ */
24362
+ level: number
24363
+ }
24364
+
24365
+ export interface ScriptPrerequisite {
24366
+ /**
24367
+ * The script’s identifier.
24368
+ */
24369
+ id: Script_ID
24370
+ }
24371
+
24267
24372
  /**
24268
24373
  * The cost of the book, which may be a single value or multiple values that are defined by specific editions or other defining factors of the book.
24269
24374
  */
@@ -24373,6 +24478,15 @@ export type BookRules =
24373
24478
  * The book’s rules without any special effects or conditions.
24374
24479
  */
24375
24480
  export interface PlainBookRules {
24481
+ /**
24482
+ * All translations for the entry, identified by IETF language tag (BCP47).
24483
+ */
24484
+ translations: {
24485
+ [localeId: string]: PlainBookRulesTranslation
24486
+ }
24487
+ }
24488
+
24489
+ export interface PlainBookRulesTranslation {
24376
24490
  /**
24377
24491
  * The (main) rules text.
24378
24492
  */
@@ -24400,6 +24514,15 @@ export interface PlainBookRules {
24400
24514
  export interface BookRulesByEdition {
24401
24515
  editions: BookRulesOfEdition[]
24402
24516
 
24517
+ /**
24518
+ * All translations for the entry, identified by IETF language tag (BCP47).
24519
+ */
24520
+ translations?: {
24521
+ [localeId: string]: BookRulesByEditionTranslation
24522
+ }
24523
+ }
24524
+
24525
+ export interface BookRulesByEditionTranslation {
24403
24526
  /**
24404
24527
  * Additional rules text that comes after all other rules.
24405
24528
  */
@@ -24407,11 +24530,30 @@ export interface BookRulesByEdition {
24407
24530
  }
24408
24531
 
24409
24532
  export interface BookRulesOfEdition {
24533
+ /**
24534
+ * The language(s) and script(s) the book is written in.
24535
+ */
24536
+ languageAndScript?: BookPrerequisites
24537
+
24538
+ /**
24539
+ * All translations for the entry, identified by IETF language tag (BCP47).
24540
+ */
24541
+ translations: {
24542
+ [localeId: string]: BookRulesOfEditionTranslation
24543
+ }
24544
+ }
24545
+
24546
+ export interface BookRulesOfEditionTranslation {
24410
24547
  /**
24411
24548
  * The edition(s) the rules apply to.
24412
24549
  */
24413
24550
  label: string
24414
24551
 
24552
+ /**
24553
+ * The language(s) and script(s) the book is written in.
24554
+ */
24555
+ languageAndScript?: string
24556
+
24415
24557
  /**
24416
24558
  * The rules text.
24417
24559
  */
@@ -25396,6 +25538,10 @@ export type EquipmentIdentifier =
25396
25538
  kind: "Armor"
25397
25539
  Armor: Armor_ID
25398
25540
  }
25541
+ | {
25542
+ kind: "ArmorAccessory"
25543
+ ArmorAccessory: ArmorAccessory_ID
25544
+ }
25399
25545
  | {
25400
25546
  kind: "BandageOrRemedy"
25401
25547
  BandageOrRemedy: BandageOrRemedy_ID
@@ -27842,6 +27988,11 @@ export interface Settings {
27842
27988
  * Style Special Abilities and Advanced Special Abilities are part of focus rules. This type defines which focus rule must be enabled in order to use any of these special abilities. Essentially, this is a default prerequisite all of these special abilities must meet, but manually inserting them with every special ability is a lot of work and error-prone. Therefore, in order to use any of these special abilities, prerequisites for the respective focus rule must be generated for every entry.
27843
27989
  */
27844
27990
  styles: StyleSpecialAbilitySettings
27991
+
27992
+ /**
27993
+ * The publication that extends the description of books with additional information.
27994
+ */
27995
+ extendedBookDescriptionPublication: Publication_ID
27845
27996
  }
27846
27997
 
27847
27998
  /**
@@ -2,6 +2,7 @@ import { assertExhaustive } from "@elyukai/utils/typeSafety";
2
2
  import { Case } from "tsondb/schema/gen";
3
3
  const emptyDerivedEquipmentTradeSecretsCache = {
4
4
  Armor: {},
5
+ ArmorAccessory: {},
5
6
  Ammunition: {},
6
7
  BandageOrRemedy: {},
7
8
  Book: {},
package/lib/main.js CHANGED
@@ -21,6 +21,7 @@ export const schema = new Schema([
21
21
  Types.ArcaneDancerTradition,
22
22
  Types.ArcaneOrbEnchantment,
23
23
  Types.Armor,
24
+ Types.ArmorAccessory,
24
25
  Types.Aspect,
25
26
  Types.AttireEnchantment,
26
27
  Types.Attribute,
@@ -1507,6 +1507,7 @@ export declare const Locale: DB.Entity<"Locale", {
1507
1507
  Helmets: null;
1508
1508
  "Pieces of Armor": null;
1509
1509
  "Weapon Accessories": null;
1510
+ "Armor Accessories": null;
1510
1511
  Clothes: null;
1511
1512
  "Clothing Packages for Social Status": null;
1512
1513
  "Travel Gear and Tools": null;
@@ -1550,6 +1550,7 @@ export const Locale = DB.Entity(import.meta.url, {
1550
1550
  "Helmets": null,
1551
1551
  "Pieces of Armor": null,
1552
1552
  "Weapon Accessories": null,
1553
+ "Armor Accessories": null,
1553
1554
  "Clothes": null,
1554
1555
  "Clothing Packages for Social Status": null,
1555
1556
  "Travel Gear and Tools": null,
@@ -183,4 +183,5 @@ export declare const Settings: DB.SingletonEntity<"Settings", {
183
183
  magic: DB.MemberDecl<DB.ReferenceIdentifier, true>;
184
184
  liturgical: DB.MemberDecl<DB.ReferenceIdentifier, true>;
185
185
  }>, []>>, true>;
186
+ extendedBookDescriptionPublication: DB.MemberDecl<DB.ReferenceIdentifier, true>;
186
187
  }>;
@@ -1,5 +1,5 @@
1
1
  import * as DB from "tsondb/schema/dsl";
2
- import { AdvantageIdentifier, DerivedCharacteristicIdentifier, ExperienceLevelIdentifier, FocusRuleIdentifier, } from "./_Identifier.js";
2
+ import { AdvantageIdentifier, DerivedCharacteristicIdentifier, ExperienceLevelIdentifier, FocusRuleIdentifier, PublicationIdentifier, } from "./_Identifier.js";
3
3
  import { SpecialAbilityIdentifier } from "./_IdentifierGroup.js";
4
4
  export const Settings = DB.SingletonEntity(import.meta.url, {
5
5
  name: "Settings",
@@ -27,6 +27,10 @@ export const Settings = DB.SingletonEntity(import.meta.url, {
27
27
  comment: StyleSpecialAbilitySettings.comment,
28
28
  type: DB.IncludeIdentifier(StyleSpecialAbilitySettings),
29
29
  }),
30
+ extendedBookDescriptionPublication: DB.Required({
31
+ comment: "The publication that extends the description of books with additional information.",
32
+ type: PublicationIdentifier(),
33
+ }),
30
34
  }),
31
35
  });
32
36
  const SupernaturalBaseAdvantageSettings = DB.TypeAlias(import.meta.url, {
@@ -18,6 +18,7 @@ export declare const ArcaneBardTraditionIdentifier: () => R;
18
18
  export declare const ArcaneDancerTraditionIdentifier: () => R;
19
19
  export declare const ArcaneOrbEnchantmentIdentifier: () => R;
20
20
  export declare const ArmorIdentifier: () => R;
21
+ export declare const ArmorAccessoryIdentifier: () => R;
21
22
  export declare const AspectIdentifier: () => R;
22
23
  export declare const AttireEnchantmentIdentifier: () => R;
23
24
  export declare const AttributeIdentifier: () => R;
@@ -23,6 +23,7 @@ import { Ammunition } from "./equipment/item/Ammunition.js";
23
23
  import { Animal } from "./equipment/item/Animal.js";
24
24
  import { AnimalCare } from "./equipment/item/AnimalCare.js";
25
25
  import { Armor } from "./equipment/item/Armor.js";
26
+ import { ArmorAccessory } from "./equipment/item/ArmorAccessory.js";
26
27
  import { BandageOrRemedy } from "./equipment/item/BandageOrRemedy.js";
27
28
  import { Book } from "./equipment/item/Book.js";
28
29
  import { CeremonialItem } from "./equipment/item/CeremonialItem.js";
@@ -186,6 +187,7 @@ export const ArcaneBardTraditionIdentifier = () => R(ArcaneBardTradition);
186
187
  export const ArcaneDancerTraditionIdentifier = () => R(ArcaneDancerTradition);
187
188
  export const ArcaneOrbEnchantmentIdentifier = () => R(ArcaneOrbEnchantment);
188
189
  export const ArmorIdentifier = () => R(Armor);
190
+ export const ArmorAccessoryIdentifier = () => R(ArmorAccessory);
189
191
  export const AspectIdentifier = () => R(Aspect);
190
192
  export const AttireEnchantmentIdentifier = () => R(AttireEnchantment);
191
193
  export const AttributeIdentifier = () => R(Attribute);
@@ -436,6 +436,7 @@ export declare const EquipmentIdentifier: DB.Enum<"EquipmentIdentifier", {
436
436
  Animal: DB.EnumCase<DB.ReferenceIdentifier>;
437
437
  AnimalCare: DB.EnumCase<DB.ReferenceIdentifier>;
438
438
  Armor: DB.EnumCase<DB.ReferenceIdentifier>;
439
+ ArmorAccessory: DB.EnumCase<DB.ReferenceIdentifier>;
439
440
  BandageOrRemedy: DB.EnumCase<DB.ReferenceIdentifier>;
440
441
  Book: DB.EnumCase<DB.ReferenceIdentifier>;
441
442
  CeremonialItem: DB.EnumCase<DB.ReferenceIdentifier>;
@@ -1,6 +1,6 @@
1
1
  import { sortObjectKeys } from "@elyukai/utils/object";
2
2
  import * as DB from "tsondb/schema/dsl";
3
- import { AdvancedCombatSpecialAbilityIdentifier, AdvancedKarmaSpecialAbilityIdentifier, AdvancedMagicalSpecialAbilityIdentifier, AdvancedSkillSpecialAbilityIdentifier, AdvantageIdentifier, AmmunitionIdentifier, AncestorGlyphIdentifier, AnimalCareIdentifier, AnimalIdentifier, AnimalShapeIdentifier, AnimalShapeSizeIdentifier, AnimistPowerIdentifier, ArcaneBardTraditionIdentifier, ArcaneDancerTraditionIdentifier, ArcaneOrbEnchantmentIdentifier, ArmorIdentifier, AspectIdentifier, AttireEnchantmentIdentifier, AttributeIdentifier, BandageOrRemedyIdentifier, BannzeichenIdentifier, BeutelzauberIdentifier, BlessedTraditionIdentifier, BlessingIdentifier, BookIdentifier, BowlEnchantmentIdentifier, BrawlingSpecialAbilityIdentifier, CantripIdentifier, CauldronEnchantmentIdentifier, CeremonialItemIdentifier, CeremonialItemSpecialAbilityIdentifier, CeremonyIdentifier, ChronicleEnchantmentIdentifier, CloseCombatTechniqueIdentifier, ClothesIdentifier, ClothingPackageIdentifier, CombatSpecialAbilityIdentifier, CombatStyleSpecialAbilityIdentifier, CommandSpecialAbilityIdentifier, ContainerIdentifier, CultureIdentifier, CurseIdentifier, DaggerRitualIdentifier, DisadvantageIdentifier, DiseaseIdentifier, DominationRitualIdentifier, ElementIdentifier, ElixirIdentifier, ElvenMagicalSongIdentifier, EnhancementIdentifier, EquipmentOfBlessedOnesIdentifier, FamiliarSpecialAbilityIdentifier, FatePointSexSpecialAbilityIdentifier, FatePointSpecialAbilityIdentifier, FocusRuleIdentifier, FoolsHatEnchantmentIdentifier, GemOrPreciousStoneIdentifier, GeneralIdentifier, GeneralSpecialAbilityIdentifier, GeodeRitualIdentifier, GoblinRitualIdentifier, HaubenzauberIdentifier, HauerkettenzauberIdentifier, IlluminationLightSourceIdentifier, IlluminationRefillOrSupplyIdentifier, InstrumentEnchantmentIdentifier, JesterTrickIdentifier, JewelryIdentifier, KarmaSpecialAbilityIdentifier, KeulenzauberIdentifier, KrallenkettenzauberIdentifier, KristallkugelzauberIdentifier, LaboratoryIdentifier, LanguageIdentifier, LiebesspielzeugIdentifier, LiturgicalChantIdentifier, LiturgicalStyleSpecialAbilityIdentifier, LuxuryGoodIdentifier, LycantropicGiftIdentifier, MagicalArtifactIdentifier, MagicalDanceIdentifier, MagicalMelodyIdentifier, MagicalRuneIdentifier, MagicalSignIdentifier, MagicalSpecialAbilityIdentifier, MagicalTraditionIdentifier, MagicStyleSpecialAbilityIdentifier, MusicalInstrumentIdentifier, NewspaperIdentifier, OptionalRuleIdentifier, OrbEnchantmentIdentifier, OrienteeringAidIdentifier, PactGiftIdentifier, PatronIdentifier, PoisonIdentifier, PropertyIdentifier, ProtectiveWardingCircleSpecialAbilityIdentifier, RaceIdentifier, RangedCombatTechniqueIdentifier, RingEnchantmentIdentifier, RitualIdentifier, RopeOrChainIdentifier, SchweinetrommelzauberIdentifier, ScriptIdentifier, SermonIdentifier, SexPracticeIdentifier, SexSpecialAbilityIdentifier, SickleRitualIdentifier, SikaryanDrainSpecialAbilityIdentifier, SkillApplicationIdentifier, SkillGroupIdentifier, SkillIdentifier, SkillStyleSpecialAbilityIdentifier, SpellIdentifier, SpellSwordEnchantmentIdentifier, StaffEnchantmentIdentifier, StationeryIdentifier, TargetCategoryIdentifier, ThievesToolIdentifier, ToolOfTheTradeIdentifier, ToyEnchantmentIdentifier, TradeSecretIdentifier, TravelGearOrToolIdentifier, TrinkhornzauberIdentifier, VampiricGiftIdentifier, VehicleIdentifier, VisionIdentifier, WandEnchantmentIdentifier, WeaponAccessoryIdentifier, WeaponEnchantmentIdentifier, WeaponIdentifier, WorkingSupernaturalCreatureIdentifier, ZibiljaRitualIdentifier, } from "./_Identifier.js";
3
+ import { AdvancedCombatSpecialAbilityIdentifier, AdvancedKarmaSpecialAbilityIdentifier, AdvancedMagicalSpecialAbilityIdentifier, AdvancedSkillSpecialAbilityIdentifier, AdvantageIdentifier, AmmunitionIdentifier, AncestorGlyphIdentifier, AnimalCareIdentifier, AnimalIdentifier, AnimalShapeIdentifier, AnimalShapeSizeIdentifier, AnimistPowerIdentifier, ArcaneBardTraditionIdentifier, ArcaneDancerTraditionIdentifier, ArcaneOrbEnchantmentIdentifier, ArmorAccessoryIdentifier, ArmorIdentifier, AspectIdentifier, AttireEnchantmentIdentifier, AttributeIdentifier, BandageOrRemedyIdentifier, BannzeichenIdentifier, BeutelzauberIdentifier, BlessedTraditionIdentifier, BlessingIdentifier, BookIdentifier, BowlEnchantmentIdentifier, BrawlingSpecialAbilityIdentifier, CantripIdentifier, CauldronEnchantmentIdentifier, CeremonialItemIdentifier, CeremonialItemSpecialAbilityIdentifier, CeremonyIdentifier, ChronicleEnchantmentIdentifier, CloseCombatTechniqueIdentifier, ClothesIdentifier, ClothingPackageIdentifier, CombatSpecialAbilityIdentifier, CombatStyleSpecialAbilityIdentifier, CommandSpecialAbilityIdentifier, ContainerIdentifier, CultureIdentifier, CurseIdentifier, DaggerRitualIdentifier, DisadvantageIdentifier, DiseaseIdentifier, DominationRitualIdentifier, ElementIdentifier, ElixirIdentifier, ElvenMagicalSongIdentifier, EnhancementIdentifier, EquipmentOfBlessedOnesIdentifier, FamiliarSpecialAbilityIdentifier, FatePointSexSpecialAbilityIdentifier, FatePointSpecialAbilityIdentifier, FocusRuleIdentifier, FoolsHatEnchantmentIdentifier, GemOrPreciousStoneIdentifier, GeneralIdentifier, GeneralSpecialAbilityIdentifier, GeodeRitualIdentifier, GoblinRitualIdentifier, HaubenzauberIdentifier, HauerkettenzauberIdentifier, IlluminationLightSourceIdentifier, IlluminationRefillOrSupplyIdentifier, InstrumentEnchantmentIdentifier, JesterTrickIdentifier, JewelryIdentifier, KarmaSpecialAbilityIdentifier, KeulenzauberIdentifier, KrallenkettenzauberIdentifier, KristallkugelzauberIdentifier, LaboratoryIdentifier, LanguageIdentifier, LiebesspielzeugIdentifier, LiturgicalChantIdentifier, LiturgicalStyleSpecialAbilityIdentifier, LuxuryGoodIdentifier, LycantropicGiftIdentifier, MagicalArtifactIdentifier, MagicalDanceIdentifier, MagicalMelodyIdentifier, MagicalRuneIdentifier, MagicalSignIdentifier, MagicalSpecialAbilityIdentifier, MagicalTraditionIdentifier, MagicStyleSpecialAbilityIdentifier, MusicalInstrumentIdentifier, NewspaperIdentifier, OptionalRuleIdentifier, OrbEnchantmentIdentifier, OrienteeringAidIdentifier, PactGiftIdentifier, PatronIdentifier, PoisonIdentifier, PropertyIdentifier, ProtectiveWardingCircleSpecialAbilityIdentifier, RaceIdentifier, RangedCombatTechniqueIdentifier, RingEnchantmentIdentifier, RitualIdentifier, RopeOrChainIdentifier, SchweinetrommelzauberIdentifier, ScriptIdentifier, SermonIdentifier, SexPracticeIdentifier, SexSpecialAbilityIdentifier, SickleRitualIdentifier, SikaryanDrainSpecialAbilityIdentifier, SkillApplicationIdentifier, SkillGroupIdentifier, SkillIdentifier, SkillStyleSpecialAbilityIdentifier, SpellIdentifier, SpellSwordEnchantmentIdentifier, StaffEnchantmentIdentifier, StationeryIdentifier, TargetCategoryIdentifier, ThievesToolIdentifier, ToolOfTheTradeIdentifier, ToyEnchantmentIdentifier, TradeSecretIdentifier, TravelGearOrToolIdentifier, TrinkhornzauberIdentifier, VampiricGiftIdentifier, VehicleIdentifier, VisionIdentifier, WandEnchantmentIdentifier, WeaponAccessoryIdentifier, WeaponEnchantmentIdentifier, WeaponIdentifier, WorkingSupernaturalCreatureIdentifier, ZibiljaRitualIdentifier, } from "./_Identifier.js";
4
4
  export const ActivatableIdentifier = DB.Enum(import.meta.url, {
5
5
  name: "ActivatableIdentifier",
6
6
  values: () => ({
@@ -310,6 +310,7 @@ export const EquipmentIdentifier = DB.Enum(import.meta.url, {
310
310
  Animal: DB.EnumCase({ type: AnimalIdentifier() }),
311
311
  AnimalCare: DB.EnumCase({ type: AnimalCareIdentifier() }),
312
312
  Armor: DB.EnumCase({ type: ArmorIdentifier() }),
313
+ ArmorAccessory: DB.EnumCase({ type: ArmorAccessoryIdentifier() }),
313
314
  BandageOrRemedy: DB.EnumCase({ type: BandageOrRemedyIdentifier() }),
314
315
  Book: DB.EnumCase({ type: BookIdentifier() }),
315
316
  CeremonialItem: DB.EnumCase({ type: CeremonialItemIdentifier() }),
@@ -423,3 +423,27 @@ export declare const EnhancementPrerequisites: DB.TypeAlias<"EnhancementPrerequi
423
423
  }>, true>;
424
424
  }>, [T: DB.Param<"T", DB.Type>]>>>;
425
425
  }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>;
426
+ export declare const BookPrerequisites: DB.TypeAlias<"BookPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
427
+ Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
428
+ Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
429
+ list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
430
+ display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
431
+ Hide: DB.EnumCase<null>;
432
+ ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
433
+ sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
434
+ Standalone: DB.EnumCase<null>;
435
+ Connected: DB.EnumCase<null>;
436
+ }, []>>, false>;
437
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
438
+ replacement: DB.MemberDecl<DB.String, true>;
439
+ }>, true>;
440
+ }>, []>>>;
441
+ }, []>>, false>;
442
+ }>, [T: DB.Param<"T", DB.Type>]>>>;
443
+ Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteGroup", DB.Object<{
444
+ list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
445
+ translations: DB.MemberDecl<DB.NestedEntityMap<"PrerequisiteGroupTranslation", {
446
+ text: DB.MemberDecl<DB.String, true>;
447
+ }>, true>;
448
+ }>, [T: DB.Param<"T", DB.Type>]>>>;
449
+ }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>;
@@ -4,7 +4,7 @@
4
4
  import * as DB from "tsondb/schema/dsl";
5
5
  import { NestedTranslationMap } from "./Locale.js";
6
6
  import { DisplayOption } from "./prerequisites/DisplayOption.js";
7
- import { AdvantageDisadvantagePrerequisiteGroup, AnimistPowerPrerequisiteGroup, ArcaneTraditionPrerequisiteGroup, DerivedCharacteristicPrerequisiteGroup, EnhancementPrerequisiteGroup, GeneralPrerequisiteGroup, GeodeRitualPrerequisiteGroup, InfluencePrerequisiteGroup, LanguagePrerequisiteGroup, LiturgyPrerequisiteGroup, PersonalityTraitPrerequisiteGroup, ProfessionPrerequisiteGroup, PublicationPrerequisiteGroup, RulePrerequisiteGroup, SpellworkPrerequisiteGroup, TribePrerequisiteGroup, } from "./prerequisites/PrerequisiteGroups.js";
7
+ import { AdvantageDisadvantagePrerequisiteGroup, AnimistPowerPrerequisiteGroup, ArcaneTraditionPrerequisiteGroup, BookPrerequisiteGroup, DerivedCharacteristicPrerequisiteGroup, EnhancementPrerequisiteGroup, GeneralPrerequisiteGroup, GeodeRitualPrerequisiteGroup, InfluencePrerequisiteGroup, LanguagePrerequisiteGroup, LiturgyPrerequisiteGroup, PersonalityTraitPrerequisiteGroup, ProfessionPrerequisiteGroup, PublicationPrerequisiteGroup, RulePrerequisiteGroup, SpellworkPrerequisiteGroup, TribePrerequisiteGroup, } from "./prerequisites/PrerequisiteGroups.js";
8
8
  const PrerequisiteGroup = DB.GenTypeAlias(import.meta.url, {
9
9
  name: "PrerequisiteGroup",
10
10
  comment: "A prerequisite group has no influence on validation logic. It serves as a single unit for displaying purposes, where the source uses a prerequisites item that cannot be represented as a single prerequisite.",
@@ -188,3 +188,7 @@ export const EnhancementPrerequisites = DB.TypeAlias(import.meta.url, {
188
188
  DB.IncludeIdentifier(EnhancementPrerequisiteGroup),
189
189
  ]),
190
190
  });
191
+ export const BookPrerequisites = DB.TypeAlias(import.meta.url, {
192
+ name: "BookPrerequisites",
193
+ type: () => DB.GenIncludeIdentifier(PlainPrerequisites, [DB.IncludeIdentifier(BookPrerequisiteGroup)]),
194
+ });
@@ -6,6 +6,7 @@ export declare const EquipmentPackage: DB.Entity<"EquipmentPackage", {
6
6
  Animal: DB.EnumCase<DB.ReferenceIdentifier>;
7
7
  AnimalCare: DB.EnumCase<DB.ReferenceIdentifier>;
8
8
  Armor: DB.EnumCase<DB.ReferenceIdentifier>;
9
+ ArmorAccessory: DB.EnumCase<DB.ReferenceIdentifier>;
9
10
  BandageOrRemedy: DB.EnumCase<DB.ReferenceIdentifier>;
10
11
  Book: DB.EnumCase<DB.ReferenceIdentifier>;
11
12
  CeremonialItem: DB.EnumCase<DB.ReferenceIdentifier>;
@@ -0,0 +1,281 @@
1
+ import * as DB from "tsondb/schema/dsl";
2
+ export declare const ArmorAccessory: DB.Entity<"ArmorAccessory", {
3
+ cost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Cost", {
4
+ Free: DB.EnumCase<null>;
5
+ Various: DB.EnumCase<null>;
6
+ Invaluable: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"InvaluableCost", DB.Object<{
7
+ translations: DB.MemberDecl<DB.NestedEntityMap<"InvaluableCostTranslation", {
8
+ wrap_in_text: DB.MemberDecl<DB.String, true>;
9
+ }>, false>;
10
+ }>, []>>>;
11
+ Fixed: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"FixedCost", DB.Object<{
12
+ value: DB.MemberDecl<DB.Float, true>;
13
+ translations: DB.MemberDecl<DB.NestedEntityMap<"FixedCostTranslation", {
14
+ wrap_in_text: DB.MemberDecl<DB.String, true>;
15
+ }>, false>;
16
+ }>, []>>>;
17
+ Range: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CostRange", DB.Object<{
18
+ from: DB.MemberDecl<DB.Float, true>;
19
+ to: DB.MemberDecl<DB.Float, false>;
20
+ translations: DB.MemberDecl<DB.NestedEntityMap<"CostRangeTranslation", {
21
+ wrap_in_text: DB.MemberDecl<DB.String, true>;
22
+ }>, false>;
23
+ }>, []>>>;
24
+ }, []>>, true>;
25
+ weight: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Weight", DB.Float, []>>, false>;
26
+ complexity: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Complexity", {
27
+ Primitive: DB.EnumCase<null>;
28
+ Simple: DB.EnumCase<null>;
29
+ Complex: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ComplexComplexity", DB.Object<{
30
+ ap_value: DB.MemberDecl<DB.Integer, true>;
31
+ prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PlainGeneralPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
32
+ Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
33
+ Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
34
+ list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
35
+ display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
36
+ Hide: DB.EnumCase<null>;
37
+ ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
38
+ sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
39
+ Standalone: DB.EnumCase<null>;
40
+ Connected: DB.EnumCase<null>;
41
+ }, []>>, false>;
42
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
43
+ replacement: DB.MemberDecl<DB.String, true>;
44
+ }>, true>;
45
+ }>, []>>>;
46
+ }, []>>, false>;
47
+ }>, [T: DB.Param<"T", DB.Type>]>>>;
48
+ Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteGroup", DB.Object<{
49
+ list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
50
+ translations: DB.MemberDecl<DB.NestedEntityMap<"PrerequisiteGroupTranslation", {
51
+ text: DB.MemberDecl<DB.String, true>;
52
+ }>, true>;
53
+ }>, [T: DB.Param<"T", DB.Type>]>>>;
54
+ }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>>, false>;
55
+ src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
56
+ id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
57
+ occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
58
+ initial: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"InitialOccurrence", DB.Object<{
59
+ printing: DB.MemberDecl<DB.Integer, false>;
60
+ pages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PageRange", DB.Object<{
61
+ first_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
62
+ InsideCoverFront: DB.EnumCase<null>;
63
+ InsideCoverBack: DB.EnumCase<null>;
64
+ Numbered: DB.EnumCase<DB.Integer>;
65
+ }, []>>, true>;
66
+ last_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
67
+ InsideCoverFront: DB.EnumCase<null>;
68
+ InsideCoverBack: DB.EnumCase<null>;
69
+ Numbered: DB.EnumCase<DB.Integer>;
70
+ }, []>>, false>;
71
+ }>, []>>>, true>;
72
+ isRemoved: DB.MemberDecl<DB.Boolean, false>;
73
+ }>, []>>, true>;
74
+ revisions: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"Revision", {
75
+ Since: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"Since", DB.Object<{
76
+ printing: DB.MemberDecl<DB.Integer, true>;
77
+ pages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PageRange", DB.Object<{
78
+ first_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
79
+ InsideCoverFront: DB.EnumCase<null>;
80
+ InsideCoverBack: DB.EnumCase<null>;
81
+ Numbered: DB.EnumCase<DB.Integer>;
82
+ }, []>>, true>;
83
+ last_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
84
+ InsideCoverFront: DB.EnumCase<null>;
85
+ InsideCoverBack: DB.EnumCase<null>;
86
+ Numbered: DB.EnumCase<DB.Integer>;
87
+ }, []>>, false>;
88
+ }>, []>>>, true>;
89
+ }>, []>>>;
90
+ Deprecated: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"Deprecation", DB.Object<{
91
+ printing: DB.MemberDecl<DB.Integer, true>;
92
+ }>, []>>>;
93
+ }, []>>>, false>;
94
+ }>, true>;
95
+ }>, []>>>, []>>, false>;
96
+ }>, []>>>;
97
+ }, []>>, false>;
98
+ structure_points: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"StructurePoints", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"StructurePointsComponent", DB.Object<{
99
+ points: DB.MemberDecl<DB.Integer, true>;
100
+ }>, []>>>, []>>, false>;
101
+ combat_use: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CombatUse", {
102
+ Weapon: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ImprovisedWeapon", DB.Object<{
103
+ melee_uses: DB.MemberDecl<DB.NestedEntityMap<string, {
104
+ damage: DB.MemberDecl<DB.TypeArgument<DB.Param<"Damage", DB.Type>>, true>;
105
+ damage_threshold: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"PrimaryAttributeDamageThreshold", {
106
+ Default: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"DefaultPrimaryAttributeDamageThreshold", DB.Object<{
107
+ threshold: DB.MemberDecl<DB.Integer, true>;
108
+ }>, []>>>;
109
+ List: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"PrimaryAttributeDamageThresholdList", DB.Object<{
110
+ list: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"SinglePrimaryAttributeDamageThreshold", DB.Object<{
111
+ attribute: DB.MemberDecl<DB.ReferenceIdentifier, true>;
112
+ threshold: DB.MemberDecl<DB.Integer, true>;
113
+ }>, []>>>, true>;
114
+ }>, []>>>;
115
+ }, []>>, false>;
116
+ attackModifier: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"AttackModifier", DB.Integer, []>>, false>;
117
+ parryModifier: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ParryModifier", DB.Integer, []>>, false>;
118
+ reach: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
119
+ length: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Length", DB.Integer, []>>, false>;
120
+ size: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ShieldSize", {
121
+ Small: DB.EnumCase<null>;
122
+ Medium: DB.EnumCase<null>;
123
+ Large: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"LargeShieldSize", DB.Object<{
124
+ attack_penalty: DB.MemberDecl<DB.Integer, false>;
125
+ }>, []>>>;
126
+ }, []>>, false>;
127
+ is_parrying_weapon: DB.MemberDecl<DB.Boolean, true>;
128
+ is_two_handed_weapon: DB.MemberDecl<DB.Boolean, true>;
129
+ is_improvised_weapon: DB.MemberDecl<DB.Boolean, true>;
130
+ }>, false>;
131
+ ranged_uses: DB.MemberDecl<DB.NestedEntityMap<string, {
132
+ damage: DB.MemberDecl<DB.TypeArgument<DB.Param<"Damage", DB.Type>>, true>;
133
+ reload_time: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ReloadTime", DB.Object<{
134
+ value: DB.MemberDecl<DB.Integer, true>;
135
+ }>, []>>>, true>;
136
+ range: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RangeBrackets", DB.Object<{
137
+ close: DB.MemberDecl<DB.Integer, true>;
138
+ medium: DB.MemberDecl<DB.Integer, true>;
139
+ far: DB.MemberDecl<DB.Integer, true>;
140
+ }>, []>>, true>;
141
+ ammunition: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"AmmunitionishIdentifier", {
142
+ Ammunition: DB.EnumCase<DB.ReferenceIdentifier>;
143
+ Weapon: DB.EnumCase<DB.ReferenceIdentifier>;
144
+ }, []>>, false>;
145
+ length: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Length", DB.Integer, []>>, false>;
146
+ is_improvised_weapon: DB.MemberDecl<DB.Boolean, true>;
147
+ }>, false>;
148
+ restrictedTo: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedTo", DB.Object<{
149
+ races: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedToRaces", DB.Object<{
150
+ scope: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
151
+ }>, []>>, false>;
152
+ cultures: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedToCultures", DB.Object<{
153
+ scope: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
154
+ }>, []>>, false>;
155
+ professions: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedToProfessions", DB.Object<{
156
+ scope: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
157
+ }>, []>>, false>;
158
+ magicalTraditions: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedToMagicalTraditions", DB.Object<{
159
+ scope: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
160
+ }>, []>>, false>;
161
+ blessedTraditions: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedToBlessedTraditions", DB.Object<{
162
+ scope: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"RestrictedToBlessedTraditionsScope", {
163
+ Specific: DB.EnumCase<DB.Array<DB.ReferenceIdentifier>>;
164
+ Church: DB.EnumCase<null>;
165
+ Shamanistic: DB.EnumCase<null>;
166
+ }, []>>, true>;
167
+ isSanctifiedBy: DB.MemberDecl<DB.Boolean, true>;
168
+ }>, []>>, false>;
169
+ }>, []>>, false>;
170
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ImprovisedWeaponTranslation", {
171
+ advantage: DB.MemberDecl<DB.String, false>;
172
+ disadvantage: DB.MemberDecl<DB.String, false>;
173
+ }>, false>;
174
+ }>, []>>>;
175
+ Armor: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"SecondaryArmor", DB.Object<{
176
+ protection: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Protection", DB.Integer, []>>, true>;
177
+ encumbrance: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Encumbrance", DB.Integer, []>>, true>;
178
+ has_additional_penalties: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"HasAdditionalPenalties", DB.Boolean, []>>, true>;
179
+ armorType: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ArmorType", {
180
+ Standard: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"StandardArmorType", DB.Object<{
181
+ sturdinessRating: DB.MemberDecl<DB.Integer, true>;
182
+ }>, []>>>;
183
+ StandardVariant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"StandardVariantArmorType", DB.Object<{
184
+ variantOf: DB.MemberDecl<DB.ReferenceIdentifier, true>;
185
+ sturdinessRating: DB.MemberDecl<DB.Integer, true>;
186
+ }>, []>>>;
187
+ Variant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"VariantArmorType", DB.Object<{
188
+ variantOf: DB.MemberDecl<DB.ReferenceIdentifier, true>;
189
+ }>, []>>>;
190
+ }, []>>, true>;
191
+ hit_zone: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"HitZone", {
192
+ Head: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"HeadHitZone", DB.Object<{
193
+ combination_possibilities: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"HeadHitZoneCombinationPossibilities", DB.Object<{
194
+ armors: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
195
+ protection: DB.MemberDecl<DB.Integer, false>;
196
+ }>, []>>, false>;
197
+ }>, []>>>;
198
+ Torso: DB.EnumCase<null>;
199
+ Arms: DB.EnumCase<null>;
200
+ Legs: DB.EnumCase<null>;
201
+ }, []>>, false>;
202
+ restrictedTo: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedTo", DB.Object<{
203
+ races: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedToRaces", DB.Object<{
204
+ scope: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
205
+ }>, []>>, false>;
206
+ cultures: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedToCultures", DB.Object<{
207
+ scope: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
208
+ }>, []>>, false>;
209
+ professions: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedToProfessions", DB.Object<{
210
+ scope: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
211
+ }>, []>>, false>;
212
+ magicalTraditions: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedToMagicalTraditions", DB.Object<{
213
+ scope: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
214
+ }>, []>>, false>;
215
+ blessedTraditions: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"RestrictedToBlessedTraditions", DB.Object<{
216
+ scope: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"RestrictedToBlessedTraditionsScope", {
217
+ Specific: DB.EnumCase<DB.Array<DB.ReferenceIdentifier>>;
218
+ Church: DB.EnumCase<null>;
219
+ Shamanistic: DB.EnumCase<null>;
220
+ }, []>>, true>;
221
+ isSanctifiedBy: DB.MemberDecl<DB.Boolean, true>;
222
+ }>, []>>, false>;
223
+ }>, []>>, false>;
224
+ translations: DB.MemberDecl<DB.NestedEntityMap<"SecondaryArmorTranslation", {
225
+ advantage: DB.MemberDecl<DB.String, false>;
226
+ disadvantage: DB.MemberDecl<DB.String, false>;
227
+ }>, false>;
228
+ }>, []>>>;
229
+ }, []>>, false>;
230
+ src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
231
+ id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
232
+ occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
233
+ initial: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"InitialOccurrence", DB.Object<{
234
+ printing: DB.MemberDecl<DB.Integer, false>;
235
+ pages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PageRange", DB.Object<{
236
+ first_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
237
+ InsideCoverFront: DB.EnumCase<null>;
238
+ InsideCoverBack: DB.EnumCase<null>;
239
+ Numbered: DB.EnumCase<DB.Integer>;
240
+ }, []>>, true>;
241
+ last_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
242
+ InsideCoverFront: DB.EnumCase<null>;
243
+ InsideCoverBack: DB.EnumCase<null>;
244
+ Numbered: DB.EnumCase<DB.Integer>;
245
+ }, []>>, false>;
246
+ }>, []>>>, true>;
247
+ isRemoved: DB.MemberDecl<DB.Boolean, false>;
248
+ }>, []>>, true>;
249
+ revisions: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"Revision", {
250
+ Since: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"Since", DB.Object<{
251
+ printing: DB.MemberDecl<DB.Integer, true>;
252
+ pages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PageRange", DB.Object<{
253
+ first_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
254
+ InsideCoverFront: DB.EnumCase<null>;
255
+ InsideCoverBack: DB.EnumCase<null>;
256
+ Numbered: DB.EnumCase<DB.Integer>;
257
+ }, []>>, true>;
258
+ last_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
259
+ InsideCoverFront: DB.EnumCase<null>;
260
+ InsideCoverBack: DB.EnumCase<null>;
261
+ Numbered: DB.EnumCase<DB.Integer>;
262
+ }, []>>, false>;
263
+ }>, []>>>, true>;
264
+ }>, []>>>;
265
+ Deprecated: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"Deprecation", DB.Object<{
266
+ printing: DB.MemberDecl<DB.Integer, true>;
267
+ }>, []>>>;
268
+ }, []>>>, false>;
269
+ }>, true>;
270
+ }>, []>>>, []>>, true>;
271
+ translations: DB.MemberDecl<DB.NestedEntityMap<`${string}Translation`, {
272
+ name: DB.MemberDecl<DB.String, true>;
273
+ secondary_name: DB.MemberDecl<DB.String, false>;
274
+ note: DB.MemberDecl<DB.String, false>;
275
+ rules: DB.MemberDecl<DB.String, false>;
276
+ errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
277
+ date: DB.MemberDecl<DB.Date, true>;
278
+ description: DB.MemberDecl<DB.String, true>;
279
+ }>, []>>>, []>>, false>;
280
+ }>, true>;
281
+ }, undefined>;
@@ -0,0 +1,48 @@
1
+ import * as DB from "tsondb/schema/dsl";
2
+ import { src } from "../../source/_PublicationRef.js";
3
+ import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
4
+ import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
5
+ export const ArmorAccessory = DB.Entity(import.meta.url, {
6
+ name: "ArmorAccessory",
7
+ namePlural: "ArmorAccessories",
8
+ type: () => DB.Object({
9
+ cost: DB.Required({
10
+ comment: "The cost in silverthalers.",
11
+ type: DB.IncludeIdentifier(Cost),
12
+ }),
13
+ weight: DB.Optional({
14
+ comment: "The weight in kg.",
15
+ type: DB.IncludeIdentifier(Weight),
16
+ }),
17
+ complexity: DB.Optional({
18
+ comment: "The complexity of crafting the item.",
19
+ type: DB.IncludeIdentifier(Complexity),
20
+ }),
21
+ structure_points: DB.Optional({
22
+ comment: "The structure points of the item. Use an array if the item consists of multiple components that have individual structure points.",
23
+ type: DB.IncludeIdentifier(StructurePoints),
24
+ }),
25
+ combat_use: DB.Optional({
26
+ comment: "The item can also be used either as an improvised weapon or as an armor, although this is not the primary use case of the item.",
27
+ type: DB.IncludeIdentifier(CombatUse),
28
+ }),
29
+ src,
30
+ translations: DefaultItemTranslations("ArmorAccessory"),
31
+ }),
32
+ instanceDisplayName: {},
33
+ uniqueConstraints: [
34
+ {
35
+ entityMapKeyPath: "translations",
36
+ keyPathInEntityMap: "name",
37
+ },
38
+ ],
39
+ customConstraints: ({ instanceContent, ...rest }) => {
40
+ if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
41
+ return checkWeaponCombatTechniqueIntegrity({
42
+ ...rest,
43
+ instanceContent: instanceContent.combat_use.Weapon,
44
+ });
45
+ }
46
+ return [];
47
+ },
48
+ });
@@ -13,6 +13,30 @@ export declare const Book: DB.Entity<"Book", {
13
13
  Magical: DB.EnumCase<null>;
14
14
  Religious: DB.EnumCase<null>;
15
15
  }, []>>>, true>;
16
+ languageAndScript: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"BookPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
17
+ Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
18
+ Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
19
+ list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
20
+ display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
21
+ Hide: DB.EnumCase<null>;
22
+ ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
23
+ sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
24
+ Standalone: DB.EnumCase<null>;
25
+ Connected: DB.EnumCase<null>;
26
+ }, []>>, false>;
27
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
28
+ replacement: DB.MemberDecl<DB.String, true>;
29
+ }>, true>;
30
+ }>, []>>>;
31
+ }, []>>, false>;
32
+ }>, [T: DB.Param<"T", DB.Type>]>>>;
33
+ Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteGroup", DB.Object<{
34
+ list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
35
+ translations: DB.MemberDecl<DB.NestedEntityMap<"PrerequisiteGroupTranslation", {
36
+ text: DB.MemberDecl<DB.String, true>;
37
+ }>, true>;
38
+ }>, [T: DB.Param<"T", DB.Type>]>>>;
39
+ }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>>, false>;
16
40
  cost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"BookCost", {
17
41
  Single: DB.EnumCase<DB.IncludeIdentifier<[], DB.Enum<"BookCostVariant", {
18
42
  Definite: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"DefiniteBookCostVariant", DB.Object<{
@@ -166,6 +190,55 @@ export declare const Book: DB.Entity<"Book", {
166
190
  Average: DB.EnumCase<null>;
167
191
  Demanding: DB.EnumCase<DB.Integer>;
168
192
  }, []>>, false>;
193
+ rules: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"BookRules", {
194
+ Plain: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"PlainBookRules", DB.Object<{
195
+ translations: DB.MemberDecl<DB.NestedEntityMap<"PlainBookRulesTranslation", {
196
+ text: DB.MemberDecl<DB.String, true>;
197
+ reconstruction: DB.MemberDecl<DB.String, false>;
198
+ references: DB.MemberDecl<DB.String, false>;
199
+ textAfter: DB.MemberDecl<DB.String, false>;
200
+ }>, true>;
201
+ }>, []>>>;
202
+ Entertainment: DB.EnumCase<null>;
203
+ ByEdition: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"BookRulesByEdition", DB.Object<{
204
+ editions: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"BookRulesOfEdition", DB.Object<{
205
+ languageAndScript: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"BookPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
206
+ Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
207
+ Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
208
+ list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
209
+ display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
210
+ Hide: DB.EnumCase<null>;
211
+ ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
212
+ sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
213
+ Standalone: DB.EnumCase<null>;
214
+ Connected: DB.EnumCase<null>;
215
+ }, []>>, false>;
216
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
217
+ replacement: DB.MemberDecl<DB.String, true>;
218
+ }>, true>;
219
+ }>, []>>>;
220
+ }, []>>, false>;
221
+ }>, [T: DB.Param<"T", DB.Type>]>>>;
222
+ Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteGroup", DB.Object<{
223
+ list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
224
+ translations: DB.MemberDecl<DB.NestedEntityMap<"PrerequisiteGroupTranslation", {
225
+ text: DB.MemberDecl<DB.String, true>;
226
+ }>, true>;
227
+ }>, [T: DB.Param<"T", DB.Type>]>>>;
228
+ }, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>>, false>;
229
+ translations: DB.MemberDecl<DB.NestedEntityMap<"BookRulesOfEditionTranslation", {
230
+ label: DB.MemberDecl<DB.String, true>;
231
+ languageAndScript: DB.MemberDecl<DB.String, false>;
232
+ text: DB.MemberDecl<DB.String, true>;
233
+ reconstruction: DB.MemberDecl<DB.String, false>;
234
+ references: DB.MemberDecl<DB.String, false>;
235
+ }>, true>;
236
+ }>, []>>>, true>;
237
+ translations: DB.MemberDecl<DB.NestedEntityMap<"BookRulesByEditionTranslation", {
238
+ textAfter: DB.MemberDecl<DB.String, false>;
239
+ }>, false>;
240
+ }>, []>>>;
241
+ }, []>>, true>;
169
242
  src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
170
243
  id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
171
244
  occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
@@ -210,27 +283,8 @@ export declare const Book: DB.Entity<"Book", {
210
283
  translations: DB.MemberDecl<DB.NestedEntityMap<"BookTranslation", {
211
284
  name: DB.MemberDecl<DB.String, true>;
212
285
  secondary_name: DB.MemberDecl<DB.String, false>;
213
- language: DB.MemberDecl<DB.String, false>;
214
- script: DB.MemberDecl<DB.String, false>;
286
+ languageAndScript: DB.MemberDecl<DB.String, false>;
215
287
  note: DB.MemberDecl<DB.String, false>;
216
- rules: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"BookRules", {
217
- Plain: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"PlainBookRules", DB.Object<{
218
- text: DB.MemberDecl<DB.String, true>;
219
- reconstruction: DB.MemberDecl<DB.String, false>;
220
- references: DB.MemberDecl<DB.String, false>;
221
- textAfter: DB.MemberDecl<DB.String, false>;
222
- }>, []>>>;
223
- Entertainment: DB.EnumCase<null>;
224
- ByEdition: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"BookRulesByEdition", DB.Object<{
225
- editions: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"BookRulesOfEdition", DB.Object<{
226
- label: DB.MemberDecl<DB.String, true>;
227
- text: DB.MemberDecl<DB.String, true>;
228
- reconstruction: DB.MemberDecl<DB.String, false>;
229
- references: DB.MemberDecl<DB.String, false>;
230
- }>, []>>>, true>;
231
- textAfter: DB.MemberDecl<DB.String, false>;
232
- }>, []>>>;
233
- }, []>>, false>;
234
288
  legality: DB.MemberDecl<DB.String, false>;
235
289
  availability: DB.MemberDecl<DB.String, false>;
236
290
  special: DB.MemberDecl<DB.String, false>;
@@ -1,5 +1,6 @@
1
1
  import * as DB from "tsondb/schema/dsl";
2
2
  import { SkillIdentifier } from "../../_Identifier.js";
3
+ import { BookPrerequisites } from "../../_Prerequisite.js";
3
4
  import { NestedTranslationMap } from "../../Locale.js";
4
5
  import { Errata } from "../../source/_Erratum.js";
5
6
  import { src } from "../../source/_PublicationRef.js";
@@ -12,6 +13,10 @@ export const Book = DB.Entity(import.meta.url, {
12
13
  comment: "The type of book.",
13
14
  type: DB.Array(DB.IncludeIdentifier(BookType), { minItems: 1, uniqueItems: true }),
14
15
  }),
16
+ languageAndScript: DB.Optional({
17
+ comment: "The language(s) and script(s) the book is written in.",
18
+ type: DB.IncludeIdentifier(BookPrerequisites),
19
+ }),
15
20
  cost: DB.Required({
16
21
  comment: "The cost in silverthalers.",
17
22
  type: DB.IncludeIdentifier(BookCost),
@@ -32,6 +37,10 @@ export const Book = DB.Entity(import.meta.url, {
32
37
  comment: "The quality of the book’s content.",
33
38
  type: DB.IncludeIdentifier(BookContentQuality),
34
39
  }),
40
+ rules: DB.Required({
41
+ comment: "Skills and abilities you can learn by reading the book, as well as any other rules and effects concerning the book.",
42
+ type: DB.IncludeIdentifier(BookRules),
43
+ }),
35
44
  src,
36
45
  translations: NestedTranslationMap(DB.Required, "Book", DB.Object({
37
46
  name: DB.Required({
@@ -42,22 +51,14 @@ export const Book = DB.Entity(import.meta.url, {
42
51
  comment: "An auxiliary name or label of the item, if available.",
43
52
  type: DB.String({ minLength: 1 }),
44
53
  }),
45
- language: DB.Optional({
46
- comment: "The language the book is written in, if specified.",
47
- type: DB.String({ minLength: 1, markdown: "inline" }),
48
- }),
49
- script: DB.Optional({
50
- comment: "The script that was used for the book, if specified.",
54
+ languageAndScript: DB.Optional({
55
+ comment: "The language(s) and script(s) the book is written in.",
51
56
  type: DB.String({ minLength: 1, markdown: "inline" }),
52
57
  }),
53
58
  note: DB.Optional({
54
59
  comment: "Note text.",
55
60
  type: DB.String({ minLength: 1, markdown: "block" }),
56
61
  }),
57
- rules: DB.Optional({
58
- comment: "Special rules text.",
59
- type: DB.IncludeIdentifier(BookRules),
60
- }),
61
62
  legality: DB.Optional({
62
63
  comment: "The legality of the item, if specified.",
63
64
  type: DB.String({ minLength: 1, markdown: "inline" }),
@@ -217,22 +218,24 @@ const PlainBookRules = DB.TypeAlias(import.meta.url, {
217
218
  name: "PlainBookRules",
218
219
  comment: "The book’s rules without any special effects or conditions.",
219
220
  type: () => DB.Object({
220
- text: DB.Required({
221
- comment: "The (main) rules text.",
222
- type: DB.String({ minLength: 1, markdown: "block" }),
223
- }),
224
- reconstruction: DB.Optional({
225
- comment: "Rules for reconstructing certain skills or abilities from the book.",
226
- type: DB.String({ minLength: 1, markdown: "block" }),
227
- }),
228
- references: DB.Optional({
229
- comment: "References to skills and abilities that, while mentioned in the book, cannot be learned from this book alone.",
230
- type: DB.String({ minLength: 1, markdown: "block" }),
231
- }),
232
- textAfter: DB.Optional({
233
- comment: "Additional rules text that comes after all other rules.",
234
- type: DB.String({ minLength: 1, markdown: "block" }),
235
- }),
221
+ translations: NestedTranslationMap(DB.Required, "PlainBookRules", DB.Object({
222
+ text: DB.Required({
223
+ comment: "The (main) rules text.",
224
+ type: DB.String({ minLength: 1, markdown: "block" }),
225
+ }),
226
+ reconstruction: DB.Optional({
227
+ comment: "Rules for reconstructing certain skills or abilities from the book.",
228
+ type: DB.String({ minLength: 1, markdown: "block" }),
229
+ }),
230
+ references: DB.Optional({
231
+ comment: "References to skills and abilities that, while mentioned in the book, cannot be learned from this book alone.",
232
+ type: DB.String({ minLength: 1, markdown: "block" }),
233
+ }),
234
+ textAfter: DB.Optional({
235
+ comment: "Additional rules text that comes after all other rules.",
236
+ type: DB.String({ minLength: 1, markdown: "block" }),
237
+ }),
238
+ })),
236
239
  }),
237
240
  });
238
241
  const BookRulesByEdition = DB.TypeAlias(import.meta.url, {
@@ -242,30 +245,42 @@ const BookRulesByEdition = DB.TypeAlias(import.meta.url, {
242
245
  editions: DB.Required({
243
246
  type: DB.Array(DB.IncludeIdentifier(BookRulesOfEdition), { minItems: 1 }),
244
247
  }),
245
- textAfter: DB.Optional({
246
- comment: "Additional rules text that comes after all other rules.",
247
- type: DB.String({ minLength: 1, markdown: "block" }),
248
- }),
248
+ translations: NestedTranslationMap(DB.Optional, "BookRulesByEdition", DB.Object({
249
+ textAfter: DB.Optional({
250
+ comment: "Additional rules text that comes after all other rules.",
251
+ type: DB.String({ minLength: 1, markdown: "block" }),
252
+ }),
253
+ })),
249
254
  }),
250
255
  });
251
256
  const BookRulesOfEdition = DB.TypeAlias(import.meta.url, {
252
257
  name: "BookRulesOfEdition",
253
258
  type: () => DB.Object({
254
- label: DB.Required({
255
- comment: "The edition(s) the rules apply to.",
256
- type: DB.String({ minLength: 1 }),
257
- }),
258
- text: DB.Required({
259
- comment: "The rules text.",
260
- type: DB.String({ minLength: 1, markdown: "block" }),
261
- }),
262
- reconstruction: DB.Optional({
263
- comment: "Rules for reconstructing certain skills or abilities from the book.",
264
- type: DB.String({ minLength: 1, markdown: "block" }),
265
- }),
266
- references: DB.Optional({
267
- comment: "References to skills and abilities that, while mentioned in the book, cannot be learned from this book alone.",
268
- type: DB.String({ minLength: 1, markdown: "block" }),
259
+ languageAndScript: DB.Optional({
260
+ comment: "The language(s) and script(s) the book is written in.",
261
+ type: DB.IncludeIdentifier(BookPrerequisites),
269
262
  }),
263
+ translations: NestedTranslationMap(DB.Required, "BookRulesOfEdition", DB.Object({
264
+ label: DB.Required({
265
+ comment: "The edition(s) the rules apply to.",
266
+ type: DB.String({ minLength: 1 }),
267
+ }),
268
+ languageAndScript: DB.Optional({
269
+ comment: "The language(s) and script(s) the book is written in.",
270
+ type: DB.String({ minLength: 1, markdown: "inline" }),
271
+ }),
272
+ text: DB.Required({
273
+ comment: "The rules text.",
274
+ type: DB.String({ minLength: 1, markdown: "block" }),
275
+ }),
276
+ reconstruction: DB.Optional({
277
+ comment: "Rules for reconstructing certain skills or abilities from the book.",
278
+ type: DB.String({ minLength: 1, markdown: "block" }),
279
+ }),
280
+ references: DB.Optional({
281
+ comment: "References to skills and abilities that, while mentioned in the book, cannot be learned from this book alone.",
282
+ type: DB.String({ minLength: 1, markdown: "block" }),
283
+ }),
284
+ })),
270
285
  }),
271
286
  });
@@ -21,6 +21,7 @@ export { Ammunition } from "./equipment/item/Ammunition.js";
21
21
  export { Animal } from "./equipment/item/Animal.js";
22
22
  export { AnimalCare } from "./equipment/item/AnimalCare.js";
23
23
  export { Armor } from "./equipment/item/Armor.js";
24
+ export { ArmorAccessory } from "./equipment/item/ArmorAccessory.js";
24
25
  export { BandageOrRemedy } from "./equipment/item/BandageOrRemedy.js";
25
26
  export { Book } from "./equipment/item/Book.js";
26
27
  export { CeremonialItem } from "./equipment/item/CeremonialItem.js";
@@ -21,6 +21,7 @@ export { Ammunition } from "./equipment/item/Ammunition.js";
21
21
  export { Animal } from "./equipment/item/Animal.js";
22
22
  export { AnimalCare } from "./equipment/item/AnimalCare.js";
23
23
  export { Armor } from "./equipment/item/Armor.js";
24
+ export { ArmorAccessory } from "./equipment/item/ArmorAccessory.js";
24
25
  export { BandageOrRemedy } from "./equipment/item/BandageOrRemedy.js";
25
26
  export { Book } from "./equipment/item/Book.js";
26
27
  export { CeremonialItem } from "./equipment/item/CeremonialItem.js";
@@ -2211,6 +2211,15 @@ export declare const EnhancementPrerequisiteGroup: DB.Enum<"EnhancementPrerequis
2211
2211
  }, []>>, false>;
2212
2212
  }>, []>>>;
2213
2213
  }, []>;
2214
+ export declare const BookPrerequisiteGroup: DB.Enum<"BookPrerequisiteGroup", {
2215
+ Language: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"LanguagePrerequisite", DB.Object<{
2216
+ id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
2217
+ level: DB.MemberDecl<DB.Integer, true>;
2218
+ }>, []>>>;
2219
+ Script: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ScriptPrerequisite", DB.Object<{
2220
+ id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
2221
+ }>, []>>>;
2222
+ }, []>;
2214
2223
  export declare const PreconditionGroup: DB.Enum<"PreconditionGroup", {
2215
2224
  Publication: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationPrerequisite", DB.Object<{
2216
2225
  id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
@@ -7,6 +7,7 @@ import { CulturePrerequisite } from "./single/CulturePrerequisite.js";
7
7
  import { EnergyPrerequisite } from "./single/EnergyPrerequisite.js";
8
8
  import { EnhancementPrerequisite } from "./single/EnhancementPrerequisite.js";
9
9
  import { InfluencePrerequisite } from "./single/InfluencePrerequisite.js";
10
+ import { LanguagePrerequisite } from "./single/LanguagePrerequisite.js";
10
11
  import { PactPrerequisite } from "./single/PactPrerequisite.js";
11
12
  import { PersonalityTraitPrerequisite } from "./single/PersonalityTraitPrerequisite.js";
12
13
  import { PrimaryAttributePrerequisite } from "./single/PrimaryAttributePrerequisite.js";
@@ -17,6 +18,7 @@ import { RatedMinimumNumberPrerequisite } from "./single/RatedMinimumNumberPrere
17
18
  import { RatedPrerequisite } from "./single/RatedPrerequisite.js";
18
19
  import { RatedSumPrerequisite } from "./single/RatedSumPrerequisite.js";
19
20
  import { RulePrerequisite } from "./single/RulePrerequisite.js";
21
+ import { ScriptPrerequisite } from "./single/ScriptPrerequisite.js";
20
22
  import { SexPrerequisite } from "./single/SexPrerequisite.js";
21
23
  import { SexualCharacteristicPrerequisite } from "./single/SexualCharacteristicPrerequisite.js";
22
24
  import { SocialStatusPrerequisite } from "./single/SocialStatusPrerequisite.js";
@@ -176,6 +178,13 @@ export const EnhancementPrerequisiteGroup = DB.Enum(import.meta.url, {
176
178
  Rated: DB.EnumCase({ type: DB.IncludeIdentifier(RatedPrerequisite) }),
177
179
  }),
178
180
  });
181
+ export const BookPrerequisiteGroup = DB.Enum(import.meta.url, {
182
+ name: "BookPrerequisiteGroup",
183
+ values: () => ({
184
+ Language: DB.EnumCase({ type: DB.IncludeIdentifier(LanguagePrerequisite) }),
185
+ Script: DB.EnumCase({ type: DB.IncludeIdentifier(ScriptPrerequisite) }),
186
+ }),
187
+ });
179
188
  export const PreconditionGroup = DB.Enum(import.meta.url, {
180
189
  name: "PreconditionGroup",
181
190
  values: () => ({
@@ -0,0 +1,5 @@
1
+ import * as DB from "tsondb/schema/dsl";
2
+ export declare const LanguagePrerequisite: DB.TypeAlias<"LanguagePrerequisite", DB.Object<{
3
+ id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
4
+ level: DB.MemberDecl<DB.Integer, true>;
5
+ }>, []>;
@@ -0,0 +1,15 @@
1
+ import * as DB from "tsondb/schema/dsl";
2
+ import { LanguageIdentifier } from "../../_Identifier.js";
3
+ export const LanguagePrerequisite = DB.TypeAlias(import.meta.url, {
4
+ name: "LanguagePrerequisite",
5
+ type: () => DB.Object({
6
+ id: DB.Required({
7
+ comment: "The language’s identifier.",
8
+ type: LanguageIdentifier(),
9
+ }),
10
+ level: DB.Required({
11
+ comment: "The required minimum level of the language.",
12
+ type: DB.Integer({ minimum: 1 }),
13
+ }),
14
+ }),
15
+ });
@@ -0,0 +1,4 @@
1
+ import * as DB from "tsondb/schema/dsl";
2
+ export declare const ScriptPrerequisite: DB.TypeAlias<"ScriptPrerequisite", DB.Object<{
3
+ id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
4
+ }>, []>;
@@ -0,0 +1,11 @@
1
+ import * as DB from "tsondb/schema/dsl";
2
+ import { ScriptIdentifier } from "../../_Identifier.js";
3
+ export const ScriptPrerequisite = DB.TypeAlias(import.meta.url, {
4
+ name: "ScriptPrerequisite",
5
+ type: () => DB.Object({
6
+ id: DB.Required({
7
+ comment: "The script’s identifier.",
8
+ type: ScriptIdentifier(),
9
+ }),
10
+ }),
11
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optolith/database-schema",
3
- "version": "0.94.0",
3
+ "version": "0.95.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",