@optolith/database-schema 0.52.2 → 0.54.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 +39 -0
- package/gen/types.d.ts +265 -203
- package/lib/cache/activatableSelectOptions.js +28 -12
- package/lib/types/Advantage.d.ts +253 -253
- package/lib/types/Blessing.d.ts +10 -0
- package/lib/types/Cantrip.d.ts +10 -0
- package/lib/types/Ceremony.d.ts +294 -125
- package/lib/types/DerivedCharacteristic.d.ts +23 -23
- package/lib/types/Disadvantage.d.ts +230 -230
- package/lib/types/FamiliarsTrick.d.ts +40 -0
- package/lib/types/LiturgicalChant.d.ts +294 -125
- package/lib/types/Locale.d.ts +1 -0
- package/lib/types/Locale.js +1 -0
- package/lib/types/Profession.d.ts +330 -330
- package/lib/types/Ritual.d.ts +294 -125
- package/lib/types/Spell.d.ts +294 -125
- package/lib/types/Talisman.d.ts +10 -0
- package/lib/types/_Activatable.d.ts +1 -0
- package/lib/types/_Activatable.js +4 -0
- package/lib/types/_ActivatableAdventurePointsValue.d.ts +46 -46
- package/lib/types/_ActivatableAutomatic.d.ts +23 -23
- package/lib/types/_ActivatableCombat.d.ts +5 -1
- package/lib/types/_ActivatableCombat.js +13 -1
- package/lib/types/_ActivatableNonMundane.d.ts +128 -64
- package/lib/types/_ActivatableNonMundane.js +10 -67
- package/lib/types/_ActivatableSelectOptionCategory.d.ts +368 -368
- package/lib/types/_ActivatableSelectOptionCategory.js +19 -3
- package/lib/types/_ActivatableSelectOptions.d.ts +230 -230
- package/lib/types/_ActivatableSkill.d.ts +680 -284
- package/lib/types/_ActivatableSkillCastingTime.d.ts +30 -0
- package/lib/types/_ActivatableSkillCastingTime.js +20 -0
- package/lib/types/_ActivatableSkillCost.d.ts +288 -186
- package/lib/types/_ActivatableSkillCost.js +109 -110
- package/lib/types/_ActivatableSkillDuration.d.ts +70 -0
- package/lib/types/_ActivatableSkillDuration.js +44 -0
- package/lib/types/_ActivatableSkillParameterMap.d.ts +34 -0
- package/lib/types/_ActivatableSkillParameterMap.js +64 -0
- package/lib/types/_IdentifierGroup.d.ts +117 -92
- package/lib/types/_IdentifierGroup.js +37 -26
- package/lib/types/equipment/item/HerbalPreservation.d.ts +20 -0
- package/lib/types/magicalActions/AnimistPower.d.ts +50 -0
- package/lib/types/magicalActions/Bannzeichen.d.ts +53 -2
- package/lib/types/magicalActions/Bannzeichen.js +2 -4
- package/lib/types/magicalActions/Curse.d.ts +20 -0
- package/lib/types/magicalActions/DominationRitual.d.ts +20 -0
- package/lib/types/magicalActions/ElvenMagicalSong.d.ts +10 -0
- package/lib/types/magicalActions/GeodeRitual.d.ts +28 -13
- package/lib/types/magicalActions/GeodeRitual.js +2 -2
- package/lib/types/magicalActions/GoblinRitual.d.ts +20 -0
- package/lib/types/magicalActions/JesterTrick.d.ts +30 -0
- package/lib/types/magicalActions/MagicalMelody.d.ts +10 -0
- package/lib/types/magicalActions/MagicalRune.d.ts +20 -0
- package/lib/types/magicalActions/ZibiljaRitual.d.ts +92 -34
- package/lib/types/prerequisites/PrerequisiteGroups.d.ts +161 -161
- package/lib/types/prerequisites/single/ActivatablePrerequisite.d.ts +23 -23
- package/lib/types/prerequisites/single/PropertyPrerequisite.d.ts +16 -0
- package/lib/types/prerequisites/single/PropertyPrerequisite.js +16 -0
- package/lib/types/specialAbility/AdvancedCombatSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/AdvancedCombatSpecialAbility.js +2 -2
- package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/AdvancedSkillSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/AncestorGlyph.d.ts +230 -230
- package/lib/types/specialAbility/BlessedTradition.d.ts +230 -230
- package/lib/types/specialAbility/BrawlingSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/BrawlingSpecialAbility.js +2 -2
- package/lib/types/specialAbility/CeremonialItemSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/CombatSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/CombatSpecialAbility.js +2 -2
- package/lib/types/specialAbility/CombatStyleSpecialAbility.d.ts +232 -233
- package/lib/types/specialAbility/CombatStyleSpecialAbility.js +2 -2
- package/lib/types/specialAbility/CommandSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/CommandSpecialAbility.js +2 -2
- package/lib/types/specialAbility/FamiliarSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/FatePointSexSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/FatePointSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/GeneralSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/KarmaSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/LycantropicGift.d.ts +230 -230
- package/lib/types/specialAbility/MagicStyleSpecialAbility.d.ts +231 -230
- package/lib/types/specialAbility/MagicStyleSpecialAbility.js +2 -1
- package/lib/types/specialAbility/MagicalSign.d.ts +12 -13
- package/lib/types/specialAbility/MagicalSign.js +2 -2
- package/lib/types/specialAbility/MagicalSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/MagicalTradition.d.ts +230 -230
- package/lib/types/specialAbility/PactGift.d.ts +253 -253
- package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/Sermon.d.ts +230 -230
- package/lib/types/specialAbility/SexSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/SikaryanDrainSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/SkillStyleSpecialAbility.d.ts +230 -230
- package/lib/types/specialAbility/VampiricGift.d.ts +230 -230
- package/lib/types/specialAbility/Vision.d.ts +230 -230
- package/lib/types/specialAbility/sub/TradeSecret.d.ts +207 -207
- package/lib/types/traditionArtifacts/ArcaneOrbEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/AttireEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/Beutelzauber.d.ts +301 -270
- package/lib/types/traditionArtifacts/BowlEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/CauldronEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/ChronicleEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/DaggerRitual.d.ts +301 -270
- package/lib/types/traditionArtifacts/FoolsHatEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/Haubenzauber.d.ts +301 -270
- package/lib/types/traditionArtifacts/Hauerkettenzauber.d.ts +94 -63
- package/lib/types/traditionArtifacts/InstrumentEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/Keulenzauber.d.ts +94 -63
- package/lib/types/traditionArtifacts/Krallenkettenzauber.d.ts +301 -270
- package/lib/types/traditionArtifacts/Kristallkugelzauber.d.ts +301 -270
- package/lib/types/traditionArtifacts/OrbEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/RingEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/Schweinetrommelzauber.d.ts +94 -63
- package/lib/types/traditionArtifacts/SickleRitual.d.ts +301 -270
- package/lib/types/traditionArtifacts/SpellSwordEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/StaffEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/ToyEnchantment.d.ts +301 -270
- package/lib/types/traditionArtifacts/Trinkhornzauber.d.ts +301 -270
- package/lib/types/traditionArtifacts/WandEnchantment.d.ts +287 -254
- package/lib/types/traditionArtifacts/WeaponEnchantment.d.ts +301 -270
- package/package.json +9 -9
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as DB from "tsondb/schema/dsl";
|
|
2
2
|
import { DurationUnitValue } from "./_ActivatableSkillDuration.js";
|
|
3
|
+
import { ParameterMap } from "./_ActivatableSkillParameterMap.js";
|
|
3
4
|
import { SkillModificationLevelIdentifier } from "./_Identifier.js";
|
|
4
5
|
import { ResponsiveText, ResponsiveTextOptional, ResponsiveTextReplace } from "./_ResponsiveText.js";
|
|
5
6
|
import { NestedTranslationMap } from "./Locale.js";
|
|
@@ -98,88 +99,32 @@ export const IndefiniteOneTimeCost = DB.TypeAlias(import.meta.url, {
|
|
|
98
99
|
})),
|
|
99
100
|
}),
|
|
100
101
|
});
|
|
101
|
-
|
|
102
|
+
const OneTimeCostMap = DB.Enum(import.meta.url, {
|
|
102
103
|
name: "OneTimeCostMap",
|
|
103
|
-
comment: `A content that is \`2/4/8/16 AE for an item the size of a cup/chest/door/castle gate\` may be respresented as the following map:
|
|
104
|
-
|
|
105
|
-
\`\`\`yaml
|
|
106
|
-
options:
|
|
107
|
-
- value: 2
|
|
108
|
-
label: "cup"
|
|
109
|
-
- value: 4
|
|
110
|
-
label: "chest"
|
|
111
|
-
- value: 8
|
|
112
|
-
label: "door"
|
|
113
|
-
- value: 16
|
|
114
|
-
label: "castle gate"
|
|
115
|
-
for_append: "an item the size of a"
|
|
116
|
-
\`\`\`
|
|
117
|
-
|
|
118
|
-
This will generate the exact same string as seen above – given it is set for a spellwork and thus \`AE\` is used.`,
|
|
119
|
-
type: () => DB.Object({
|
|
120
|
-
options: DB.Required({
|
|
121
|
-
comment: "The possible costs and associated labels.",
|
|
122
|
-
type: DB.Array(DB.IncludeIdentifier(OneTimeCostMapOption), {
|
|
123
|
-
minItems: 2,
|
|
124
|
-
}),
|
|
125
|
-
}),
|
|
126
|
-
style: DB.Optional({
|
|
127
|
-
comment: "The style of the generated string. It may either be displayed in a compressed way (e.g. `1/2/3 AE for a small/medium/large object`) or in a verbose way (e.g. `1 AE for a small object, 2 AE for a medium object, 3 AE for a large object`). The default is `compressed`.",
|
|
128
|
-
type: DB.IncludeIdentifier(MapStyle),
|
|
129
|
-
}),
|
|
130
|
-
translations: NestedTranslationMap(DB.Optional, "OneTimeCostMap", DB.Object({
|
|
131
|
-
list_prepend: DB.Optional({
|
|
132
|
-
comment: "Place a string between the `for` and the grouped map option labels.",
|
|
133
|
-
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
134
|
-
}),
|
|
135
|
-
list_append: DB.Optional({
|
|
136
|
-
comment: "Place a string after the grouped map option labels.",
|
|
137
|
-
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
138
|
-
}),
|
|
139
|
-
replacement: DB.Optional({
|
|
140
|
-
comment: "If the string from the book cannot be generated using the default generation technique, use this string. All options still need to be inserted propertly, since it may be used by in-game tools to provide a selection to players.",
|
|
141
|
-
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
142
|
-
}),
|
|
143
|
-
}, { minProperties: 1 })),
|
|
144
|
-
}),
|
|
145
|
-
});
|
|
146
|
-
const OneTimeCostMapOption = DB.TypeAlias(import.meta.url, {
|
|
147
|
-
name: "OneTimeCostMapOption",
|
|
148
|
-
type: () => DB.Object({
|
|
149
|
-
value: DB.Required({
|
|
150
|
-
comment: "The full cost value for this option.",
|
|
151
|
-
type: DB.Integer({ minimum: 1 }),
|
|
152
|
-
}),
|
|
153
|
-
permanent_value: DB.Optional({
|
|
154
|
-
comment: "The part of the `value` that has to be paid permanently.",
|
|
155
|
-
type: DB.Integer({ minimum: 0 }),
|
|
156
|
-
}),
|
|
157
|
-
translations: NestedTranslationMap(DB.Optional, "OneTimeCostMapOption", DB.Object({
|
|
158
|
-
label: DB.Required({
|
|
159
|
-
comment: "The description of the option for cost string generation.",
|
|
160
|
-
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
161
|
-
}),
|
|
162
|
-
label_standalone: DB.Optional({
|
|
163
|
-
comment: "The description of the option if used standalone (e.g. in an in-game tool where you can select how many AE you have to pay). Only used if different from `label`.",
|
|
164
|
-
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
165
|
-
}),
|
|
166
|
-
})),
|
|
167
|
-
}),
|
|
168
|
-
});
|
|
169
|
-
export const MapStyle = DB.Enum(import.meta.url, {
|
|
170
|
-
name: "MapStyle",
|
|
171
|
-
comment: "The style of the generated string. It may either be displayed in a compressed way (e.g. `1/2/3 AE for a small/medium/large object`) or in a verbose way (e.g. `1 AE for a small object, 2 AE for a medium object, 3 AE for a large object`).",
|
|
172
104
|
values: () => ({
|
|
173
|
-
|
|
174
|
-
|
|
105
|
+
Modifiable: DB.EnumCase({ type: DB.IncludeIdentifier(ModifiableOneTimeCostMap) }),
|
|
106
|
+
NonModifiable: DB.EnumCase({ type: DB.IncludeIdentifier(NonModifiableOneTimeCostMap) }),
|
|
175
107
|
}),
|
|
176
108
|
});
|
|
177
109
|
export const SustainedCost = DB.Enum(import.meta.url, {
|
|
178
110
|
name: "SustainedCost",
|
|
111
|
+
values: () => ({
|
|
112
|
+
Single: DB.EnumCase({ type: DB.IncludeIdentifier(SingleSustainedCost) }),
|
|
113
|
+
Map: DB.EnumCase({ type: DB.IncludeIdentifier(SustainedCostMap) }),
|
|
114
|
+
}),
|
|
115
|
+
});
|
|
116
|
+
const SingleSustainedCost = DB.Enum(import.meta.url, {
|
|
117
|
+
name: "SingleSustainedCost",
|
|
179
118
|
values: () => ({
|
|
180
119
|
Modifiable: DB.EnumCase({ type: DB.IncludeIdentifier(ModifiableSustainedCost) }),
|
|
181
120
|
NonModifiable: DB.EnumCase({ type: DB.IncludeIdentifier(NonModifiableSustainedCost) }),
|
|
182
|
-
|
|
121
|
+
}),
|
|
122
|
+
});
|
|
123
|
+
const SustainedCostMap = DB.Enum(import.meta.url, {
|
|
124
|
+
name: "SustainedCostMap",
|
|
125
|
+
values: () => ({
|
|
126
|
+
Modifiable: DB.EnumCase({ type: DB.IncludeIdentifier(ModifiableSustainedCostMap) }),
|
|
127
|
+
NonModifiable: DB.EnumCase({ type: DB.IncludeIdentifier(NonModifiableSustainedCostMap) }),
|
|
183
128
|
}),
|
|
184
129
|
});
|
|
185
130
|
const ModifiableSustainedCost = DB.TypeAlias(import.meta.url, {
|
|
@@ -231,54 +176,108 @@ const NonModifiableSustainedCostPerCountable = DB.TypeAlias(import.meta.url, {
|
|
|
231
176
|
})),
|
|
232
177
|
}),
|
|
233
178
|
});
|
|
234
|
-
|
|
235
|
-
name: "
|
|
236
|
-
comment: `A content that is \`2/4/8/16 AE (activation) + 1/2/4/8 per 5 minutes for an item the size of a cup/chest/door/castle gate\` can be represented as a cost map.
|
|
237
|
-
|
|
238
|
-
The \`an item the size of a\` would be the *list prefix* string, while the list of options would contain four options with the activation cost and the name.`,
|
|
179
|
+
const ModifiableOneTimeCostMap = DB.TypeAlias(import.meta.url, {
|
|
180
|
+
name: "ModifiableOneTimeCostMap",
|
|
239
181
|
type: () => DB.Object({
|
|
240
|
-
|
|
241
|
-
comment: "The
|
|
242
|
-
type: DB.
|
|
243
|
-
|
|
244
|
-
|
|
182
|
+
map: DB.Required({
|
|
183
|
+
comment: "The cost map.",
|
|
184
|
+
type: DB.GenIncludeIdentifier(ParameterMap, [
|
|
185
|
+
DB.IncludeIdentifier(ModifiableOneTimeCostMapOptionValue),
|
|
186
|
+
]),
|
|
187
|
+
}),
|
|
188
|
+
}),
|
|
189
|
+
});
|
|
190
|
+
const NonModifiableOneTimeCostMap = DB.TypeAlias(import.meta.url, {
|
|
191
|
+
name: "NonModifiableOneTimeCostMap",
|
|
192
|
+
type: () => DB.Object({
|
|
193
|
+
map: DB.Required({
|
|
194
|
+
comment: "The cost map.",
|
|
195
|
+
type: DB.GenIncludeIdentifier(ParameterMap, [
|
|
196
|
+
DB.IncludeIdentifier(NonModifiableOneTimeCostMapOptionValue),
|
|
197
|
+
]),
|
|
198
|
+
}),
|
|
199
|
+
}),
|
|
200
|
+
});
|
|
201
|
+
/**
|
|
202
|
+
* Based on the cost map, but for other entries that do not care about modifiability and one-time/sustained differences.
|
|
203
|
+
*/
|
|
204
|
+
export const StandaloneCostMap = DB.TypeAlias(import.meta.url, {
|
|
205
|
+
name: "StandaloneCostMap",
|
|
206
|
+
type: () => DB.GenIncludeIdentifier(ParameterMap, [
|
|
207
|
+
DB.IncludeIdentifier(NonModifiableOneTimeCostMapOptionValue),
|
|
208
|
+
]),
|
|
209
|
+
});
|
|
210
|
+
const ModifiableSustainedCostMap = DB.TypeAlias(import.meta.url, {
|
|
211
|
+
name: "ModifiableSustainedCostMap",
|
|
212
|
+
type: () => DB.Object({
|
|
213
|
+
map: DB.Required({
|
|
214
|
+
comment: "The cost map.",
|
|
215
|
+
type: DB.GenIncludeIdentifier(ParameterMap, [
|
|
216
|
+
DB.IncludeIdentifier(ModifiableSustainedCostMapOptionValue),
|
|
217
|
+
]),
|
|
245
218
|
}),
|
|
246
219
|
interval: DB.Required({
|
|
247
220
|
comment: "The sustain interval.",
|
|
248
221
|
type: DB.IncludeIdentifier(DurationUnitValue),
|
|
249
222
|
}),
|
|
250
|
-
translations: NestedTranslationMap(DB.Optional, "SustainedCostMap", DB.Object({
|
|
251
|
-
listPrefix: DB.Optional({
|
|
252
|
-
comment: "Place a string between the `for` and the grouped map option labels.",
|
|
253
|
-
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
254
|
-
}),
|
|
255
|
-
listSuffix: DB.Optional({
|
|
256
|
-
comment: "Place a string after the grouped map option labels.",
|
|
257
|
-
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
258
|
-
}),
|
|
259
|
-
replacement: DB.Optional({
|
|
260
|
-
comment: "If the string from the book cannot be generated using the default generation technique, use this string. All options still need to be inserted propertly, since it may be used by in-game tools to provide a selection to players.",
|
|
261
|
-
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
262
|
-
}),
|
|
263
|
-
}, { minProperties: 1 })),
|
|
264
223
|
}),
|
|
265
224
|
});
|
|
266
|
-
const
|
|
267
|
-
name: "
|
|
225
|
+
const NonModifiableSustainedCostMap = DB.TypeAlias(import.meta.url, {
|
|
226
|
+
name: "NonModifiableSustainedCostMap",
|
|
227
|
+
type: () => DB.Object({
|
|
228
|
+
map: DB.Required({
|
|
229
|
+
comment: "The cost map.",
|
|
230
|
+
type: DB.GenIncludeIdentifier(ParameterMap, [
|
|
231
|
+
DB.IncludeIdentifier(NonModifiableSustainedCostMapOptionValue),
|
|
232
|
+
]),
|
|
233
|
+
}),
|
|
234
|
+
interval: DB.Required({
|
|
235
|
+
comment: "The sustain interval.",
|
|
236
|
+
type: DB.IncludeIdentifier(DurationUnitValue),
|
|
237
|
+
}),
|
|
238
|
+
}),
|
|
239
|
+
});
|
|
240
|
+
const ModifiableOneTimeCostMapOptionValue = DB.TypeAlias(import.meta.url, {
|
|
241
|
+
name: "ModifiableOneTimeCostMapOptionValue",
|
|
242
|
+
type: () => DB.Object({
|
|
243
|
+
initialModificationLevel: DB.Required({
|
|
244
|
+
comment: "The initial skill modification identifier/level.",
|
|
245
|
+
type: SkillModificationLevelIdentifier(),
|
|
246
|
+
}),
|
|
247
|
+
permanentValue: DB.Optional({
|
|
248
|
+
comment: "The part of the cost value that has to be spent permanently.",
|
|
249
|
+
type: DB.Integer({ minimum: 1 }),
|
|
250
|
+
}),
|
|
251
|
+
}),
|
|
252
|
+
});
|
|
253
|
+
const NonModifiableOneTimeCostMapOptionValue = DB.TypeAlias(import.meta.url, {
|
|
254
|
+
name: "NonModifiableOneTimeCostMapOptionValue",
|
|
268
255
|
type: () => DB.Object({
|
|
269
256
|
value: DB.Required({
|
|
270
|
-
comment: "The
|
|
257
|
+
comment: "The full cost value for this option.",
|
|
258
|
+
type: DB.Integer({ minimum: 1 }),
|
|
259
|
+
}),
|
|
260
|
+
permanentValue: DB.Optional({
|
|
261
|
+
comment: "The part of the cost value that has to be spent permanently.",
|
|
262
|
+
type: DB.Integer({ minimum: 0 }),
|
|
263
|
+
}),
|
|
264
|
+
}),
|
|
265
|
+
});
|
|
266
|
+
const ModifiableSustainedCostMapOptionValue = DB.TypeAlias(import.meta.url, {
|
|
267
|
+
name: "ModifiableSustainedCostMapOptionValue",
|
|
268
|
+
type: () => DB.Object({
|
|
269
|
+
initialModificationLevel: DB.Required({
|
|
270
|
+
comment: "The initial skill modification identifier/level.",
|
|
271
|
+
type: SkillModificationLevelIdentifier(),
|
|
272
|
+
}),
|
|
273
|
+
}),
|
|
274
|
+
});
|
|
275
|
+
const NonModifiableSustainedCostMapOptionValue = DB.TypeAlias(import.meta.url, {
|
|
276
|
+
name: "NonModifiableSustainedCostMapOptionValue",
|
|
277
|
+
type: () => DB.Object({
|
|
278
|
+
value: DB.Required({
|
|
279
|
+
comment: "The full cost value for this option.",
|
|
271
280
|
type: DB.Integer({ minimum: 1 }),
|
|
272
281
|
}),
|
|
273
|
-
translations: NestedTranslationMap(DB.Optional, "SustainedCostMapOption", DB.Object({
|
|
274
|
-
label: DB.Required({
|
|
275
|
-
comment: "The description of the option for cost string generation.",
|
|
276
|
-
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
277
|
-
}),
|
|
278
|
-
standaloneLabel: DB.Optional({
|
|
279
|
-
comment: "The description of the option if used standalone (e.g. in an in-game tool where you can select how many AE you have to pay). Only used if different from `label`.",
|
|
280
|
-
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
281
|
-
}),
|
|
282
|
-
})),
|
|
283
282
|
}),
|
|
284
283
|
});
|
|
@@ -15,6 +15,16 @@ export declare const DurationForOneTime: DB.Enum<"DurationForOneTime", {
|
|
|
15
15
|
Centuries: DB.EnumCase<null>;
|
|
16
16
|
Actions: DB.EnumCase<null>;
|
|
17
17
|
CombatRounds: DB.EnumCase<null>;
|
|
18
|
+
Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
|
|
19
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
|
|
20
|
+
name: DB.MemberDecl<DB.String, true>;
|
|
21
|
+
fullNumber: DB.MemberDecl<DB.String, true>;
|
|
22
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
23
|
+
symbol: DB.MemberDecl<DB.String, true>;
|
|
24
|
+
compressedNumber: DB.MemberDecl<DB.String, true>;
|
|
25
|
+
compressed: DB.MemberDecl<DB.String, true>;
|
|
26
|
+
}>, true>;
|
|
27
|
+
}>, []>>>;
|
|
18
28
|
}, []>>, true>;
|
|
19
29
|
}>, []>>, false>;
|
|
20
30
|
translations: DB.MemberDecl<DB.NestedEntityMap<"ImmediateTranslation", {
|
|
@@ -47,6 +57,16 @@ export declare const DurationForOneTime: DB.Enum<"DurationForOneTime", {
|
|
|
47
57
|
Centuries: DB.EnumCase<null>;
|
|
48
58
|
Actions: DB.EnumCase<null>;
|
|
49
59
|
CombatRounds: DB.EnumCase<null>;
|
|
60
|
+
Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
|
|
61
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
|
|
62
|
+
name: DB.MemberDecl<DB.String, true>;
|
|
63
|
+
fullNumber: DB.MemberDecl<DB.String, true>;
|
|
64
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
65
|
+
symbol: DB.MemberDecl<DB.String, true>;
|
|
66
|
+
compressedNumber: DB.MemberDecl<DB.String, true>;
|
|
67
|
+
compressed: DB.MemberDecl<DB.String, true>;
|
|
68
|
+
}>, true>;
|
|
69
|
+
}>, []>>>;
|
|
50
70
|
}, []>>, true>;
|
|
51
71
|
translations: DB.MemberDecl<DB.NestedEntityMap<"ExpressionBasedDurationTranslation", {
|
|
52
72
|
replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
|
|
@@ -79,6 +99,16 @@ export declare const FixedDuration: DB.TypeAlias<"FixedDuration", DB.Object<{
|
|
|
79
99
|
Centuries: DB.EnumCase<null>;
|
|
80
100
|
Actions: DB.EnumCase<null>;
|
|
81
101
|
CombatRounds: DB.EnumCase<null>;
|
|
102
|
+
Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
|
|
103
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
|
|
104
|
+
name: DB.MemberDecl<DB.String, true>;
|
|
105
|
+
fullNumber: DB.MemberDecl<DB.String, true>;
|
|
106
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
107
|
+
symbol: DB.MemberDecl<DB.String, true>;
|
|
108
|
+
compressedNumber: DB.MemberDecl<DB.String, true>;
|
|
109
|
+
compressed: DB.MemberDecl<DB.String, true>;
|
|
110
|
+
}>, true>;
|
|
111
|
+
}>, []>>>;
|
|
82
112
|
}, []>>, true>;
|
|
83
113
|
translations: DB.MemberDecl<DB.NestedEntityMap<"FixedDurationTranslation", {
|
|
84
114
|
replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
|
|
@@ -102,6 +132,16 @@ export declare const ExpressionBasedDuration: DB.TypeAlias<"ExpressionBasedDurat
|
|
|
102
132
|
Centuries: DB.EnumCase<null>;
|
|
103
133
|
Actions: DB.EnumCase<null>;
|
|
104
134
|
CombatRounds: DB.EnumCase<null>;
|
|
135
|
+
Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
|
|
136
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
|
|
137
|
+
name: DB.MemberDecl<DB.String, true>;
|
|
138
|
+
fullNumber: DB.MemberDecl<DB.String, true>;
|
|
139
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
140
|
+
symbol: DB.MemberDecl<DB.String, true>;
|
|
141
|
+
compressedNumber: DB.MemberDecl<DB.String, true>;
|
|
142
|
+
compressed: DB.MemberDecl<DB.String, true>;
|
|
143
|
+
}>, true>;
|
|
144
|
+
}>, []>>>;
|
|
105
145
|
}, []>>, true>;
|
|
106
146
|
translations: DB.MemberDecl<DB.NestedEntityMap<"ExpressionBasedDurationTranslation", {
|
|
107
147
|
replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
|
|
@@ -133,6 +173,16 @@ export declare const DurationForSustained: DB.TypeAlias<"DurationForSustained",
|
|
|
133
173
|
Centuries: DB.EnumCase<null>;
|
|
134
174
|
Actions: DB.EnumCase<null>;
|
|
135
175
|
CombatRounds: DB.EnumCase<null>;
|
|
176
|
+
Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
|
|
177
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
|
|
178
|
+
name: DB.MemberDecl<DB.String, true>;
|
|
179
|
+
fullNumber: DB.MemberDecl<DB.String, true>;
|
|
180
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
181
|
+
symbol: DB.MemberDecl<DB.String, true>;
|
|
182
|
+
compressedNumber: DB.MemberDecl<DB.String, true>;
|
|
183
|
+
compressed: DB.MemberDecl<DB.String, true>;
|
|
184
|
+
}>, true>;
|
|
185
|
+
}>, []>>>;
|
|
136
186
|
}, []>>, true>;
|
|
137
187
|
}>, []>>, true>;
|
|
138
188
|
}>, []>;
|
|
@@ -148,6 +198,16 @@ export declare const DurationUnit: DB.Enum<"DurationUnit", {
|
|
|
148
198
|
Centuries: DB.EnumCase<null>;
|
|
149
199
|
Actions: DB.EnumCase<null>;
|
|
150
200
|
CombatRounds: DB.EnumCase<null>;
|
|
201
|
+
Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
|
|
202
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
|
|
203
|
+
name: DB.MemberDecl<DB.String, true>;
|
|
204
|
+
fullNumber: DB.MemberDecl<DB.String, true>;
|
|
205
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
206
|
+
symbol: DB.MemberDecl<DB.String, true>;
|
|
207
|
+
compressedNumber: DB.MemberDecl<DB.String, true>;
|
|
208
|
+
compressed: DB.MemberDecl<DB.String, true>;
|
|
209
|
+
}>, true>;
|
|
210
|
+
}>, []>>>;
|
|
151
211
|
}, []>;
|
|
152
212
|
export declare const DurationUnitValue: DB.TypeAlias<"DurationUnitValue", DB.Object<{
|
|
153
213
|
value: DB.MemberDecl<DB.Integer, true>;
|
|
@@ -163,5 +223,15 @@ export declare const DurationUnitValue: DB.TypeAlias<"DurationUnitValue", DB.Obj
|
|
|
163
223
|
Centuries: DB.EnumCase<null>;
|
|
164
224
|
Actions: DB.EnumCase<null>;
|
|
165
225
|
CombatRounds: DB.EnumCase<null>;
|
|
226
|
+
Custom: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"CustomDurationUnit", DB.Object<{
|
|
227
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"CustomDurationUnitTranslation", {
|
|
228
|
+
name: DB.MemberDecl<DB.String, true>;
|
|
229
|
+
fullNumber: DB.MemberDecl<DB.String, true>;
|
|
230
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
231
|
+
symbol: DB.MemberDecl<DB.String, true>;
|
|
232
|
+
compressedNumber: DB.MemberDecl<DB.String, true>;
|
|
233
|
+
compressed: DB.MemberDecl<DB.String, true>;
|
|
234
|
+
}>, true>;
|
|
235
|
+
}>, []>>>;
|
|
166
236
|
}, []>>, true>;
|
|
167
237
|
}>, []>;
|
|
@@ -117,6 +117,50 @@ export const DurationUnit = DB.Enum(import.meta.url, {
|
|
|
117
117
|
Centuries: DB.EnumCase({ type: null }),
|
|
118
118
|
Actions: DB.EnumCase({ type: null }),
|
|
119
119
|
CombatRounds: DB.EnumCase({ type: null }),
|
|
120
|
+
Custom: DB.EnumCase({
|
|
121
|
+
type: DB.IncludeIdentifier(CustomDurationUnit),
|
|
122
|
+
}),
|
|
123
|
+
}),
|
|
124
|
+
});
|
|
125
|
+
const CustomDurationUnit = DB.TypeAlias(import.meta.url, {
|
|
126
|
+
name: "CustomDurationUnit",
|
|
127
|
+
type: () => DB.Object({
|
|
128
|
+
translations: NestedTranslationMap(DB.Required, "CustomDurationUnit", DB.Object({
|
|
129
|
+
name: DB.Required({
|
|
130
|
+
comment: "The name of the custom duration unit.",
|
|
131
|
+
type: DB.String({ minLength: 1 }),
|
|
132
|
+
}),
|
|
133
|
+
fullNumber: DB.Required({
|
|
134
|
+
comment: "A translation for a numeric value of the custom duration unit, e.g. ‘3 days’. The translation string can and should make use of the `$value` and `$style` variables. The `$style` variable can be either `interval` or `default`.",
|
|
135
|
+
type: DB.String({
|
|
136
|
+
minLength: 1,
|
|
137
|
+
pattern: /^\.input \{\$value :number\}[\n ]\.input \{\$style :string\}/,
|
|
138
|
+
}),
|
|
139
|
+
}),
|
|
140
|
+
full: DB.Required({
|
|
141
|
+
comment: "A translation for an arbitrary value of the custom duration unit, e.g. ‘3–4 days’ or ‘QL days’. The translation string can and should make use of the `$value` variable.",
|
|
142
|
+
type: DB.String({
|
|
143
|
+
minLength: 1,
|
|
144
|
+
}),
|
|
145
|
+
}),
|
|
146
|
+
symbol: DB.Required({
|
|
147
|
+
comment: "A symbol or shortened label for the custom duration unit for use in small spaces.",
|
|
148
|
+
type: DB.String({ minLength: 1 }),
|
|
149
|
+
}),
|
|
150
|
+
compressedNumber: DB.Required({
|
|
151
|
+
comment: "A translation for a numeric value of the custom duration unit for use in small spaces, e.g. ‘3 d.’. The translation string can and should make use of the `$value` and `$style` variables. The `$style` variable can be either `interval` or `default`.",
|
|
152
|
+
type: DB.String({
|
|
153
|
+
minLength: 1,
|
|
154
|
+
pattern: /^\.input \{\$value :number\}[\n ]\.input \{\$style :string\}/,
|
|
155
|
+
}),
|
|
156
|
+
}),
|
|
157
|
+
compressed: DB.Required({
|
|
158
|
+
comment: "A translation for an arbitrary value of the custom duration unit for use in small spaces, e.g. ‘3–4 d.’ or ‘QL d.’. The translation string can and should make use of the `$value` variable.",
|
|
159
|
+
type: DB.String({
|
|
160
|
+
minLength: 1,
|
|
161
|
+
}),
|
|
162
|
+
}),
|
|
163
|
+
})),
|
|
120
164
|
}),
|
|
121
165
|
});
|
|
122
166
|
export const DurationUnitValue = DB.TypeAlias(import.meta.url, {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as DB from "tsondb/schema/dsl";
|
|
2
|
+
export declare const ParameterMap: DB.TypeAlias<"ParameterMap", DB.Object<{
|
|
3
|
+
options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"ParameterMapOption", DB.Object<{
|
|
4
|
+
value: DB.MemberDecl<DB.TypeArgument<DB.Param<"Value", DB.Type>>, true>;
|
|
5
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"ParameterMapOptionTranslation", {
|
|
6
|
+
label: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
|
|
7
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
8
|
+
compressed: DB.MemberDecl<DB.String, false>;
|
|
9
|
+
}>, []>>, true>;
|
|
10
|
+
standaloneLabel: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
|
|
11
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
12
|
+
compressed: DB.MemberDecl<DB.String, false>;
|
|
13
|
+
}>, []>>, false>;
|
|
14
|
+
}>, false>;
|
|
15
|
+
}>, [Value: DB.Param<"Value", DB.Type>]>>>, true>;
|
|
16
|
+
style: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ParameterMapStyle", {
|
|
17
|
+
Compressed: DB.EnumCase<null>;
|
|
18
|
+
Verbose: DB.EnumCase<null>;
|
|
19
|
+
}, []>>, true>;
|
|
20
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"ParameterMapTranslation", {
|
|
21
|
+
listPrefix: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
|
|
22
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
23
|
+
compressed: DB.MemberDecl<DB.String, false>;
|
|
24
|
+
}>, []>>, false>;
|
|
25
|
+
listSuffix: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
|
|
26
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
27
|
+
compressed: DB.MemberDecl<DB.String, false>;
|
|
28
|
+
}>, []>>, false>;
|
|
29
|
+
replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
|
|
30
|
+
full: DB.MemberDecl<DB.String, true>;
|
|
31
|
+
compressed: DB.MemberDecl<DB.String, false>;
|
|
32
|
+
}>, []>>, false>;
|
|
33
|
+
}>, false>;
|
|
34
|
+
}>, [Value: DB.Param<"Value", DB.Type>]>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as DB from "tsondb/schema/dsl";
|
|
2
|
+
import { ResponsiveTextOptional } from "./_ResponsiveText.js";
|
|
3
|
+
import { NestedTranslationMap } from "./Locale.js";
|
|
4
|
+
export const ParameterMap = DB.GenTypeAlias(import.meta.url, {
|
|
5
|
+
name: "ParameterMap",
|
|
6
|
+
parameters: [DB.Param("Value")],
|
|
7
|
+
comment: `A content that is \`2/4/8/16 AE (activation) + 1/2/4/8 per 5 minutes for an item the size of a cup/chest/door/castle gate\` can be represented as a cost map.
|
|
8
|
+
|
|
9
|
+
The \`an item the size of a\` would be the *list prefix* string, while the list of options would contain four options with the activation cost and the name.`,
|
|
10
|
+
type: Value => DB.Object({
|
|
11
|
+
options: DB.Required({
|
|
12
|
+
comment: "The possible values and associated labels.",
|
|
13
|
+
type: DB.Array(DB.GenIncludeIdentifier(ParameterMapOption, [DB.TypeArgument(Value)]), {
|
|
14
|
+
minItems: 2,
|
|
15
|
+
}),
|
|
16
|
+
}),
|
|
17
|
+
style: DB.Required({
|
|
18
|
+
comment: "The style of the generated string. It may either be displayed in a compressed way (e.g. `1/2/3 AE for a small/medium/large object`) or in a verbose way (e.g. `1 AE for a small object, 2 AE for a medium object, 3 AE for a large object`).",
|
|
19
|
+
type: DB.IncludeIdentifier(ParameterMapStyle),
|
|
20
|
+
}),
|
|
21
|
+
translations: NestedTranslationMap(DB.Optional, "ParameterMap", DB.Object({
|
|
22
|
+
listPrefix: DB.Optional({
|
|
23
|
+
comment: "Place a string between the `for` and the grouped map option labels.",
|
|
24
|
+
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
25
|
+
}),
|
|
26
|
+
listSuffix: DB.Optional({
|
|
27
|
+
comment: "Place a string after the grouped map option labels.",
|
|
28
|
+
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
29
|
+
}),
|
|
30
|
+
replacement: DB.Optional({
|
|
31
|
+
comment: "If the string from the book cannot be generated using the default generation technique, use this string. All options still need to be inserted propertly, since it may be used by in-game tools to provide a selection to players.",
|
|
32
|
+
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
33
|
+
}),
|
|
34
|
+
}, { minProperties: 1 })),
|
|
35
|
+
}),
|
|
36
|
+
});
|
|
37
|
+
const ParameterMapStyle = DB.Enum(import.meta.url, {
|
|
38
|
+
name: "ParameterMapStyle",
|
|
39
|
+
comment: "The style of the generated string. It may either be displayed in a compressed way (e.g. `1/2/3 AE for a small/medium/large object`) or in a verbose way (e.g. `1 AE for a small object, 2 AE for a medium object, 3 AE for a large object`).",
|
|
40
|
+
values: () => ({
|
|
41
|
+
Compressed: DB.EnumCase({ type: null }),
|
|
42
|
+
Verbose: DB.EnumCase({ type: null }),
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
const ParameterMapOption = DB.GenTypeAlias(import.meta.url, {
|
|
46
|
+
name: "ParameterMapOption",
|
|
47
|
+
parameters: [DB.Param("Value")],
|
|
48
|
+
type: Value => DB.Object({
|
|
49
|
+
value: DB.Required({
|
|
50
|
+
comment: "The value this option represents. If used for sustained cost, the interval cost is always half of this value.",
|
|
51
|
+
type: DB.TypeArgument(Value),
|
|
52
|
+
}),
|
|
53
|
+
translations: NestedTranslationMap(DB.Optional, "ParameterMapOption", DB.Object({
|
|
54
|
+
label: DB.Required({
|
|
55
|
+
comment: "The description of the option for cost string generation.",
|
|
56
|
+
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
57
|
+
}),
|
|
58
|
+
standaloneLabel: DB.Optional({
|
|
59
|
+
comment: "The description of the option if used standalone (e.g. in an in-game tool where you can select how many AE you have to pay). Only used if different from `label`.",
|
|
60
|
+
type: DB.IncludeIdentifier(ResponsiveTextOptional),
|
|
61
|
+
}),
|
|
62
|
+
})),
|
|
63
|
+
}),
|
|
64
|
+
});
|