@optolith/database-schema 0.81.0 → 0.82.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.82.0](https://github.com/Optolith/database-schema/compare/v0.81.0...v0.82.0) (2026-10-06)
6
+
7
+ ### ⚠ BREAKING CHANGES
8
+
9
+ * allow more weapon values for talismans
10
+ * allow multiple different talisman activation cost
11
+
12
+ ### Features
13
+
14
+ * allow more weapon values for talismans ([b109d0f](https://github.com/Optolith/database-schema/commit/b109d0f90f9f9cdfa0f8e33cbacde44b2a8563ee))
15
+ * allow multiple different talisman activation cost ([89e5d14](https://github.com/Optolith/database-schema/commit/89e5d14d2faefac220ad43765de0cba1359ece9e))
16
+
5
17
  ## [0.81.0](https://github.com/Optolith/database-schema/compare/v0.80.0...v0.81.0) (2026-10-06)
6
18
 
7
19
  ### ⚠ BREAKING CHANGES
package/gen/types.d.ts CHANGED
@@ -964,6 +964,7 @@ export type TypeAliasMap = {
964
964
  TalismanActivationCost: TalismanActivationCost
965
965
  TalismanActivationDuration: TalismanActivationDuration
966
966
  TalismanActivationDurationExpression: TalismanActivationDurationExpression
967
+ TalismanCombatUse: TalismanCombatUse
967
968
  TalismanDamage: TalismanDamage
968
969
  TalismanMeleeWeapon: TalismanMeleeWeapon
969
970
  TalismanRangedWeapon: TalismanRangedWeapon
@@ -27496,21 +27497,7 @@ export interface Talisman {
27496
27497
  */
27497
27498
  ap_value?: number
27498
27499
 
27499
- combatUse?: {
27500
- /**
27501
- * A list of stat blocks for each close combat technique this talisman can be used with.
27502
- */
27503
- melee_uses?: {
27504
- [closeCombatTechniqueId: string]: MeleeTalismanUse
27505
- }
27506
-
27507
- /**
27508
- * A list of stat blocks for each ranged combat technique this talisman can be used with.
27509
- */
27510
- ranged_uses?: {
27511
- [rangedCombatTechniqueId: string]: RangedTalismanUse
27512
- }
27513
- }
27500
+ combatUse?: TalismanCombatUse
27514
27501
 
27515
27502
  /**
27516
27503
  * References to where in which publications this entry has been defined. Entries may also be added or removed in later printings.
@@ -27530,10 +27517,6 @@ export interface Talisman {
27530
27517
  */
27531
27518
  export type Talisman_ID = string
27532
27519
 
27533
- export type MeleeTalismanUse = TalismanMeleeWeapon
27534
-
27535
- export type RangedTalismanUse = TalismanRangedWeapon
27536
-
27537
27520
  export interface TalismanTranslation {
27538
27521
  /**
27539
27522
  * The talisman’s name.
@@ -27569,7 +27552,7 @@ export interface TalismanActivation {
27569
27552
  /**
27570
27553
  * The cost to activate the talisman.
27571
27554
  */
27572
- cost: TalismanActivationCost
27555
+ cost: TalismanActivationCost[]
27573
27556
 
27574
27557
  /**
27575
27558
  * The duration of how long the talisman will be active.
@@ -27612,6 +27595,60 @@ export type TalismanActivationDurationExpressionValue =
27612
27595
  kind: "QualityLevels"
27613
27596
  }
27614
27597
 
27598
+ export interface TalismanCombatUse {
27599
+ /**
27600
+ * The weight in kg.
27601
+ */
27602
+ weight: Weight
27603
+
27604
+ /**
27605
+ * A list of stat blocks for each close combat technique this talisman can be used with.
27606
+ */
27607
+ meleeUses?: {
27608
+ [closeCombatTechniqueId: string]: MeleeTalismanUse
27609
+ }
27610
+
27611
+ /**
27612
+ * A list of stat blocks for each ranged combat technique this talisman can be used with.
27613
+ */
27614
+ rangedUses?: {
27615
+ [rangedCombatTechniqueId: string]: RangedTalismanUse
27616
+ }
27617
+
27618
+ /**
27619
+ * All translations for the entry, identified by IETF language tag (BCP47).
27620
+ */
27621
+ translations?: {
27622
+ [localeId: string]: TalismanCombatUseTranslation
27623
+ }
27624
+ }
27625
+
27626
+ export type MeleeTalismanUse = TalismanMeleeWeapon
27627
+
27628
+ export type RangedTalismanUse = TalismanRangedWeapon
27629
+
27630
+ export interface TalismanCombatUseTranslation {
27631
+ /**
27632
+ * Note text.
27633
+ */
27634
+ note?: string
27635
+
27636
+ /**
27637
+ * Special rules text.
27638
+ */
27639
+ rules?: string
27640
+
27641
+ /**
27642
+ * The weapon advantage text.
27643
+ */
27644
+ advantage?: string
27645
+
27646
+ /**
27647
+ * The weapon disadvantage text.
27648
+ */
27649
+ disadvantage?: string
27650
+ }
27651
+
27615
27652
  export type TalismanMeleeWeapon = GenMeleeWeapon<TalismanDamage>
27616
27653
 
27617
27654
  export type TalismanDamage = MathOperation<TalismanDamageOption>
@@ -10,10 +10,10 @@ export declare const Talisman: DB.Entity<"Talisman", {
10
10
  PowerfulTalisman: DB.EnumCase<null>;
11
11
  }, []>>, false>;
12
12
  activation: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"TalismanActivation", DB.Object<{
13
- cost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"TalismanActivationCost", DB.Object<{
13
+ cost: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"TalismanActivationCost", DB.Object<{
14
14
  value: DB.MemberDecl<DB.Integer, true>;
15
15
  unit: DB.MemberDecl<DB.ReferenceIdentifier, true>;
16
- }>, []>>, true>;
16
+ }>, []>>>, true>;
17
17
  duration: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"TalismanActivationDuration", DB.Object<{
18
18
  value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"TalismanActivationDurationExpression", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], MathOperation>, []>>, true>;
19
19
  unit: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DurationUnit", {
@@ -42,8 +42,9 @@ export declare const Talisman: DB.Entity<"Talisman", {
42
42
  }>, []>>, true>;
43
43
  }>, []>>, false>;
44
44
  ap_value: DB.MemberDecl<DB.Integer, false>;
45
- combatUse: DB.MemberDecl<DB.Object<{
46
- melee_uses: DB.MemberDecl<DB.NestedEntityMap<string, {
45
+ combatUse: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"TalismanCombatUse", DB.Object<{
46
+ weight: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Weight", DB.Float, []>>, true>;
47
+ meleeUses: DB.MemberDecl<DB.NestedEntityMap<string, {
47
48
  damage: DB.MemberDecl<DB.TypeArgument<DB.Param<"Damage", DB.Type>>, true>;
48
49
  damage_threshold: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"PrimaryAttributeDamageThreshold", {
49
50
  Default: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"DefaultPrimaryAttributeDamageThreshold", DB.Object<{
@@ -71,7 +72,7 @@ export declare const Talisman: DB.Entity<"Talisman", {
71
72
  is_two_handed_weapon: DB.MemberDecl<DB.Boolean, true>;
72
73
  is_improvised_weapon: DB.MemberDecl<DB.Boolean, true>;
73
74
  }>, false>;
74
- ranged_uses: DB.MemberDecl<DB.NestedEntityMap<string, {
75
+ rangedUses: DB.MemberDecl<DB.NestedEntityMap<string, {
75
76
  damage: DB.MemberDecl<DB.TypeArgument<DB.Param<"Damage", DB.Type>>, true>;
76
77
  reload_time: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ReloadTime", DB.Object<{
77
78
  value: DB.MemberDecl<DB.Integer, true>;
@@ -88,7 +89,13 @@ export declare const Talisman: DB.Entity<"Talisman", {
88
89
  length: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Length", DB.Integer, []>>, false>;
89
90
  is_improvised_weapon: DB.MemberDecl<DB.Boolean, true>;
90
91
  }>, false>;
91
- }>, false>;
92
+ translations: DB.MemberDecl<DB.NestedEntityMap<"TalismanCombatUseTranslation", {
93
+ note: DB.MemberDecl<DB.String, false>;
94
+ rules: DB.MemberDecl<DB.String, false>;
95
+ advantage: DB.MemberDecl<DB.String, false>;
96
+ disadvantage: DB.MemberDecl<DB.String, false>;
97
+ }>, false>;
98
+ }>, []>>, false>;
92
99
  src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
93
100
  id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
94
101
  occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
@@ -4,6 +4,7 @@ import { Dice } from "./_Dice.js";
4
4
  import { BlessedTraditionIdentifier, DerivedCharacteristicIdentifier } from "./_Identifier.js";
5
5
  import { MathOperation } from "./_MathExpression.js";
6
6
  import { CloseCombatTechnique, RangedCombatTechnique } from "./CombatTechnique.js";
7
+ import { Weight } from "./equipment/item/_Item.js";
7
8
  import { GenMeleeWeapon } from "./equipment/item/_MeleeWeapon.js";
8
9
  import { GenRangedWeapon } from "./equipment/item/_RangedWeapon.js";
9
10
  import { checkWeaponCombatTechniqueIntegrity } from "./equipment/item/_Weapon.js";
@@ -31,28 +32,7 @@ export const Talisman = DB.Entity(import.meta.url, {
31
32
  type: DB.Integer({ minimum: 5, multipleOf: 5 }),
32
33
  }),
33
34
  combatUse: DB.Optional({
34
- type: DB.Object({
35
- melee_uses: DB.Optional({
36
- comment: "A list of stat blocks for each close combat technique this talisman can be used with.",
37
- type: DB.NestedEntityMap({
38
- name: "MeleeTalismanUse",
39
- namePlural: "MeleeTalismanUses",
40
- secondaryEntity: CloseCombatTechnique,
41
- type: DB.IncludeIdentifier(TalismanMeleeWeapon),
42
- minProperties: 1,
43
- }),
44
- }),
45
- ranged_uses: DB.Optional({
46
- comment: "A list of stat blocks for each ranged combat technique this talisman can be used with.",
47
- type: DB.NestedEntityMap({
48
- name: "RangedTalismanUse",
49
- namePlural: "RangedTalismanUses",
50
- secondaryEntity: RangedCombatTechnique,
51
- type: DB.IncludeIdentifier(TalismanRangedWeapon),
52
- minProperties: 1,
53
- }),
54
- }),
55
- }, { minProperties: 1 }),
35
+ type: DB.IncludeIdentifier(TalismanCombatUse),
56
36
  }),
57
37
  src,
58
38
  translations: NestedTranslationMap(DB.Required, "Talisman", DB.Object({
@@ -84,6 +64,53 @@ export const Talisman = DB.Entity(import.meta.url, {
84
64
  })
85
65
  : [],
86
66
  });
67
+ const TalismanCombatUse = DB.TypeAlias(import.meta.url, {
68
+ name: "TalismanCombatUse",
69
+ type: () => DB.Object({
70
+ weight: DB.Required({
71
+ comment: "The weight in kg.",
72
+ type: DB.IncludeIdentifier(Weight),
73
+ }),
74
+ meleeUses: DB.Optional({
75
+ comment: "A list of stat blocks for each close combat technique this talisman can be used with.",
76
+ type: DB.NestedEntityMap({
77
+ name: "MeleeTalismanUse",
78
+ namePlural: "MeleeTalismanUses",
79
+ secondaryEntity: CloseCombatTechnique,
80
+ type: DB.IncludeIdentifier(TalismanMeleeWeapon),
81
+ minProperties: 1,
82
+ }),
83
+ }),
84
+ rangedUses: DB.Optional({
85
+ comment: "A list of stat blocks for each ranged combat technique this talisman can be used with.",
86
+ type: DB.NestedEntityMap({
87
+ name: "RangedTalismanUse",
88
+ namePlural: "RangedTalismanUses",
89
+ secondaryEntity: RangedCombatTechnique,
90
+ type: DB.IncludeIdentifier(TalismanRangedWeapon),
91
+ minProperties: 1,
92
+ }),
93
+ }),
94
+ translations: NestedTranslationMap(DB.Optional, "TalismanCombatUse", DB.Object({
95
+ note: DB.Optional({
96
+ comment: "Note text.",
97
+ type: DB.String({ minLength: 1, markdown: "block" }),
98
+ }),
99
+ rules: DB.Optional({
100
+ comment: "Special rules text.",
101
+ type: DB.String({ minLength: 1, markdown: "block" }),
102
+ }),
103
+ advantage: DB.Optional({
104
+ comment: "The weapon advantage text.",
105
+ type: DB.String({ minLength: 1, markdown: "block" }),
106
+ }),
107
+ disadvantage: DB.Optional({
108
+ comment: "The weapon disadvantage text.",
109
+ type: DB.String({ minLength: 1, markdown: "block" }),
110
+ }),
111
+ }, { minProperties: 1 })),
112
+ }),
113
+ });
87
114
  const TalismanMeleeWeapon = DB.TypeAlias(import.meta.url, {
88
115
  name: "TalismanMeleeWeapon",
89
116
  type: () => DB.GenIncludeIdentifier(GenMeleeWeapon, [DB.IncludeIdentifier(TalismanDamage)]),
@@ -119,7 +146,7 @@ const TalismanActivation = DB.TypeAlias(import.meta.url, {
119
146
  type: () => DB.Object({
120
147
  cost: DB.Required({
121
148
  comment: "The cost to activate the talisman.",
122
- type: DB.IncludeIdentifier(TalismanActivationCost),
149
+ type: DB.Array(DB.IncludeIdentifier(TalismanActivationCost), { minItems: 1 }),
123
150
  }),
124
151
  duration: DB.Required({
125
152
  comment: "The duration of how long the talisman will be active.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optolith/database-schema",
3
- "version": "0.81.0",
3
+ "version": "0.82.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",