optolith-database-schema 0.21.1 → 0.22.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.
Files changed (130) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/gen/types.d.ts +67 -4
  3. package/lib/types/Advantage.d.ts +136 -1
  4. package/lib/types/Advantage.js +6 -1
  5. package/lib/types/Disadvantage.d.ts +66 -1
  6. package/lib/types/Disadvantage.js +4 -1
  7. package/lib/types/Locale.d.ts +2 -2
  8. package/lib/types/Profession.js +10 -12
  9. package/lib/types/SkillModificationLevel.js +3 -3
  10. package/lib/types/_Activatable.d.ts +1 -1900
  11. package/lib/types/_Activatable.js +1 -1392
  12. package/lib/types/_ActivatableAdvanced.d.ts +50 -0
  13. package/lib/types/_ActivatableAdvanced.js +97 -0
  14. package/lib/types/_ActivatableAdventurePointsValue.d.ts +152 -0
  15. package/lib/types/_ActivatableAdventurePointsValue.js +141 -0
  16. package/lib/types/_ActivatableAutomatic.d.ts +71 -0
  17. package/lib/types/_ActivatableAutomatic.js +64 -0
  18. package/lib/types/_ActivatableCombat.d.ts +124 -0
  19. package/lib/types/_ActivatableCombat.js +359 -0
  20. package/lib/types/_ActivatableNonMundane.d.ts +399 -0
  21. package/lib/types/_ActivatableNonMundane.js +492 -0
  22. package/lib/types/_ActivatableSelectOptions.d.ts +1197 -0
  23. package/lib/types/_ActivatableSelectOptions.js +272 -0
  24. package/lib/types/_ActivatableSkillApplicationsAndUses.d.ts +109 -0
  25. package/lib/types/_ActivatableSkillApplicationsAndUses.js +78 -0
  26. package/lib/types/_Enhancements.js +2 -2
  27. package/lib/types/_Identifier.js +2 -1
  28. package/lib/types/_MathExpression.d.ts +1 -1
  29. package/lib/types/_SizeCategory.d.ts +15 -0
  30. package/lib/types/_SizeCategory.js +24 -0
  31. package/lib/types/equipment/item/_Item.js +1 -1
  32. package/lib/types/magicalActions/_MusicTradition.d.ts +1 -1
  33. package/lib/types/specialAbility/AdvancedCombatSpecialAbility.d.ts +67 -1
  34. package/lib/types/specialAbility/AdvancedCombatSpecialAbility.js +5 -1
  35. package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.d.ts +66 -1
  36. package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.js +4 -1
  37. package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.d.ts +66 -1
  38. package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.js +4 -1
  39. package/lib/types/specialAbility/AdvancedSkillSpecialAbility.d.ts +66 -1
  40. package/lib/types/specialAbility/AdvancedSkillSpecialAbility.js +4 -1
  41. package/lib/types/specialAbility/AncestorGlyph.d.ts +66 -1
  42. package/lib/types/specialAbility/AncestorGlyph.js +3 -1
  43. package/lib/types/specialAbility/BlessedTradition.d.ts +66 -1
  44. package/lib/types/specialAbility/BlessedTradition.js +4 -1
  45. package/lib/types/specialAbility/BrawlingSpecialAbility.d.ts +67 -1
  46. package/lib/types/specialAbility/BrawlingSpecialAbility.js +4 -1
  47. package/lib/types/specialAbility/CeremonialItemSpecialAbility.d.ts +66 -1
  48. package/lib/types/specialAbility/CeremonialItemSpecialAbility.js +6 -2
  49. package/lib/types/specialAbility/CombatSpecialAbility.d.ts +67 -1
  50. package/lib/types/specialAbility/CombatSpecialAbility.js +5 -1
  51. package/lib/types/specialAbility/CombatStyleSpecialAbility.d.ts +67 -1
  52. package/lib/types/specialAbility/CombatStyleSpecialAbility.js +6 -1
  53. package/lib/types/specialAbility/CommandSpecialAbility.d.ts +67 -1
  54. package/lib/types/specialAbility/CommandSpecialAbility.js +4 -1
  55. package/lib/types/specialAbility/FamiliarSpecialAbility.d.ts +66 -1
  56. package/lib/types/specialAbility/FamiliarSpecialAbility.js +3 -1
  57. package/lib/types/specialAbility/FatePointSexSpecialAbility.d.ts +66 -1
  58. package/lib/types/specialAbility/FatePointSexSpecialAbility.js +3 -1
  59. package/lib/types/specialAbility/FatePointSpecialAbility.d.ts +66 -1
  60. package/lib/types/specialAbility/FatePointSpecialAbility.js +4 -1
  61. package/lib/types/specialAbility/GeneralSpecialAbility.d.ts +66 -1
  62. package/lib/types/specialAbility/GeneralSpecialAbility.js +4 -1
  63. package/lib/types/specialAbility/KarmaSpecialAbility.d.ts +66 -1
  64. package/lib/types/specialAbility/KarmaSpecialAbility.js +3 -1
  65. package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.d.ts +66 -1
  66. package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.js +5 -1
  67. package/lib/types/specialAbility/LycantropicGift.d.ts +66 -1
  68. package/lib/types/specialAbility/LycantropicGift.js +3 -1
  69. package/lib/types/specialAbility/MagicStyleSpecialAbility.d.ts +66 -1
  70. package/lib/types/specialAbility/MagicStyleSpecialAbility.js +5 -1
  71. package/lib/types/specialAbility/MagicalSign.d.ts +2 -1
  72. package/lib/types/specialAbility/MagicalSign.js +8 -2
  73. package/lib/types/specialAbility/MagicalSpecialAbility.d.ts +66 -1
  74. package/lib/types/specialAbility/MagicalSpecialAbility.js +4 -1
  75. package/lib/types/specialAbility/MagicalTradition.d.ts +66 -1
  76. package/lib/types/specialAbility/MagicalTradition.js +4 -1
  77. package/lib/types/specialAbility/PactGift.d.ts +128 -62
  78. package/lib/types/specialAbility/PactGift.js +6 -61
  79. package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.d.ts +66 -1
  80. package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.js +3 -1
  81. package/lib/types/specialAbility/Sermon.d.ts +66 -1
  82. package/lib/types/specialAbility/Sermon.js +3 -1
  83. package/lib/types/specialAbility/SexSpecialAbility.d.ts +66 -1
  84. package/lib/types/specialAbility/SexSpecialAbility.js +4 -1
  85. package/lib/types/specialAbility/SikaryanDrainSpecialAbility.d.ts +66 -1
  86. package/lib/types/specialAbility/SikaryanDrainSpecialAbility.js +3 -1
  87. package/lib/types/specialAbility/SkillStyleSpecialAbility.d.ts +66 -1
  88. package/lib/types/specialAbility/SkillStyleSpecialAbility.js +4 -1
  89. package/lib/types/specialAbility/VampiricGift.d.ts +66 -1
  90. package/lib/types/specialAbility/VampiricGift.js +3 -1
  91. package/lib/types/specialAbility/Vision.d.ts +66 -1
  92. package/lib/types/specialAbility/Vision.js +3 -1
  93. package/lib/types/specialAbility/sub/TradeSecret.js +2 -1
  94. package/lib/types/traditionArtifacts/ArcaneOrbEnchantment.d.ts +66 -1
  95. package/lib/types/traditionArtifacts/ArcaneOrbEnchantment.js +5 -2
  96. package/lib/types/traditionArtifacts/AttireEnchantment.d.ts +66 -1
  97. package/lib/types/traditionArtifacts/AttireEnchantment.js +5 -2
  98. package/lib/types/traditionArtifacts/BowlEnchantment.d.ts +66 -1
  99. package/lib/types/traditionArtifacts/BowlEnchantment.js +5 -2
  100. package/lib/types/traditionArtifacts/CauldronEnchantment.d.ts +66 -1
  101. package/lib/types/traditionArtifacts/CauldronEnchantment.js +5 -2
  102. package/lib/types/traditionArtifacts/ChronicleEnchantment.d.ts +66 -1
  103. package/lib/types/traditionArtifacts/ChronicleEnchantment.js +5 -2
  104. package/lib/types/traditionArtifacts/DaggerRitual.d.ts +66 -1
  105. package/lib/types/traditionArtifacts/DaggerRitual.js +5 -2
  106. package/lib/types/traditionArtifacts/FoolsHatEnchantment.d.ts +66 -1
  107. package/lib/types/traditionArtifacts/FoolsHatEnchantment.js +5 -2
  108. package/lib/types/traditionArtifacts/InstrumentEnchantment.d.ts +66 -1
  109. package/lib/types/traditionArtifacts/InstrumentEnchantment.js +5 -2
  110. package/lib/types/traditionArtifacts/Krallenkettenzauber.d.ts +66 -1
  111. package/lib/types/traditionArtifacts/Krallenkettenzauber.js +5 -2
  112. package/lib/types/traditionArtifacts/OrbEnchantment.d.ts +66 -1
  113. package/lib/types/traditionArtifacts/OrbEnchantment.js +5 -2
  114. package/lib/types/traditionArtifacts/RingEnchantment.d.ts +66 -1
  115. package/lib/types/traditionArtifacts/RingEnchantment.js +5 -2
  116. package/lib/types/traditionArtifacts/SickleRitual.d.ts +66 -1
  117. package/lib/types/traditionArtifacts/SickleRitual.js +5 -2
  118. package/lib/types/traditionArtifacts/SpellSwordEnchantment.d.ts +66 -1
  119. package/lib/types/traditionArtifacts/SpellSwordEnchantment.js +5 -2
  120. package/lib/types/traditionArtifacts/StaffEnchantment.d.ts +66 -1
  121. package/lib/types/traditionArtifacts/StaffEnchantment.js +5 -2
  122. package/lib/types/traditionArtifacts/ToyEnchantment.d.ts +66 -1
  123. package/lib/types/traditionArtifacts/ToyEnchantment.js +5 -2
  124. package/lib/types/traditionArtifacts/Trinkhornzauber.d.ts +66 -1
  125. package/lib/types/traditionArtifacts/Trinkhornzauber.js +5 -2
  126. package/lib/types/traditionArtifacts/WandEnchantment.d.ts +66 -1
  127. package/lib/types/traditionArtifacts/WandEnchantment.js +5 -2
  128. package/lib/types/traditionArtifacts/WeaponEnchantment.d.ts +66 -1
  129. package/lib/types/traditionArtifacts/WeaponEnchantment.js +5 -2
  130. package/package.json +12 -4
@@ -0,0 +1,492 @@
1
+ import { Array, Boolean, Enum, EnumCase, IncludeIdentifier, Integer, Object, Optional, Required, String, TypeAlias, } from "tsondb/schema/def";
2
+ import { NestedTranslationMap } from "./Locale.js";
3
+ import { DurationUnitValue } from "./_ActivatableSkillDuration.js";
4
+ import { AspectIdentifier, PropertyIdentifier } from "./_Identifier.js";
5
+ import { VolumePointsOptionReferenceIdentifier } from "./_IdentifierGroup.js";
6
+ import { ResponsiveText, ResponsiveTextOptional } from "./_ResponsiveText.js";
7
+ const EnchantmentCost = Enum(import.meta.url, {
8
+ name: "EnchantmentCost",
9
+ values: () => ({
10
+ ArcaneEnergyCost: EnumCase({ type: IncludeIdentifier(ArcaneEnergyCost) }),
11
+ BindingCost: EnumCase({ type: IncludeIdentifier(BindingCost) }),
12
+ }),
13
+ });
14
+ export const cost = Optional({
15
+ comment: "The cost when casting the entry.",
16
+ type: IncludeIdentifier(EnchantmentCost),
17
+ });
18
+ export const ArcaneEnergyCost = Enum(import.meta.url, {
19
+ name: "ArcaneEnergyCost",
20
+ comment: "The AE cost.",
21
+ values: () => ({
22
+ Fixed: EnumCase({ type: IncludeIdentifier(FixedArcaneEnergyCost) }),
23
+ PerCountable: EnumCase({ type: IncludeIdentifier(ArcaneEnergyCostPerCountable) }),
24
+ Interval: EnumCase({ type: IncludeIdentifier(IntervalArcaneEnergyCost) }),
25
+ ActivationAndHalfInterval: EnumCase({
26
+ type: IncludeIdentifier(ActivationAndHalfIntervalArcaneEnergyCost),
27
+ }),
28
+ Indefinite: EnumCase({ type: IncludeIdentifier(IndefiniteArcaneEnergyCost) }),
29
+ Disjunction: EnumCase({ type: IncludeIdentifier(ArcaneEnergyCostDisjunction) }),
30
+ Variable: EnumCase({ type: null }),
31
+ }),
32
+ });
33
+ export const aeCost = Optional({
34
+ comment: "The AE cost.",
35
+ isDeprecated: true,
36
+ type: String({ minLength: 1 }),
37
+ });
38
+ const FixedArcaneEnergyCost = TypeAlias(import.meta.url, {
39
+ name: "FixedArcaneEnergyCost",
40
+ type: () => Object({
41
+ value: Required({
42
+ comment: "The AE cost value.",
43
+ type: Integer({ minimum: 1 }),
44
+ }),
45
+ is_permanent: Optional({
46
+ comment: "Set to `true` if the AE costs are permanent.",
47
+ type: Boolean(),
48
+ }),
49
+ interval: Optional({
50
+ comment: "Specified if the AE cost `value` has to be paid for each time interval.",
51
+ type: IncludeIdentifier(DurationUnitValue),
52
+ }),
53
+ per_level: Optional({
54
+ comment: "The AE cost are per level of the enchantment. It may either be displayed in a compressed way (e.g. `1 AE per level`) or in a verbose way (e.g. `1 AE for level I; 2 AE for level II`).",
55
+ type: IncludeIdentifier(FixedArcaneEnergyCostPerLevel),
56
+ }),
57
+ translations: NestedTranslationMap(Optional, "FixedArcaneEnergyCost", Object({
58
+ note: Optional({
59
+ comment: "A note, appended to the generated option string in parenthesis.",
60
+ type: IncludeIdentifier(ResponsiveTextOptional),
61
+ }),
62
+ }, { minProperties: 1 })),
63
+ }),
64
+ });
65
+ const FixedArcaneEnergyCostPerLevel = Enum(import.meta.url, {
66
+ name: "FixedArcaneEnergyCostPerLevel",
67
+ comment: "The AE cost are per level of the enchantment. It may either be displayed in a compressed way (e.g. `1 AE per level`) or in a verbose way (e.g. `1 AE for level I; 2 AE for level II`).",
68
+ values: () => ({
69
+ Compressed: EnumCase({ type: null }),
70
+ Verbose: EnumCase({ type: null }),
71
+ }),
72
+ });
73
+ const ArcaneEnergyCostPerCountable = TypeAlias(import.meta.url, {
74
+ name: "ArcaneEnergyCostPerCountable",
75
+ type: () => Object({
76
+ value: Required({
77
+ comment: "The AE cost value that has to be per a specific countable entity.",
78
+ type: Integer({ minimum: 1 }),
79
+ }),
80
+ base_value: Optional({
81
+ comment: "If defined, in addition to the cost per entity you have to pay a flat amount, regardless of the entity count.",
82
+ type: Integer({ minimum: 1 }),
83
+ }),
84
+ translations: NestedTranslationMap(Required, "ArcaneEnergyCostPerCountable", Object({
85
+ per: Required({
86
+ comment: "The cost have to be per a specific countable entity, e.g. `8 AE per person`.",
87
+ type: IncludeIdentifier(ResponsiveText),
88
+ }),
89
+ note: Optional({
90
+ comment: "A note, appended to the generated string in parenthesis.",
91
+ type: IncludeIdentifier(ResponsiveTextOptional),
92
+ }),
93
+ })),
94
+ }),
95
+ });
96
+ const IntervalArcaneEnergyCost = TypeAlias(import.meta.url, {
97
+ name: "IntervalArcaneEnergyCost",
98
+ type: () => Object({
99
+ value: Required({
100
+ comment: "The AE cost value that has to be payed each interval.",
101
+ type: Integer({ minimum: 1 }),
102
+ }),
103
+ interval: Required({
104
+ comment: "The time interval for which the AE cost `value` has to be paid.",
105
+ type: IncludeIdentifier(DurationUnitValue),
106
+ }),
107
+ }),
108
+ });
109
+ const ActivationAndHalfIntervalArcaneEnergyCost = TypeAlias(import.meta.url, {
110
+ name: "ActivationAndHalfIntervalArcaneEnergyCost",
111
+ type: () => Object({
112
+ value: Required({
113
+ comment: "The AE cost value that has to be payed for activation. Half of this value has to be payed each interval.",
114
+ type: Integer({ minimum: 2, multipleOf: 2 }),
115
+ }),
116
+ interval: Required({
117
+ comment: "The time interval for which the AE cost `value` has to be paid.",
118
+ type: IncludeIdentifier(DurationUnitValue),
119
+ }),
120
+ }),
121
+ });
122
+ const IndefiniteArcaneEnergyCost = TypeAlias(import.meta.url, {
123
+ name: "IndefiniteArcaneEnergyCost",
124
+ type: () => Object({
125
+ modifier: Optional({
126
+ comment: "Specified if the indefinite AP cost description needs to be modified by a certain value.",
127
+ type: IncludeIdentifier(IndefiniteArcaneEnergyCostModifier),
128
+ }),
129
+ translations: NestedTranslationMap(Required, "IndefiniteArcaneEnergyCost", Object({
130
+ description: Required({
131
+ comment: "A description of where the cost come from.",
132
+ type: IncludeIdentifier(ResponsiveText),
133
+ }),
134
+ })),
135
+ }),
136
+ });
137
+ const IndefiniteArcaneEnergyCostModifier = TypeAlias(import.meta.url, {
138
+ name: "IndefiniteArcaneEnergyCostModifier",
139
+ type: () => Object({
140
+ arithmetic: Required({
141
+ comment: "The arithmetic how to apply the `value` to the `base`.",
142
+ type: IncludeIdentifier(IndefiniteArcaneEnergyCostModifierArithmetic),
143
+ }),
144
+ value: Required({
145
+ comment: "The value that is applied to the `base` using the defined `arithmetic`.",
146
+ type: Integer({ minimum: 1 }),
147
+ }),
148
+ }),
149
+ });
150
+ const IndefiniteArcaneEnergyCostModifierArithmetic = Enum(import.meta.url, {
151
+ name: "IndefiniteArcaneEnergyCostModifierArithmetic",
152
+ values: () => ({
153
+ Add: EnumCase({ type: null }),
154
+ }),
155
+ });
156
+ const ArcaneEnergyCostDisjunction = TypeAlias(import.meta.url, {
157
+ name: "ArcaneEnergyCostDisjunction",
158
+ type: () => Object({
159
+ interval: Optional({
160
+ comment: "Specified if the selected AE cost option has to be paid for each time interval.",
161
+ type: IncludeIdentifier(ArcaneEnergyCostDisjunctionInterval),
162
+ }),
163
+ options: Required({
164
+ comment: "The possible AE cost values.",
165
+ type: Array(IncludeIdentifier(ArcaneEnergyCostDisjunctionOption), { minItems: 1 }),
166
+ }),
167
+ }),
168
+ });
169
+ const ArcaneEnergyCostDisjunctionInterval = TypeAlias(import.meta.url, {
170
+ name: "ArcaneEnergyCostDisjunctionInterval",
171
+ type: () => Object({
172
+ value: Required({
173
+ comment: "The interval itself.",
174
+ type: IncludeIdentifier(DurationUnitValue),
175
+ }),
176
+ activation_value: Required({
177
+ comment: "The AE cost value for activation.",
178
+ type: Integer({ minimum: 1 }),
179
+ }),
180
+ after_activation: Required({
181
+ comment: `Set to \`true\` if the action where the enchantment is casted does not as a part of the first interval that has to be payed, so that the first interval payment needs to be done after the activation.
182
+
183
+ This works different than other sustained spells, since for them the end of the cast usually already counts as part of the first interval.`,
184
+ type: Boolean(),
185
+ }),
186
+ }),
187
+ });
188
+ const ArcaneEnergyCostDisjunctionOption = TypeAlias(import.meta.url, {
189
+ name: "ArcaneEnergyCostDisjunctionOption",
190
+ type: () => Object({
191
+ value: Required({
192
+ comment: "A possible AE cost value.",
193
+ type: Integer({ minimum: 1 }),
194
+ }),
195
+ translations: NestedTranslationMap(Optional, "ArcaneEnergyCostDisjunctionOption", Object({
196
+ note: Optional({
197
+ comment: "A note, appended to the generated option string in parenthesis.",
198
+ type: IncludeIdentifier(ResponsiveTextOptional),
199
+ }),
200
+ }, { minProperties: 1 })),
201
+ }),
202
+ });
203
+ const Volume = Enum(import.meta.url, {
204
+ name: "Volume",
205
+ comment: "The volume points the enchantment needs.",
206
+ values: () => ({
207
+ Fixed: EnumCase({ type: IncludeIdentifier(FixedVolume) }),
208
+ PerLevel: EnumCase({ type: IncludeIdentifier(VolumePerLevel) }),
209
+ ByLevel: EnumCase({ type: IncludeIdentifier(VolumeByLevel) }),
210
+ Map: EnumCase({ type: IncludeIdentifier(VolumeMap) }),
211
+ DerivedFromSelection: EnumCase({ type: IncludeIdentifier(VolumeDerivedFromSelection) }),
212
+ }),
213
+ });
214
+ export const volume = Required({
215
+ comment: "The volume points the enchantment needs.",
216
+ type: IncludeIdentifier(Volume),
217
+ });
218
+ export const volume_l10n = Optional({
219
+ comment: "The volume points the enchantment needs.",
220
+ isDeprecated: true,
221
+ type: String({ minLength: 1 }),
222
+ });
223
+ const FixedVolume = TypeAlias(import.meta.url, {
224
+ name: "FixedVolume",
225
+ type: () => Object({
226
+ points: Required({
227
+ comment: "The volume points.",
228
+ type: Integer({ minimum: 0 }),
229
+ }),
230
+ }),
231
+ });
232
+ const VolumePerLevel = TypeAlias(import.meta.url, {
233
+ name: "VolumePerLevel",
234
+ type: () => Object({
235
+ points: Required({
236
+ comment: "The volume points per level.",
237
+ type: Integer({ minimum: 1 }),
238
+ }),
239
+ }),
240
+ });
241
+ const VolumeByLevel = TypeAlias(import.meta.url, {
242
+ name: "VolumeByLevel",
243
+ type: () => Object({
244
+ list: Required({
245
+ comment: "The volume points for each level. The first element is the volume points for the first level, the second element is the volume points for the second level, and so on.",
246
+ type: Array(IncludeIdentifier(VolumeByLevelItem), { minItems: 2 }),
247
+ }),
248
+ }),
249
+ });
250
+ const VolumeByLevelItem = TypeAlias(import.meta.url, {
251
+ name: "VolumeByLevelItem",
252
+ type: () => Object({
253
+ points: Required({
254
+ comment: "The volume points for this level.",
255
+ type: Integer({ minimum: 0 }),
256
+ }),
257
+ }),
258
+ });
259
+ const VolumeMap = TypeAlias(import.meta.url, {
260
+ name: "VolumeMap",
261
+ comment: `A content that is \`3/4/5 Points for Chimera, Daimonid, Golems, Undead / Fairies, Ghosts / Demons, Elementals\` may be respresented as the following map:
262
+
263
+ \`\`\`yaml
264
+ options:
265
+ - points: 3
266
+ associated_options:
267
+ - id:
268
+ tag: General
269
+ value: # ...
270
+ # ...
271
+ translations:
272
+ en-US:
273
+ label: "Chimera, Daimonid, Golems, Undead"
274
+ label_standalone: "Chimera/Daimonid/Golems/Undead"
275
+ - points: 4
276
+ associated_options:
277
+ - id:
278
+ tag: General
279
+ value: # ...
280
+ # ...
281
+ translations:
282
+ en-US:
283
+ label: "Fairies, Ghosts"
284
+ label_standalone: "Fairies/Ghosts"
285
+ - points: 5
286
+ associated_options:
287
+ - id:
288
+ tag: General
289
+ value: # ...
290
+ # ...
291
+ translations:
292
+ en-US:
293
+ label: "Demons, Elementals"
294
+ label_standalone: "Demons/Elementals"
295
+ \`\`\`
296
+
297
+ This will generate the exact same string as seen above. The associated options are not present in the example, but they link to the options the volume specification is meant for.`,
298
+ type: () => Object({
299
+ options: Required({
300
+ comment: "The possible costs and associated labels.",
301
+ type: Array(IncludeIdentifier(VolumeMapOption), { minItems: 2 }),
302
+ }),
303
+ translations: NestedTranslationMap(Optional, "VolumeMap", Object({
304
+ list_prepend: Optional({
305
+ comment: "Place a string between the `for` and the grouped map option labels.",
306
+ type: IncludeIdentifier(ResponsiveTextOptional),
307
+ }),
308
+ list_append: Optional({
309
+ comment: "Place a string after the grouped map option labels.",
310
+ type: IncludeIdentifier(ResponsiveTextOptional),
311
+ }),
312
+ replacement: Optional({
313
+ 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.",
314
+ type: IncludeIdentifier(ResponsiveTextOptional),
315
+ }),
316
+ }, { minProperties: 1 })),
317
+ }),
318
+ });
319
+ const VolumeMapOption = TypeAlias(import.meta.url, {
320
+ name: "VolumeMapOption",
321
+ type: () => Object({
322
+ points: Required({
323
+ comment: "The full permanent AE cost value for this option.",
324
+ type: Integer({ minimum: 1 }),
325
+ }),
326
+ associated_options: Required({
327
+ comment: "Links to the options this volume specification is meant for.",
328
+ type: Array(IncludeIdentifier(VolumeMapOptionAssociatedOption), { minItems: 1 }),
329
+ }),
330
+ translations: NestedTranslationMap(Optional, "VolumeMapOption", Object({
331
+ label: Required({
332
+ comment: "The description of the option for cost string generation.",
333
+ type: IncludeIdentifier(ResponsiveTextOptional),
334
+ }),
335
+ label_standalone: Optional({
336
+ comment: "The description of the option if used standalone. Only used if different from `label`.",
337
+ type: IncludeIdentifier(ResponsiveTextOptional),
338
+ }),
339
+ }, { minProperties: 1 })),
340
+ }),
341
+ });
342
+ const VolumeMapOptionAssociatedOption = TypeAlias(import.meta.url, {
343
+ name: "VolumeMapOptionAssociatedOption",
344
+ type: () => Object({
345
+ id: Required({
346
+ comment: "The option’s identifier.",
347
+ type: IncludeIdentifier(VolumePointsOptionReferenceIdentifier),
348
+ }),
349
+ }),
350
+ });
351
+ const VolumeDerivedFromSelection = TypeAlias(import.meta.url, {
352
+ name: "VolumeDerivedFromSelection",
353
+ type: () => Object({
354
+ fallback: Required({
355
+ comment: "The volume for the selection if it does not define a specific one.",
356
+ type: Integer({ minimum: 0 }),
357
+ }),
358
+ }),
359
+ });
360
+ export const BindingCost = Enum(import.meta.url, {
361
+ name: "BindingCost",
362
+ comment: "The binding cost for an enchantment.",
363
+ values: () => ({
364
+ Fixed: EnumCase({ type: IncludeIdentifier(FixedBindingCost) }),
365
+ PerLevel: EnumCase({ type: IncludeIdentifier(BindingCostPerLevel) }),
366
+ Map: EnumCase({ type: IncludeIdentifier(BindingCostMap) }),
367
+ DerivedFromSelection: EnumCase({ type: IncludeIdentifier(BindingCostDerivedFromSelection) }),
368
+ }),
369
+ });
370
+ export const bindingCost = Optional({
371
+ comment: "The binding cost for an enchantment.",
372
+ isDeprecated: true,
373
+ type: String({ minLength: 1 }),
374
+ });
375
+ const FixedBindingCost = TypeAlias(import.meta.url, {
376
+ name: "FixedBindingCost",
377
+ type: () => Object({
378
+ permanent_value: Required({
379
+ comment: `The permanent AE cost.
380
+
381
+ If the enchantment has multiple levels, it is only applied for the first level.`,
382
+ type: Integer({ minimum: 1 }),
383
+ }),
384
+ }),
385
+ });
386
+ const BindingCostPerLevel = TypeAlias(import.meta.url, {
387
+ name: "BindingCostPerLevel",
388
+ type: () => Object({
389
+ permanent_value: Required({
390
+ comment: "The permanent AE cost per level.",
391
+ type: Integer({ minimum: 1 }),
392
+ }),
393
+ }),
394
+ });
395
+ const BindingCostMap = TypeAlias(import.meta.url, {
396
+ name: "BindingCostMap",
397
+ comment: `A content that is \`2/4/8 permanent AE for spell-swords with the combat technique Daggers, Swords, or Two-Handed Swords\` may be respresented as the following map:
398
+
399
+ \`\`\`yaml
400
+ options:
401
+ - permanent_value: 2
402
+ translations:
403
+ en-US:
404
+ label: "Daggers"
405
+ label_standalone: "Dagger"
406
+ - permanent_value: 4
407
+ translations:
408
+ en-US:
409
+ label: "Swords"
410
+ label_standalone: "Sword"
411
+ - permanent_value: 8
412
+ translations:
413
+ en-US:
414
+ label: "Two-Handed Swords"
415
+ label_standalone: "Two-Handed Sword"
416
+ list_prepend: "spell-swords with the combat technique"
417
+ \`\`\`
418
+
419
+ This will generate the exact same string as seen above.`,
420
+ type: () => Object({
421
+ options: Required({
422
+ comment: "The possible costs and associated labels.",
423
+ type: Array(IncludeIdentifier(BindingCostMapOption), { minItems: 2 }),
424
+ }),
425
+ translations: NestedTranslationMap(Optional, "BindingCostMap", Object({
426
+ list_prepend: Optional({
427
+ comment: "Place a string between the `for` and the grouped map option labels.",
428
+ type: IncludeIdentifier(ResponsiveTextOptional),
429
+ }),
430
+ list_append: Optional({
431
+ comment: "Place a string after the grouped map option labels.",
432
+ type: IncludeIdentifier(ResponsiveTextOptional),
433
+ }),
434
+ replacement: Optional({
435
+ 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.",
436
+ type: IncludeIdentifier(ResponsiveTextOptional),
437
+ }),
438
+ }, { minProperties: 1 })),
439
+ }),
440
+ });
441
+ const BindingCostMapOption = TypeAlias(import.meta.url, {
442
+ name: "BindingCostMapOption",
443
+ type: () => Object({
444
+ permanent_value: Required({
445
+ comment: "The full permanent AE cost value for this option.",
446
+ type: Integer({ minimum: 1 }),
447
+ }),
448
+ translations: NestedTranslationMap(Optional, "BindingCostMapOption", Object({
449
+ label: Required({
450
+ comment: "The description of the option for cost string generation.",
451
+ type: IncludeIdentifier(ResponsiveTextOptional),
452
+ }),
453
+ label_standalone: Optional({
454
+ comment: "The description of the option if used standalone. Only used if different from `label`.",
455
+ type: IncludeIdentifier(ResponsiveTextOptional),
456
+ }),
457
+ })),
458
+ }),
459
+ });
460
+ const BindingCostDerivedFromSelection = TypeAlias(import.meta.url, {
461
+ name: "BindingCostDerivedFromSelection",
462
+ type: () => Object({
463
+ fallback: Required({
464
+ comment: "The binding cost for the selection if it does not define a specific one.",
465
+ type: Integer({ minimum: 0 }),
466
+ }),
467
+ }),
468
+ });
469
+ const PropertyDeclaration = Enum(import.meta.url, {
470
+ name: "PropertyDeclaration",
471
+ comment: "The magic property’s identifier. `DependingOnProperty` can only be used if the special ability has an option to select a property.",
472
+ values: () => ({
473
+ DependingOnSelection: EnumCase({ type: null }),
474
+ Fixed: EnumCase({ type: PropertyIdentifier() }),
475
+ }),
476
+ });
477
+ export const property = () => Required({
478
+ comment: "The magic property’s identifier. `DependingOnProperty` can only be used if the special ability has an option to select a property.",
479
+ type: IncludeIdentifier(PropertyDeclaration),
480
+ });
481
+ export const propertyOptional = () => Optional({
482
+ comment: "The magic property’s identifier. `DependingOnProperty` can only be used if the special ability has an option to select a property.",
483
+ type: IncludeIdentifier(PropertyDeclaration),
484
+ });
485
+ export const aspect = () => Required({
486
+ comment: "The blessed aspect.",
487
+ type: AspectIdentifier(),
488
+ });
489
+ export const aspectOptional = () => Optional({
490
+ comment: "The blessed aspect.",
491
+ type: AspectIdentifier(),
492
+ });