optolith-database-schema 0.31.3 → 0.32.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.
@@ -1,10 +1,11 @@
1
1
  import * as DB from "tsondb/schema/dsl";
2
2
  import { OldParameter } from "../_ActivatableSkill.js";
3
3
  import { CheckResultBasedModifier } from "../_ActivatableSkillCheckResultBased.js";
4
+ import { NonModifiableOneTimeCostPerCountable } from "../_ActivatableSkillCost.js";
4
5
  import { ActivatableSkillEffect } from "../_ActivatableSkillEffect.js";
5
6
  import { ArcaneDancerTraditionIdentifier, PropertyIdentifier } from "../_Identifier.js";
6
7
  import { ImprovementCost } from "../_ImprovementCost.js";
7
- import { ResponsiveText, ResponsiveTextOptional } from "../_ResponsiveText.js";
8
+ import { ResponsiveText } from "../_ResponsiveText.js";
8
9
  import { SkillCheck } from "../_SkillCheck.js";
9
10
  import { NestedTranslationMap } from "../Locale.js";
10
11
  import { Errata } from "../source/_Erratum.js";
@@ -95,18 +96,16 @@ const FixedMagicalDanceCost = DB.TypeAlias(import.meta.url, {
95
96
  comment: "The (temporary) AE cost value.",
96
97
  type: DB.Integer({ minimum: 1 }),
97
98
  }),
98
- translations: NestedTranslationMap(DB.Optional, "FixedMagicalDanceCost", DB.Object({
99
- per: DB.Optional({
100
- comment: "The cost have to be per a specific countable entity, e.g. `8 KP per person`.",
101
- type: DB.IncludeIdentifier(ResponsiveTextOptional),
102
- }),
103
- }, { minProperties: 1 })),
99
+ per: DB.Optional({
100
+ comment: "The cost have to be per a specific countable entity, e.g. `8 KP per person`.",
101
+ type: DB.IncludeIdentifier(NonModifiableOneTimeCostPerCountable),
102
+ }),
104
103
  }),
105
104
  });
106
105
  const IndefiniteMagicalDanceCost = DB.TypeAlias(import.meta.url, {
107
106
  name: "IndefiniteMagicalDanceCost",
108
107
  type: () => DB.Object({
109
- maximum: DB.Optional({
108
+ modifier: DB.Optional({
110
109
  comment: "Specified if the indefinite description's result value is to be modified by a certain number.",
111
110
  type: DB.IncludeIdentifier(CheckResultBasedModifier),
112
111
  }),
@@ -2,28 +2,15 @@ import * as DB from "tsondb/schema/dsl";
2
2
  export declare const MagicalRune: DB.Entity<"MagicalRune", {
3
3
  options: DB.MemberDecl<DB.ChildEntities<DB.Entity<"MagicalRuneOption", {
4
4
  parent: DB.MemberDecl<DB.ReferenceIdentifier, true>;
5
- cost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"MagicalRuneOptionCost", {
6
- Single: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"SingleMagicalRuneCost", DB.Object<{
7
- value: DB.MemberDecl<DB.Integer, true>;
8
- translations: DB.MemberDecl<DB.NestedEntityMap<"SingleMagicalRuneCostTranslation", {
9
- note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
10
- full: DB.MemberDecl<DB.String, true>;
11
- compressed: DB.MemberDecl<DB.String, false>;
12
- }>, []>>, true>;
13
- }>, false>;
14
- }>, []>>>;
15
- Disjunction: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"MagicalRuneCostDisjunction", DB.Object<{
16
- list: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"SingleMagicalRuneCost", DB.Object<{
17
- value: DB.MemberDecl<DB.Integer, true>;
18
- translations: DB.MemberDecl<DB.NestedEntityMap<"SingleMagicalRuneCostTranslation", {
19
- note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
20
- full: DB.MemberDecl<DB.String, true>;
21
- compressed: DB.MemberDecl<DB.String, false>;
22
- }>, []>>, true>;
23
- }>, false>;
24
- }>, []>>>, true>;
25
- }>, []>>>;
26
- }, []>>, false>;
5
+ cost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"SingleMagicalRuneCost", DB.Object<{
6
+ value: DB.MemberDecl<DB.Integer, true>;
7
+ translations: DB.MemberDecl<DB.NestedEntityMap<"SingleMagicalRuneCostTranslation", {
8
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
9
+ full: DB.MemberDecl<DB.String, true>;
10
+ compressed: DB.MemberDecl<DB.String, false>;
11
+ }>, []>>, true>;
12
+ }>, false>;
13
+ }>, []>>, false>;
27
14
  improvement_cost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ImprovementCost", {
28
15
  A: DB.EnumCase<null>;
29
16
  B: DB.EnumCase<null>;
@@ -83,12 +70,14 @@ export declare const MagicalRune: DB.Entity<"MagicalRune", {
83
70
  }, []>>, true>;
84
71
  crafting_time: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"MagicalRuneCraftingTime", DB.Object<{
85
72
  value: DB.MemberDecl<DB.Integer, true>;
86
- translations: DB.MemberDecl<DB.NestedEntityMap<"MagicalRuneCraftingTimeTranslation", {
87
- per: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveText", DB.Object<{
88
- full: DB.MemberDecl<DB.String, true>;
89
- compressed: DB.MemberDecl<DB.String, true>;
90
- }>, []>>, true>;
91
- }>, false>;
73
+ per: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"MagicalRuneCraftingTimePerCountable", DB.Object<{
74
+ translations: DB.MemberDecl<DB.NestedEntityMap<"MagicalRuneCraftingTimePerCountableTranslation", {
75
+ countable: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveText", DB.Object<{
76
+ full: DB.MemberDecl<DB.String, true>;
77
+ compressed: DB.MemberDecl<DB.String, true>;
78
+ }>, []>>, true>;
79
+ }>, true>;
80
+ }>, []>>, false>;
92
81
  }>, []>>, true>;
93
82
  duration: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"MagicalRuneDuration", DB.Object<{
94
83
  slow: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"CheckResultBasedDuration", DB.Object<{
@@ -259,28 +248,15 @@ export declare const MagicalRune: DB.Entity<"MagicalRune", {
259
248
  }, undefined>;
260
249
  export declare const MagicalRuneOption: DB.Entity<"MagicalRuneOption", {
261
250
  parent: DB.MemberDecl<DB.ReferenceIdentifier, true>;
262
- cost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"MagicalRuneOptionCost", {
263
- Single: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"SingleMagicalRuneCost", DB.Object<{
264
- value: DB.MemberDecl<DB.Integer, true>;
265
- translations: DB.MemberDecl<DB.NestedEntityMap<"SingleMagicalRuneCostTranslation", {
266
- note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
267
- full: DB.MemberDecl<DB.String, true>;
268
- compressed: DB.MemberDecl<DB.String, false>;
269
- }>, []>>, true>;
270
- }>, false>;
271
- }>, []>>>;
272
- Disjunction: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"MagicalRuneCostDisjunction", DB.Object<{
273
- list: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"SingleMagicalRuneCost", DB.Object<{
274
- value: DB.MemberDecl<DB.Integer, true>;
275
- translations: DB.MemberDecl<DB.NestedEntityMap<"SingleMagicalRuneCostTranslation", {
276
- note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
277
- full: DB.MemberDecl<DB.String, true>;
278
- compressed: DB.MemberDecl<DB.String, false>;
279
- }>, []>>, true>;
280
- }>, false>;
281
- }>, []>>>, true>;
282
- }>, []>>>;
283
- }, []>>, false>;
251
+ cost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"SingleMagicalRuneCost", DB.Object<{
252
+ value: DB.MemberDecl<DB.Integer, true>;
253
+ translations: DB.MemberDecl<DB.NestedEntityMap<"SingleMagicalRuneCostTranslation", {
254
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
255
+ full: DB.MemberDecl<DB.String, true>;
256
+ compressed: DB.MemberDecl<DB.String, false>;
257
+ }>, []>>, true>;
258
+ }>, false>;
259
+ }>, []>>, false>;
284
260
  improvement_cost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ImprovementCost", {
285
261
  A: DB.EnumCase<null>;
286
262
  B: DB.EnumCase<null>;
@@ -164,13 +164,6 @@ const MagicalRuneCost = DB.Enum(import.meta.url, {
164
164
  DerivedFromOption: DB.EnumCase({ type: null }),
165
165
  }),
166
166
  });
167
- const MagicalRuneOptionCost = DB.Enum(import.meta.url, {
168
- name: "MagicalRuneOptionCost",
169
- values: () => ({
170
- Single: DB.EnumCase({ type: DB.IncludeIdentifier(SingleMagicalRuneCost) }),
171
- Disjunction: DB.EnumCase({ type: DB.IncludeIdentifier(MagicalRuneCostDisjunction) }),
172
- }),
173
- });
174
167
  const SingleMagicalRuneCost = DB.TypeAlias(import.meta.url, {
175
168
  name: "SingleMagicalRuneCost",
176
169
  type: () => DB.Object({
@@ -198,6 +191,17 @@ const MagicalRuneCostDisjunction = DB.TypeAlias(import.meta.url, {
198
191
  }),
199
192
  }),
200
193
  });
194
+ const MagicalRuneCraftingTimePerCountable = DB.TypeAlias(import.meta.url, {
195
+ name: "MagicalRuneCraftingTimePerCountable",
196
+ type: () => DB.Object({
197
+ translations: NestedTranslationMap(DB.Required, "MagicalRuneCraftingTimePerCountable", DB.Object({
198
+ countable: DB.Required({
199
+ comment: "The countable entity name.",
200
+ type: DB.IncludeIdentifier(ResponsiveText),
201
+ }),
202
+ })),
203
+ }),
204
+ });
201
205
  const MagicalRuneCraftingTime = DB.TypeAlias(import.meta.url, {
202
206
  name: "MagicalRuneCraftingTime",
203
207
  type: () => DB.Object({
@@ -205,12 +209,10 @@ const MagicalRuneCraftingTime = DB.TypeAlias(import.meta.url, {
205
209
  comment: "The crafting time in actions.",
206
210
  type: DB.Integer({ minimum: 1 }),
207
211
  }),
208
- translations: NestedTranslationMap(DB.Optional, "MagicalRuneCraftingTime", DB.Object({
209
- per: DB.Required({
210
- comment: "The crafting time has to be per a specific countable entity, e.g. `8 actions per person`.",
211
- type: DB.IncludeIdentifier(ResponsiveText),
212
- }),
213
- })),
212
+ per: DB.Optional({
213
+ comment: "The crafting time has to be per a specific countable entity, e.g. `8 Actions per person`.",
214
+ type: DB.IncludeIdentifier(MagicalRuneCraftingTimePerCountable),
215
+ }),
214
216
  }),
215
217
  });
216
218
  const MagicalRuneDuration = DB.TypeAlias(import.meta.url, {
@@ -243,7 +245,7 @@ export const MagicalRuneOption = DB.Entity(import.meta.url, {
243
245
  }),
244
246
  cost: DB.Optional({
245
247
  comment: "The option-specific AE cost.",
246
- type: DB.IncludeIdentifier(MagicalRuneOptionCost),
248
+ type: DB.IncludeIdentifier(SingleMagicalRuneCost),
247
249
  }),
248
250
  improvement_cost: DB.Optional({
249
251
  comment: "The option-specific improvement cost.",
@@ -35,7 +35,7 @@ export declare const ZibiljaRitual: DB.Entity<"ZibiljaRitual", {
35
35
  full: DB.MemberDecl<DB.String, true>;
36
36
  compressed: DB.MemberDecl<DB.String, true>;
37
37
  }>, []>>, true>;
38
- }>, false>;
38
+ }>, true>;
39
39
  }>, []>>, false>;
40
40
  translations: DB.MemberDecl<DB.NestedEntityMap<"NonModifiableOneTimeCostTranslation", {
41
41
  note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
@@ -75,7 +75,7 @@ export declare const ZibiljaRitual: DB.Entity<"ZibiljaRitual", {
75
75
  full: DB.MemberDecl<DB.String, true>;
76
76
  compressed: DB.MemberDecl<DB.String, true>;
77
77
  }>, []>>, true>;
78
- }>, false>;
78
+ }>, true>;
79
79
  }>, []>>, false>;
80
80
  translations: DB.MemberDecl<DB.NestedEntityMap<"NonModifiableOneTimeCostTranslation", {
81
81
  note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
@@ -115,7 +115,7 @@ export declare const ZibiljaRitual: DB.Entity<"ZibiljaRitual", {
115
115
  full: DB.MemberDecl<DB.String, true>;
116
116
  compressed: DB.MemberDecl<DB.String, true>;
117
117
  }>, []>>, true>;
118
- }>, false>;
118
+ }>, true>;
119
119
  }>, []>>, false>;
120
120
  translations: DB.MemberDecl<DB.NestedEntityMap<"NonModifiableOneTimeCostTranslation", {
121
121
  note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
@@ -800,7 +800,6 @@ export declare const ProfessionPrerequisiteGroup: DB.Enum<"ProfessionPrerequisit
800
800
  }>, []>>>;
801
801
  }, []>;
802
802
  export declare const AdvantageDisadvantagePrerequisiteGroup: DB.Enum<"AdvantageDisadvantagePrerequisiteGroup", {
803
- CommonSuggestedByRCP: DB.EnumCase<null>;
804
803
  Sex: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"SexPrerequisite", DB.Object<{
805
804
  id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"BinarySex", {
806
805
  Male: DB.EnumCase<null>;
@@ -1176,13 +1175,14 @@ export declare const AdvantageDisadvantagePrerequisiteGroup: DB.Enum<"AdvantageD
1176
1175
  text: DB.MemberDecl<DB.String, true>;
1177
1176
  }>, true>;
1178
1177
  }>, []>>>;
1179
- NoOtherAncestorBloodAdvantage: DB.EnumCase<null>;
1180
1178
  SexualCharacteristic: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"SexualCharacteristicPrerequisite", DB.Object<{
1181
1179
  id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SexualCharacteristic", {
1182
1180
  Penis: DB.EnumCase<null>;
1183
1181
  Vagina: DB.EnumCase<null>;
1184
1182
  }, []>>, true>;
1185
1183
  }>, []>>>;
1184
+ CommonSuggestedByRCP: DB.EnumCase<null>;
1185
+ NoOtherAncestorBloodAdvantage: DB.EnumCase<null>;
1186
1186
  }, []>;
1187
1187
  export declare const ArcaneTraditionPrerequisiteGroup: DB.Enum<"ArcaneTraditionPrerequisiteGroup", {
1188
1188
  Sex: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"SexPrerequisite", DB.Object<{
@@ -86,30 +86,10 @@ export const AdvantageDisadvantagePrerequisiteGroup = DB.Enum(import.meta.url, {
86
86
  values: () => {
87
87
  return {
88
88
  CommonSuggestedByRCP: DB.EnumCase({ type: null }),
89
- Sex: DB.EnumCase({ type: DB.IncludeIdentifier(SexPrerequisite) }),
90
- Race: DB.EnumCase({ type: DB.IncludeIdentifier(RacePrerequisite) }),
91
- Culture: DB.EnumCase({ type: DB.IncludeIdentifier(CulturePrerequisite) }),
92
- Pact: DB.EnumCase({ type: DB.IncludeIdentifier(PactPrerequisite) }),
93
- SocialStatus: DB.EnumCase({ type: DB.IncludeIdentifier(SocialStatusPrerequisite) }),
94
- State: DB.EnumCase({ type: DB.IncludeIdentifier(StatePrerequisite) }),
95
- Rule: DB.EnumCase({ type: DB.IncludeIdentifier(RulePrerequisite) }),
96
- PrimaryAttribute: DB.EnumCase({ type: DB.IncludeIdentifier(PrimaryAttributePrerequisite) }),
97
- Activatable: DB.EnumCase({ type: DB.IncludeIdentifier(ActivatablePrerequisite) }),
98
- BlessedTradition: DB.EnumCase({ type: DB.IncludeIdentifier(BlessedTraditionPrerequisite) }),
99
- MagicalTradition: DB.EnumCase({ type: DB.IncludeIdentifier(MagicalTraditionPrerequisite) }),
100
- Rated: DB.EnumCase({ type: DB.IncludeIdentifier(RatedPrerequisite) }),
101
- RatedMinimumNumber: DB.EnumCase({
102
- type: DB.IncludeIdentifier(RatedMinimumNumberPrerequisite),
103
- }),
104
- RatedSum: DB.EnumCase({ type: DB.IncludeIdentifier(RatedSumPrerequisite) }),
105
- Enhancement: DB.EnumCase({ type: DB.IncludeIdentifier(EnhancementPrerequisite) }),
106
- Text: DB.EnumCase({ type: DB.IncludeIdentifier(TextPrerequisite) }),
107
89
  NoOtherAncestorBloodAdvantage: DB.EnumCase({
108
90
  type: AncestorBloodPrerequisite,
109
91
  }),
110
- SexualCharacteristic: DB.EnumCase({
111
- type: DB.IncludeIdentifier(SexualCharacteristicPrerequisite),
112
- }),
92
+ ...GeneralPrerequisiteGroup.type.value.values,
113
93
  };
114
94
  },
115
95
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.31.3",
3
+ "version": "0.32.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",
@@ -38,20 +38,20 @@
38
38
  "author": "Lukas Obermann",
39
39
  "license": "MPL-2.0",
40
40
  "dependencies": {
41
- "@elyukai/utils": "^0.2.2",
41
+ "@elyukai/utils": "^0.2.4",
42
42
  "tsondb": "^0.19.9",
43
43
  "yaml": "^2.8.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@eslint/js": "^9.39.2",
47
- "@types/node": "^25.2.1",
46
+ "@eslint/js": "^10.0.1",
47
+ "@types/node": "^25.3.0",
48
48
  "commit-and-tag-version": "^12.6.1",
49
- "eslint": "^9.39.2",
49
+ "eslint": "^10.0.1",
50
50
  "globals": "^17.3.0",
51
- "nodemon": "^3.1.11",
51
+ "nodemon": "^3.1.14",
52
52
  "prettier": "^3.8.1",
53
53
  "typescript": "^5.9.3",
54
- "typescript-eslint": "^8.54.0"
54
+ "typescript-eslint": "^8.56.0"
55
55
  },
56
56
  "repository": "github:elyukai/optolith-database-schema",
57
57
  "bugs": {