optolith-database-schema 0.42.0 → 0.42.1

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.
@@ -0,0 +1,196 @@
1
+ import * as DB from "tsondb/schema/dsl";
2
+ import { OldParameter } from "../_ActivatableSkill.js";
3
+ import { CheckResultBasedDuration, DurationUnitValue } from "../_ActivatableSkillDuration.js";
4
+ import { ActivatableSkillEffect } from "../_ActivatableSkillEffect.js";
5
+ import { NonModifiableOneTimeCost, NonModifiableSustainedCost } from "../_ActivatableSkillCost.js";
6
+ import { ResponsiveTextOptional, ResponsiveTextReplace } from "../_ResponsiveText.js";
7
+ import { FixedRange } from "../_ActivatableSkillRange.js";
8
+ import { AffectedTargetCategories } from "../_ActivatableSkillTargetCategory.js";
9
+ import { PropertyIdentifier } from "../_Identifier.js";
10
+ import { SkillCheck, SkillCheckPenalty } from "../_SkillCheck.js";
11
+ import { NestedTranslationMap } from "../Locale.js";
12
+ import { Errata } from "../source/_Erratum.js";
13
+ import { src } from "../source/_PublicationRef.js";
14
+ import { ImprovementCost } from "../_ImprovementCost.js";
15
+ export const GoblinRitual = DB.Entity(import.meta.url, {
16
+ name: "GoblinRitual",
17
+ namePlural: "GoblinRituals",
18
+ type: () => DB.Object({
19
+ check: DB.Required({
20
+ comment: "Lists the linked three attributes used to make a skill check.",
21
+ type: DB.IncludeIdentifier(SkillCheck),
22
+ }),
23
+ check_penalty: DB.Optional({
24
+ comment: "In some cases, the target's Spirit or Toughness is applied as a penalty.",
25
+ type: DB.IncludeIdentifier(SkillCheckPenalty),
26
+ }),
27
+ parameters: DB.Required({
28
+ comment: "Measurable parameters of a goblin ritual.",
29
+ type: DB.IncludeIdentifier(GoblinRitualPerformanceParameters),
30
+ }),
31
+ target: DB.Required({
32
+ comment: "The target category – the kind of creature or object – the skill affects.",
33
+ type: DB.IncludeIdentifier(AffectedTargetCategories),
34
+ }),
35
+ property: DB.Required({
36
+ comment: "The associated property.",
37
+ type: PropertyIdentifier(),
38
+ }),
39
+ improvement_cost: DB.Required({
40
+ comment: "States which column is used to improve the skill.",
41
+ type: DB.IncludeIdentifier(ImprovementCost),
42
+ }),
43
+ src,
44
+ translations: NestedTranslationMap(DB.Required, "GoblinRitual", DB.Object({
45
+ name: DB.Required({
46
+ comment: "The goblin ritual’s name.",
47
+ type: DB.String({ minLength: 1 }),
48
+ }),
49
+ effect: DB.Required({
50
+ comment: "The effect description may be either a plain text or a text that is divided by a list of effects for each quality level. It may also be a list for each two quality levels.",
51
+ type: DB.IncludeIdentifier(ActivatableSkillEffect),
52
+ }),
53
+ casting_time: DB.Optional({
54
+ isDeprecated: true,
55
+ type: DB.IncludeIdentifier(OldParameter),
56
+ }),
57
+ cost: DB.Optional({
58
+ isDeprecated: true,
59
+ type: DB.IncludeIdentifier(OldParameter),
60
+ }),
61
+ range: DB.Optional({
62
+ isDeprecated: true,
63
+ type: DB.IncludeIdentifier(OldParameter),
64
+ }),
65
+ duration: DB.Optional({
66
+ isDeprecated: true,
67
+ type: DB.IncludeIdentifier(OldParameter),
68
+ }),
69
+ target: DB.Optional({
70
+ isDeprecated: true,
71
+ type: DB.String({ minLength: 1 }),
72
+ }),
73
+ errata: DB.Optional({
74
+ type: DB.IncludeIdentifier(Errata),
75
+ }),
76
+ })),
77
+ }),
78
+ instanceDisplayName: {},
79
+ uniqueConstraints: [
80
+ {
81
+ entityMapKeyPath: "translations",
82
+ keyPathInEntityMap: "name",
83
+ },
84
+ ],
85
+ });
86
+ const GoblinRitualPerformanceParameters = DB.Enum(import.meta.url, {
87
+ name: "GoblinRitualPerformanceParameters",
88
+ comment: "Measurable parameters of a goblin ritual.",
89
+ values: () => ({
90
+ OneTime: DB.EnumCase({ type: DB.IncludeIdentifier(GoblinRitualOneTimePerformanceParameters) }),
91
+ Sustained: DB.EnumCase({
92
+ type: DB.IncludeIdentifier(GoblinRitualSustainedPerformanceParameters),
93
+ }),
94
+ }),
95
+ });
96
+ const GoblinRitualSustainedPerformanceParameters = DB.TypeAlias(import.meta.url, {
97
+ name: "GoblinRitualSustainedPerformanceParameters",
98
+ type: () => DB.Object({
99
+ casting_time: DB.Required({
100
+ comment: "The casting time.",
101
+ type: DB.IncludeIdentifier(GoblinRitualCastingTime),
102
+ }),
103
+ cost: DB.Required({
104
+ comment: "The AE cost.",
105
+ type: DB.IncludeIdentifier(GoblinRitualSustainedCost),
106
+ }),
107
+ range: DB.Required({
108
+ comment: "The range.",
109
+ type: DB.IncludeIdentifier(GoblinRitualRange),
110
+ }),
111
+ }),
112
+ });
113
+ const GoblinRitualOneTimePerformanceParameters = DB.TypeAlias(import.meta.url, {
114
+ name: "GoblinRitualOneTimePerformanceParameters",
115
+ type: () => DB.Object({
116
+ casting_time: DB.Required({
117
+ comment: "The casting time.",
118
+ type: DB.IncludeIdentifier(GoblinRitualCastingTime),
119
+ }),
120
+ cost: DB.Required({
121
+ comment: "The AE cost.",
122
+ type: DB.IncludeIdentifier(GoblinRitualOneTimeCost),
123
+ }),
124
+ range: DB.Required({
125
+ comment: "The range.",
126
+ type: DB.IncludeIdentifier(GoblinRitualRange),
127
+ }),
128
+ duration: DB.Required({
129
+ comment: "The duration.",
130
+ type: DB.IncludeIdentifier(GoblinRitualDuration),
131
+ }),
132
+ }),
133
+ });
134
+ const GoblinRitualCastingTime = DB.TypeAlias(import.meta.url, {
135
+ name: "GoblinRitualCastingTime",
136
+ type: () => DB.Object({
137
+ value: DB.Required({
138
+ type: DB.Integer({ minimum: 1 }),
139
+ }),
140
+ unit: DB.Required({
141
+ type: DB.IncludeIdentifier(GoblinRitualCastingTimeUnit),
142
+ }),
143
+ }),
144
+ });
145
+ const GoblinRitualCastingTimeUnit = DB.Enum(import.meta.url, {
146
+ name: "GoblinRitualCastingTimeUnit",
147
+ values: () => ({
148
+ Actions: DB.EnumCase({ type: null }),
149
+ Minutes: DB.EnumCase({ type: null }),
150
+ Hours: DB.EnumCase({ type: null }),
151
+ }),
152
+ });
153
+ const GoblinRitualOneTimeCost = DB.TypeAlias(import.meta.url, {
154
+ name: "GoblinRitualOneTimeCost",
155
+ type: () => DB.IncludeIdentifier(NonModifiableOneTimeCost),
156
+ });
157
+ const GoblinRitualSustainedCost = DB.TypeAlias(import.meta.url, {
158
+ name: "GoblinRitualSustainedCost",
159
+ type: () => DB.IncludeIdentifier(NonModifiableSustainedCost),
160
+ });
161
+ const GoblinRitualRange = DB.TypeAlias(import.meta.url, {
162
+ name: "GoblinRitualRange",
163
+ type: () => DB.Object({
164
+ value: DB.Required({
165
+ comment: "The range value.",
166
+ type: DB.IncludeIdentifier(GoblinRitualRangeValue),
167
+ }),
168
+ translations: NestedTranslationMap(DB.Optional, "GoblinRitualRange", DB.Object({
169
+ note: DB.Optional({
170
+ comment: "A note, appended to the generated string in parenthesis. If the generated is modified using `replacement`, the note is appended to the modifier string.",
171
+ type: DB.IncludeIdentifier(ResponsiveTextOptional),
172
+ }),
173
+ replacement: DB.Optional({
174
+ comment: "A replacement string. If `note` is provided, it is appended to the replaced string.",
175
+ type: DB.IncludeIdentifier(ResponsiveTextReplace),
176
+ }),
177
+ }, { minProperties: 1 })),
178
+ }),
179
+ });
180
+ const GoblinRitualRangeValue = DB.Enum(import.meta.url, {
181
+ name: "GoblinRitualRangeValue",
182
+ values: () => ({
183
+ Sight: DB.EnumCase({ type: null }),
184
+ Self: DB.EnumCase({ type: null }),
185
+ Touch: DB.EnumCase({ type: null }),
186
+ Fixed: DB.EnumCase({ type: DB.IncludeIdentifier(FixedRange) }),
187
+ }),
188
+ });
189
+ const GoblinRitualDuration = DB.Enum(import.meta.url, {
190
+ name: "GoblinRitualDuration",
191
+ values: () => ({
192
+ Immediate: DB.EnumCase({ type: null }),
193
+ Fixed: DB.EnumCase({ type: DB.IncludeIdentifier(DurationUnitValue) }),
194
+ CheckResultBased: DB.EnumCase({ type: DB.IncludeIdentifier(CheckResultBasedDuration) }),
195
+ }),
196
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.42.0",
3
+ "version": "0.42.1",
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",