@optolith/database-schema 0.42.1 → 0.42.4

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,22 @@
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.42.4](https://github.com/Optolith/database-schema/compare/v0.42.3...v0.42.4) (2026-04-10)
6
+
7
+
8
+ ### Features
9
+
10
+ * add replacement text option to known item specifics ([4a6648e](https://github.com/Optolith/database-schema/commit/4a6648e307a35a62422c923de59b156811da1119))
11
+
12
+ ## [0.42.3](https://github.com/Optolith/database-schema/compare/v0.42.2...v0.42.3) (2026-04-10)
13
+
14
+ ## [0.42.2](https://github.com/elyukai/optolith-database-schema/compare/v0.42.1...v0.42.2) (2026-04-10)
15
+
16
+
17
+ ### Features
18
+
19
+ * known item specifics ([9a9a2bd](https://github.com/elyukai/optolith-database-schema/commit/9a9a2bd6a1a2ff3ee7a3c14cea064a0cce1ee52f))
20
+
5
21
  ## [0.42.1](https://github.com/elyukai/optolith-database-schema/compare/v0.42.0...v0.42.1) (2026-03-31)
6
22
 
7
23
 
package/gen/types.d.ts CHANGED
@@ -258,6 +258,7 @@ export type EnumMap = {
258
258
  CastingTimeDuringLovemakingUnit: CastingTimeDuringLovemakingUnit
259
259
  CheckResultArithmetic: CheckResultArithmetic
260
260
  CheckResultValue: CheckResultValue
261
+ CollectorsValue: CollectorsValue
261
262
  CombatAnimalPowerType: CombatAnimalPowerType
262
263
  CombatRelatedSpecialAbilityIdentifier: CombatRelatedSpecialAbilityIdentifier
263
264
  CombatSpecialAbilityType: CombatSpecialAbilityType
@@ -322,6 +323,9 @@ export type EnumMap = {
322
323
  IntoxicantAddictionWithdrawalPreventionInterval: IntoxicantAddictionWithdrawalPreventionInterval
323
324
  JesterTrickDuration: JesterTrickDuration
324
325
  JesterTrickRange: JesterTrickRange
326
+ KnownItemAge: KnownItemAge
327
+ KnownItemCondition: KnownItemCondition
328
+ KnownItemStabilityRating: KnownItemStabilityRating
325
329
  LaboratoryLevel: LaboratoryLevel
326
330
  LanguagePrerequisiteGroup: LanguagePrerequisiteGroup
327
331
  LanguagesSelectOptionCategoryPrerequisite: LanguagesSelectOptionCategoryPrerequisite
@@ -534,6 +538,7 @@ export type TypeAliasMap = {
534
538
  CommonnessRatedSkill: CommonnessRatedSkill
535
539
  CommonProfessionConstraints: CommonProfessionConstraints<unknown>
536
540
  ComplexComplexity: ComplexComplexity
541
+ ConstantCollectorsValue: ConstantCollectorsValue
537
542
  ConstantDemonicPoisonLevel: ConstantDemonicPoisonLevel
538
543
  ConstantIntoxicantAddictionInterval: ConstantIntoxicantAddictionInterval
539
544
  ConstantMagicalSignCost: ConstantMagicalSignCost
@@ -669,6 +674,8 @@ export type TypeAliasMap = {
669
674
  JesterTrickCost: JesterTrickCost
670
675
  JesterTrickPerformanceParameters: JesterTrickPerformanceParameters
671
676
  JewelryMaterialDifference: JewelryMaterialDifference<unknown>
677
+ KnownItemSpecifics: KnownItemSpecifics
678
+ KnownItemSpecificsTranslation: KnownItemSpecificsTranslation
672
679
  LanguagePrerequisites: LanguagePrerequisites
673
680
  LanguagesScriptsOptions: LanguagesScriptsOptions
674
681
  LanguagesSelectOptionCategory: LanguagesSelectOptionCategory
@@ -698,6 +705,7 @@ export type TypeAliasMap = {
698
705
  MeleeDamage: MeleeDamage
699
706
  MeleeWeapon: MeleeWeapon
700
707
  MineralPoison: MineralPoison
708
+ MinimumCollectorsValue: MinimumCollectorsValue
701
709
  ModifiableCastingTime: ModifiableCastingTime
702
710
  ModifiableOneTimeCost: ModifiableOneTimeCost
703
711
  ModifiableRange: ModifiableRange
@@ -10995,6 +11003,11 @@ export interface Weapon {
10995
11003
  */
10996
11004
  restrictedTo?: RestrictedTo
10997
11005
 
11006
+ /**
11007
+ * The weapon is a known item, which implies some additional values.
11008
+ */
11009
+ knownItemSpecifics?: KnownItemSpecifics
11010
+
10998
11011
  /**
10999
11012
  * References to where in which publications this entry has been defined. Entries may also be added or removed in later printings.
11000
11013
  */
@@ -11048,6 +11061,11 @@ export interface WeaponTranslation {
11048
11061
  */
11049
11062
  disadvantage?: string
11050
11063
 
11064
+ /**
11065
+ * The weapon is a known item, which implies some additional values.
11066
+ */
11067
+ knownItemSpecifics?: KnownItemSpecificsTranslation
11068
+
11051
11069
  errata?: Errata
11052
11070
  }
11053
11071
 
@@ -11596,6 +11614,151 @@ export type RestrictedToBlessedTraditionsScope =
11596
11614
  kind: "Shamanistic"
11597
11615
  }
11598
11616
 
11617
+ export interface KnownItemSpecifics {
11618
+ /**
11619
+ * The age of the item is known.
11620
+ */
11621
+ age?: KnownItemAge
11622
+
11623
+ /**
11624
+ * The condition of the item is known and well specified.
11625
+ */
11626
+ condition?: KnownItemCondition
11627
+
11628
+ /**
11629
+ * The breaking point rating (weapon) or sturdiness rating (armor) of the item. Either a specific rating or a general unbreakability.
11630
+ */
11631
+ stabilityRating?: KnownItemStabilityRating
11632
+
11633
+ /**
11634
+ * The *Damaged* (weapon) or *Wear* (armor) level of the item, if any.
11635
+ */
11636
+ damageLevel?: number
11637
+
11638
+ /**
11639
+ * The collector’s value of the known item.
11640
+ */
11641
+ collectorsValue: CollectorsValue
11642
+ }
11643
+
11644
+ /**
11645
+ * The age of the item is known.
11646
+ */
11647
+ export type KnownItemAge =
11648
+ | {
11649
+ kind: "Antique"
11650
+ }
11651
+ | {
11652
+ kind: "Old"
11653
+ }
11654
+
11655
+ /**
11656
+ * The condition of the item is known and well specified.
11657
+ */
11658
+ export type KnownItemCondition =
11659
+ | {
11660
+ kind: "Broken"
11661
+ }
11662
+ | {
11663
+ kind: "Poor"
11664
+ }
11665
+ | {
11666
+ kind: "Good"
11667
+ }
11668
+ | {
11669
+ kind: "VeryGood"
11670
+ }
11671
+ | {
11672
+ kind: "AsNew"
11673
+ }
11674
+
11675
+ /**
11676
+ * Either a specific rating or a general unbreakability.
11677
+ */
11678
+ export type KnownItemStabilityRating =
11679
+ | {
11680
+ kind: "Constant"
11681
+ Constant: number
11682
+ }
11683
+ | {
11684
+ kind: "Unbreakable"
11685
+ }
11686
+
11687
+ /**
11688
+ * The item has a collector’s value.
11689
+ */
11690
+ export type CollectorsValue =
11691
+ | {
11692
+ kind: "Constant"
11693
+ Constant: ConstantCollectorsValue
11694
+ }
11695
+ | {
11696
+ kind: "Minimum"
11697
+ Minimum: MinimumCollectorsValue
11698
+ }
11699
+ | {
11700
+ kind: "Invaluable"
11701
+ }
11702
+
11703
+ export interface ConstantCollectorsValue {
11704
+ /**
11705
+ * The collector’s value is a fixed price in silverthalers.
11706
+ */
11707
+ value: number
11708
+
11709
+ /**
11710
+ * All translations for the entry, identified by IETF language tag (BCP47).
11711
+ */
11712
+ translations?: {
11713
+ [localeId: string]: ConstantCollectorsValueTranslation
11714
+ }
11715
+ }
11716
+
11717
+ export interface ConstantCollectorsValueTranslation {
11718
+ /**
11719
+ * A note, appended to the generated string in parenthesis.
11720
+ */
11721
+ note?: ResponsiveTextOptional
11722
+
11723
+ /**
11724
+ * A replacement string.
11725
+ */
11726
+ replacement?: ResponsiveTextReplace
11727
+ }
11728
+
11729
+ export interface MinimumCollectorsValue {
11730
+ /**
11731
+ * The collector’s value is a range with an open end and the specified price in silverthalers as the minimum.
11732
+ */
11733
+ value: number
11734
+
11735
+ /**
11736
+ * All translations for the entry, identified by IETF language tag (BCP47).
11737
+ */
11738
+ translations?: {
11739
+ [localeId: string]: MinimumCollectorsValueTranslation
11740
+ }
11741
+ }
11742
+
11743
+ export interface MinimumCollectorsValueTranslation {
11744
+ /**
11745
+ * A note, appended to the generated string in parenthesis.
11746
+ */
11747
+ note?: ResponsiveTextOptional
11748
+
11749
+ /**
11750
+ * A replacement string.
11751
+ */
11752
+ replacement?: ResponsiveTextReplace
11753
+ }
11754
+
11755
+ export interface KnownItemSpecificsTranslation {
11756
+ /**
11757
+ * The condition of the item.
11758
+ */
11759
+ condition: string
11760
+ }
11761
+
11599
11762
  export interface CauldronEnchantment {
11600
11763
  /**
11601
11764
  * Number of available levels.
@@ -20463,6 +20626,11 @@ export interface Armor {
20463
20626
  */
20464
20627
  restrictedTo?: RestrictedTo
20465
20628
 
20629
+ /**
20630
+ * The armor is a known item, which implies some additional values.
20631
+ */
20632
+ knownItemSpecifics?: KnownItemSpecifics
20633
+
20466
20634
  /**
20467
20635
  * References to where in which publications this entry has been defined. Entries may also be added or removed in later printings.
20468
20636
  */
@@ -20512,6 +20680,11 @@ export interface ArmorTranslation {
20512
20680
  */
20513
20681
  disadvantage?: string
20514
20682
 
20683
+ /**
20684
+ * The weapon is a known item, which implies some additional values.
20685
+ */
20686
+ knownItemSpecifics?: KnownItemSpecificsTranslation
20687
+
20515
20688
  errata?: Errata
20516
20689
  }
20517
20690
 
@@ -64,6 +64,53 @@ export declare const Armor: DB.Entity<"Armor", {
64
64
  isSanctifiedBy: DB.MemberDecl<DB.Boolean, true>;
65
65
  }>, []>>, false>;
66
66
  }>, []>>, false>;
67
+ knownItemSpecifics: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"KnownItemSpecifics", DB.Object<{
68
+ age: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"KnownItemAge", {
69
+ Antique: DB.EnumCase<null>;
70
+ Old: DB.EnumCase<null>;
71
+ }, []>>, false>;
72
+ condition: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"KnownItemCondition", {
73
+ Broken: DB.EnumCase<null>;
74
+ Poor: DB.EnumCase<null>;
75
+ Good: DB.EnumCase<null>;
76
+ VeryGood: DB.EnumCase<null>;
77
+ AsNew: DB.EnumCase<null>;
78
+ }, []>>, false>;
79
+ stabilityRating: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"KnownItemStabilityRating", {
80
+ Constant: DB.EnumCase<DB.Integer>;
81
+ Unbreakable: DB.EnumCase<null>;
82
+ }, []>>, false>;
83
+ damageLevel: DB.MemberDecl<DB.Integer, false>;
84
+ collectorsValue: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CollectorsValue", {
85
+ Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantCollectorsValue", DB.Object<{
86
+ value: DB.MemberDecl<DB.Float, true>;
87
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ConstantCollectorsValueTranslation", {
88
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
89
+ full: DB.MemberDecl<DB.String, true>;
90
+ compressed: DB.MemberDecl<DB.String, false>;
91
+ }>, []>>, false>;
92
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
93
+ full: DB.MemberDecl<DB.String, true>;
94
+ compressed: DB.MemberDecl<DB.String, true>;
95
+ }>, []>>, false>;
96
+ }>, false>;
97
+ }>, []>>>;
98
+ Minimum: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"MinimumCollectorsValue", DB.Object<{
99
+ value: DB.MemberDecl<DB.Float, true>;
100
+ translations: DB.MemberDecl<DB.NestedEntityMap<"MinimumCollectorsValueTranslation", {
101
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
102
+ full: DB.MemberDecl<DB.String, true>;
103
+ compressed: DB.MemberDecl<DB.String, false>;
104
+ }>, []>>, false>;
105
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
106
+ full: DB.MemberDecl<DB.String, true>;
107
+ compressed: DB.MemberDecl<DB.String, true>;
108
+ }>, []>>, false>;
109
+ }>, false>;
110
+ }>, []>>>;
111
+ Invaluable: DB.EnumCase<null>;
112
+ }, []>>, true>;
113
+ }>, []>>, false>;
67
114
  src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
68
115
  id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
69
116
  occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
@@ -112,6 +159,9 @@ export declare const Armor: DB.Entity<"Armor", {
112
159
  rules: DB.MemberDecl<DB.String, false>;
113
160
  advantage: DB.MemberDecl<DB.String, false>;
114
161
  disadvantage: DB.MemberDecl<DB.String, false>;
162
+ knownItemSpecifics: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"KnownItemSpecificsTranslation", DB.Object<{
163
+ condition: DB.MemberDecl<DB.String, true>;
164
+ }>, []>>, false>;
115
165
  errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
116
166
  date: DB.MemberDecl<DB.Date, true>;
117
167
  description: DB.MemberDecl<DB.String, true>;
@@ -3,7 +3,7 @@ import { ArmorIdentifier, ArmorTypeIdentifier } from "../../_Identifier.js";
3
3
  import { NestedTranslationMap } from "../../Locale.js";
4
4
  import { Errata } from "../../source/_Erratum.js";
5
5
  import { src } from "../../source/_PublicationRef.js";
6
- import { ComplexComplexity, Cost, RestrictedTo, Weight } from "./_Item.js";
6
+ import { ComplexComplexity, Cost, KnownItemSpecifics, KnownItemSpecificsTranslation, RestrictedTo, Weight, } from "./_Item.js";
7
7
  export const Armor = DB.Entity(import.meta.url, {
8
8
  name: "Armor",
9
9
  namePlural: "Armor",
@@ -44,6 +44,10 @@ export const Armor = DB.Entity(import.meta.url, {
44
44
  comment: "Define if during character creation this weapon can only be bought by a specific subset of characters.",
45
45
  type: DB.IncludeIdentifier(RestrictedTo),
46
46
  }),
47
+ knownItemSpecifics: DB.Optional({
48
+ comment: "The armor is a known item, which implies some additional values.",
49
+ type: DB.IncludeIdentifier(KnownItemSpecifics),
50
+ }),
47
51
  src,
48
52
  translations: NestedTranslationMap(DB.Required, "Armor", DB.Object({
49
53
  name: DB.Required({
@@ -70,6 +74,10 @@ export const Armor = DB.Entity(import.meta.url, {
70
74
  comment: "The armor disadvantage text.",
71
75
  type: DB.String({ minLength: 1, markdown: "block" }),
72
76
  }),
77
+ knownItemSpecifics: DB.Optional({
78
+ comment: "The weapon is a known item, which implies some additional values.",
79
+ type: DB.IncludeIdentifier(KnownItemSpecificsTranslation),
80
+ }),
73
81
  errata: DB.Optional({
74
82
  type: DB.IncludeIdentifier(Errata),
75
83
  }),
@@ -96,6 +96,53 @@ export declare const Weapon: DB.Entity<"Weapon", {
96
96
  isSanctifiedBy: DB.MemberDecl<DB.Boolean, true>;
97
97
  }>, []>>, false>;
98
98
  }>, []>>, false>;
99
+ knownItemSpecifics: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"KnownItemSpecifics", DB.Object<{
100
+ age: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"KnownItemAge", {
101
+ Antique: DB.EnumCase<null>;
102
+ Old: DB.EnumCase<null>;
103
+ }, []>>, false>;
104
+ condition: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"KnownItemCondition", {
105
+ Broken: DB.EnumCase<null>;
106
+ Poor: DB.EnumCase<null>;
107
+ Good: DB.EnumCase<null>;
108
+ VeryGood: DB.EnumCase<null>;
109
+ AsNew: DB.EnumCase<null>;
110
+ }, []>>, false>;
111
+ stabilityRating: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"KnownItemStabilityRating", {
112
+ Constant: DB.EnumCase<DB.Integer>;
113
+ Unbreakable: DB.EnumCase<null>;
114
+ }, []>>, false>;
115
+ damageLevel: DB.MemberDecl<DB.Integer, false>;
116
+ collectorsValue: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CollectorsValue", {
117
+ Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantCollectorsValue", DB.Object<{
118
+ value: DB.MemberDecl<DB.Float, true>;
119
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ConstantCollectorsValueTranslation", {
120
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
121
+ full: DB.MemberDecl<DB.String, true>;
122
+ compressed: DB.MemberDecl<DB.String, false>;
123
+ }>, []>>, false>;
124
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
125
+ full: DB.MemberDecl<DB.String, true>;
126
+ compressed: DB.MemberDecl<DB.String, true>;
127
+ }>, []>>, false>;
128
+ }>, false>;
129
+ }>, []>>>;
130
+ Minimum: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"MinimumCollectorsValue", DB.Object<{
131
+ value: DB.MemberDecl<DB.Float, true>;
132
+ translations: DB.MemberDecl<DB.NestedEntityMap<"MinimumCollectorsValueTranslation", {
133
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
134
+ full: DB.MemberDecl<DB.String, true>;
135
+ compressed: DB.MemberDecl<DB.String, false>;
136
+ }>, []>>, false>;
137
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
138
+ full: DB.MemberDecl<DB.String, true>;
139
+ compressed: DB.MemberDecl<DB.String, true>;
140
+ }>, []>>, false>;
141
+ }>, false>;
142
+ }>, []>>>;
143
+ Invaluable: DB.EnumCase<null>;
144
+ }, []>>, true>;
145
+ }>, []>>, false>;
99
146
  src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
100
147
  id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
101
148
  occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
@@ -144,6 +191,9 @@ export declare const Weapon: DB.Entity<"Weapon", {
144
191
  rules: DB.MemberDecl<DB.String, false>;
145
192
  advantage: DB.MemberDecl<DB.String, false>;
146
193
  disadvantage: DB.MemberDecl<DB.String, false>;
194
+ knownItemSpecifics: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"KnownItemSpecificsTranslation", DB.Object<{
195
+ condition: DB.MemberDecl<DB.String, true>;
196
+ }>, []>>, false>;
147
197
  errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
148
198
  date: DB.MemberDecl<DB.Date, true>;
149
199
  description: DB.MemberDecl<DB.String, true>;
@@ -3,7 +3,7 @@ import { CloseCombatTechnique, RangedCombatTechnique } from "../../CombatTechniq
3
3
  import { NestedTranslationMap } from "../../Locale.js";
4
4
  import { Errata } from "../../source/_Erratum.js";
5
5
  import { src } from "../../source/_PublicationRef.js";
6
- import { Complexity, Cost, RestrictedTo, StructurePoints, Weight } from "./_Item.js";
6
+ import { Complexity, Cost, KnownItemSpecifics, KnownItemSpecificsTranslation, RestrictedTo, StructurePoints, Weight, } from "./_Item.js";
7
7
  import { MeleeWeapon } from "./_MeleeWeapon.js";
8
8
  import { RangedWeapon } from "./_RangedWeapon.js";
9
9
  import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
@@ -51,6 +51,10 @@ export const Weapon = DB.Entity(import.meta.url, {
51
51
  comment: "Define if during character creation this weapon can only be bought by a specific subset of characters.",
52
52
  type: DB.IncludeIdentifier(RestrictedTo),
53
53
  }),
54
+ knownItemSpecifics: DB.Optional({
55
+ comment: "The weapon is a known item, which implies some additional values.",
56
+ type: DB.IncludeIdentifier(KnownItemSpecifics),
57
+ }),
54
58
  src,
55
59
  translations: NestedTranslationMap(DB.Required, "Weapon", DB.Object({
56
60
  name: DB.Required({
@@ -77,6 +81,10 @@ export const Weapon = DB.Entity(import.meta.url, {
77
81
  comment: "The weapon disadvantage text.",
78
82
  type: DB.String({ minLength: 1, markdown: "block" }),
79
83
  }),
84
+ knownItemSpecifics: DB.Optional({
85
+ comment: "The weapon is a known item, which implies some additional values.",
86
+ type: DB.IncludeIdentifier(KnownItemSpecificsTranslation),
87
+ }),
80
88
  errata: DB.Optional({
81
89
  type: DB.IncludeIdentifier(Errata),
82
90
  }),
@@ -412,3 +412,53 @@ export declare const RestrictedToBlessedTraditionsScope: DB.Enum<"RestrictedToBl
412
412
  Church: DB.EnumCase<null>;
413
413
  Shamanistic: DB.EnumCase<null>;
414
414
  }, []>;
415
+ export declare const KnownItemSpecifics: DB.TypeAlias<"KnownItemSpecifics", DB.Object<{
416
+ age: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"KnownItemAge", {
417
+ Antique: DB.EnumCase<null>;
418
+ Old: DB.EnumCase<null>;
419
+ }, []>>, false>;
420
+ condition: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"KnownItemCondition", {
421
+ Broken: DB.EnumCase<null>;
422
+ Poor: DB.EnumCase<null>;
423
+ Good: DB.EnumCase<null>;
424
+ VeryGood: DB.EnumCase<null>;
425
+ AsNew: DB.EnumCase<null>;
426
+ }, []>>, false>;
427
+ stabilityRating: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"KnownItemStabilityRating", {
428
+ Constant: DB.EnumCase<DB.Integer>;
429
+ Unbreakable: DB.EnumCase<null>;
430
+ }, []>>, false>;
431
+ damageLevel: DB.MemberDecl<DB.Integer, false>;
432
+ collectorsValue: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CollectorsValue", {
433
+ Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantCollectorsValue", DB.Object<{
434
+ value: DB.MemberDecl<DB.Float, true>;
435
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ConstantCollectorsValueTranslation", {
436
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
437
+ full: DB.MemberDecl<DB.String, true>;
438
+ compressed: DB.MemberDecl<DB.String, false>;
439
+ }>, []>>, false>;
440
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
441
+ full: DB.MemberDecl<DB.String, true>;
442
+ compressed: DB.MemberDecl<DB.String, true>;
443
+ }>, []>>, false>;
444
+ }>, false>;
445
+ }>, []>>>;
446
+ Minimum: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"MinimumCollectorsValue", DB.Object<{
447
+ value: DB.MemberDecl<DB.Float, true>;
448
+ translations: DB.MemberDecl<DB.NestedEntityMap<"MinimumCollectorsValueTranslation", {
449
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
450
+ full: DB.MemberDecl<DB.String, true>;
451
+ compressed: DB.MemberDecl<DB.String, false>;
452
+ }>, []>>, false>;
453
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
454
+ full: DB.MemberDecl<DB.String, true>;
455
+ compressed: DB.MemberDecl<DB.String, true>;
456
+ }>, []>>, false>;
457
+ }>, false>;
458
+ }>, []>>>;
459
+ Invaluable: DB.EnumCase<null>;
460
+ }, []>>, true>;
461
+ }>, []>;
462
+ export declare const KnownItemSpecificsTranslation: DB.TypeAlias<"KnownItemSpecificsTranslation", DB.Object<{
463
+ condition: DB.MemberDecl<DB.String, true>;
464
+ }>, []>;
@@ -1,5 +1,6 @@
1
1
  import * as DB from "tsondb/schema/dsl";
2
2
  import { BlessedTraditionIdentifier, CultureIdentifier, MagicalTraditionIdentifier, ProfessionIdentifier, RaceIdentifier, } from "../../_Identifier.js";
3
+ import { ResponsiveTextOptional, ResponsiveTextReplace } from "../../_ResponsiveText.js";
3
4
  import { NestedTranslationMap } from "../../Locale.js";
4
5
  import { Errata } from "../../source/_Erratum.js";
5
6
  import { src } from "../../source/_PublicationRef.js";
@@ -252,3 +253,177 @@ export const RestrictedToBlessedTraditionsScope = DB.Enum(import.meta.url, {
252
253
  Shamanistic: DB.EnumCase({ type: null }),
253
254
  }),
254
255
  });
256
+ export const KnownItemSpecifics = DB.TypeAlias(import.meta.url, {
257
+ name: "KnownItemSpecifics",
258
+ type: () => DB.Object({
259
+ age: DB.Optional({
260
+ comment: "The age of the item is known.",
261
+ type: DB.IncludeIdentifier(KnownItemAge),
262
+ }),
263
+ condition: DB.Optional({
264
+ comment: "The condition of the item is known and well specified.",
265
+ type: DB.IncludeIdentifier(KnownItemCondition),
266
+ }),
267
+ stabilityRating: DB.Optional({
268
+ comment: "The breaking point rating (weapon) or sturdiness rating (armor) of the item. Either a specific rating or a general unbreakability.",
269
+ type: DB.IncludeIdentifier(KnownItemStabilityRating),
270
+ }),
271
+ damageLevel: DB.Optional({
272
+ comment: "The *Damaged* (weapon) or *Wear* (armor) level of the item, if any.",
273
+ type: DB.Integer({ minimum: 1, maximum: 4 }),
274
+ }),
275
+ collectorsValue: DB.Required({
276
+ comment: "The collector’s value of the known item.",
277
+ type: DB.IncludeIdentifier(CollectorsValue),
278
+ }),
279
+ }),
280
+ });
281
+ export const KnownItemSpecificsTranslation = DB.TypeAlias(import.meta.url, {
282
+ name: "KnownItemSpecificsTranslation",
283
+ type: () => DB.Object({
284
+ condition: DB.Required({
285
+ comment: "The condition of the item.",
286
+ type: DB.String({ minLength: 1, markdown: "inline" }),
287
+ }),
288
+ }),
289
+ });
290
+ const KnownItemAge = DB.Enum(import.meta.url, {
291
+ name: "KnownItemAge",
292
+ comment: "The age of the item is known.",
293
+ values: () => ({
294
+ Antique: DB.EnumCase({ type: null }),
295
+ Old: DB.EnumCase({ type: null }),
296
+ }),
297
+ });
298
+ const KnownItemCondition = DB.Enum(import.meta.url, {
299
+ name: "KnownItemCondition",
300
+ comment: "The condition of the item is known and well specified.",
301
+ values: () => ({
302
+ Broken: DB.EnumCase({ type: null }),
303
+ Poor: DB.EnumCase({ type: null }),
304
+ Good: DB.EnumCase({ type: null }),
305
+ VeryGood: DB.EnumCase({ type: null }),
306
+ AsNew: DB.EnumCase({ type: null }),
307
+ }),
308
+ });
309
+ const KnownItemStabilityRating = DB.Enum(import.meta.url, {
310
+ name: "KnownItemStabilityRating",
311
+ comment: "Either a specific rating or a general unbreakability.",
312
+ values: () => ({
313
+ Constant: DB.EnumCase({ type: DB.Integer({ minimum: 1 }) }),
314
+ Unbreakable: DB.EnumCase({ type: null }),
315
+ }),
316
+ });
317
+ const CollectorsValue = DB.Enum(import.meta.url, {
318
+ name: "CollectorsValue",
319
+ comment: "The item has a collector’s value.",
320
+ values: () => ({
321
+ Constant: DB.EnumCase({
322
+ comment: "The collector’s value is a fixed price in silverthalers.",
323
+ type: DB.IncludeIdentifier(ConstantCollectorsValue),
324
+ }),
325
+ Minimum: DB.EnumCase({
326
+ comment: "The collector’s value is a range with an open end and the specified price in silverthalers as the minimum.",
327
+ type: DB.IncludeIdentifier(MinimumCollectorsValue),
328
+ }),
329
+ Invaluable: DB.EnumCase({
330
+ comment: "The item is invaluable to collectors.",
331
+ type: null,
332
+ }),
333
+ }),
334
+ });
335
+ const ConstantCollectorsValue = DB.TypeAlias(import.meta.url, {
336
+ name: "ConstantCollectorsValue",
337
+ type: () => DB.Object({
338
+ value: DB.Required({
339
+ comment: "The collector’s value is a fixed price in silverthalers.",
340
+ type: DB.Float({ minimum: { value: 0, isExclusive: true } }),
341
+ }),
342
+ translations: NestedTranslationMap(DB.Optional, "ConstantCollectorsValue", DB.Object({
343
+ note: DB.Optional({
344
+ comment: "A note, appended to the generated string in parenthesis.",
345
+ type: DB.IncludeIdentifier(ResponsiveTextOptional),
346
+ }),
347
+ replacement: DB.Optional({
348
+ comment: "A replacement string.",
349
+ type: DB.IncludeIdentifier(ResponsiveTextReplace),
350
+ }),
351
+ }, { minProperties: 1 })),
352
+ }),
353
+ });
354
+ const MinimumCollectorsValue = DB.TypeAlias(import.meta.url, {
355
+ name: "MinimumCollectorsValue",
356
+ type: () => DB.Object({
357
+ value: DB.Required({
358
+ comment: "The collector’s value is a range with an open end and the specified price in silverthalers as the minimum.",
359
+ type: DB.Float({ minimum: { value: 0, isExclusive: true } }),
360
+ }),
361
+ translations: NestedTranslationMap(DB.Optional, "MinimumCollectorsValue", DB.Object({
362
+ note: DB.Optional({
363
+ comment: "A note, appended to the generated string in parenthesis.",
364
+ type: DB.IncludeIdentifier(ResponsiveTextOptional),
365
+ }),
366
+ replacement: DB.Optional({
367
+ comment: "A replacement string.",
368
+ type: DB.IncludeIdentifier(ResponsiveTextReplace),
369
+ }),
370
+ }, { minProperties: 1 })),
371
+ }),
372
+ });
373
+ /*
374
+
375
+ Possible known item conditions:
376
+ -------------------------------
377
+
378
+ Die Waffe ist antik, aber gut erhalten.
379
+ Der Schild ist antik, aber gut erhalten.
380
+ Die Waffe ist antik, aber sehr gut erhalten und sieht aus wie neu.
381
+ Die Waffe ist antik, aber sehr gut erhalten.
382
+ Die Waffe ist zwar antik, aber sehr gut erhalten.
383
+ Die Waffe ist antik und weist einige Scharten in der Klinge auf.
384
+ Die Waffe ist antik und zerbrochen.
385
+ Die Waffe ist antik, aber neuwertig.
386
+ Die Waffe ist alt.
387
+ Die Waffe ist alt, aber gut gepflegt.
388
+ Der Magierstab ist alt, aber gut gepflegt.
389
+ Die Waffen sind alt, aber gut gepflegt.
390
+ Die Waffe ist alt, aber neuwertig.
391
+ Das Schwert ist alt, aber neuwertig.
392
+ Die Waffe ist alt, aber gut erhalten.
393
+ Die Waffe ist alt, aber sie wurde vermutlich niemals eingesetzt und ist gut erhalten.
394
+ Die Waffe ist alt und in schlechtem Zustand.
395
+ Die Waffe ist alt und schlecht gepflegt.
396
+ Die Waffe ist alt, aber in gepflegtem Zustand.
397
+ Die Waffe ist gebraucht.
398
+ Die Waffe ist gebraucht, aber neuwertig.
399
+ Die Waffe ist gebraucht, aber unzerbrechlich.
400
+ Die Waffe ist gebraucht, aber gepflegt.
401
+ Die Rüstung ist gebraucht, aber gut erhalten.
402
+ Die Rüstung ist gebraucht und in einem schlechten Zustand.
403
+ Die Waffe ist neuwertig.
404
+ Die Waffe ist neuwertig und unbenutzt.
405
+ *leer*
406
+
407
+ Wenn er gebunden wird, wird der
408
+ Stab wie alle Traditionsartefakte nahezu unzerbrechlich.
409
+ Sie weist 1 Stufe Beschädigung auf.
410
+ Er weist 1 Stufe Beschädigung auf.
411
+ Der Bruchfaktor beträgt 14.
412
+ Der Bruchfaktor beträgt 12 und sie weist 3 Stufen Beschädigung auf.
413
+ Sie ist unzerbrechlich.
414
+ Einzig elementares Feuer, das heißer brennt als ein Drachenodem oder ein IGNIFAXIUS, oder aber das Eingreifen eines Gottes können die Axt zerstören.
415
+ Einzig elementares Feuer, das heißer brennt als ein Drachenodem oder ein IGNIFAXIUS, spezielle Zauberei oder das Eingreifen eines Gottes können die Axt zerstören.
416
+ Die Waffe war lange Zeit dem Salzwasser der Zyklopensee ausgesetzt, was allerdings bei Weitem nicht so große Schäden angerichtet hat, wie zu erwarten wäre.
417
+ Die Waffe kann nicht benutzt werden, bis die geborstene Klinge neu geschmiedet wurde.
418
+ Sie weist 3 Stufen Verschleiß auf und ist unbrauchbar, bis sie repariert wurde.
419
+
420
+ Possible collector's values:
421
+ ----------------------------
422
+
423
+ 750+ S (nur Personen mit sehr zweifelhaftem Ruf würden eine solche Waffe erwerben)
424
+ 1.500+ S
425
+ 2.500 S
426
+ 500+ S (1.500+ S für ein zusammenpassendes Paar)
427
+ unbezahlbar
428
+
429
+ */
@@ -64,14 +64,14 @@ export const checkWeaponCombatTechniqueIntegrity = ({ instanceContent, getInstan
64
64
  checkPart(ct.special.has_length, meleeUse.length, "a length", "close", ctId),
65
65
  checkPart(ct.special.has_reach, meleeUse.reach, "a reach", "close", ctId),
66
66
  checkPart(ct.special.has_shield_size, meleeUse.size, "a shield size", "close", ctId),
67
- ].filter(v => v !== undefined);
67
+ ];
68
68
  }),
69
69
  ...Object.entries(instanceContent.ranged_uses ?? {}).flatMap(([ctId, rangedUse]) => {
70
70
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- integrity has been checked, it must be present
71
71
  const ct = getInstanceById("RangedCombatTechnique", ctId);
72
72
  return [
73
73
  checkPart(ct.special.has_ammunition, rangedUse.ammunition, "an ammunition", "ranged", ctId),
74
- ].filter(v => v !== undefined);
74
+ ];
75
75
  }),
76
76
  ].filter(v => v !== undefined);
77
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optolith/database-schema",
3
- "version": "0.42.1",
3
+ "version": "0.42.4",
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",
@@ -53,9 +53,9 @@
53
53
  "typescript": "^5.9.3",
54
54
  "typescript-eslint": "^8.57.1"
55
55
  },
56
- "repository": "github:elyukai/optolith-database-schema",
56
+ "repository": "github:Optolith/database-schema",
57
57
  "bugs": {
58
- "url": "https://github.com/elyukai/optolith-database-schema/issues"
58
+ "url": "https://github.com/Optolith/database-schema/issues"
59
59
  },
60
60
  "type": "module"
61
61
  }