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
@@ -1,18 +1,7 @@
1
1
  /**
2
2
  * General type specifications used by multiple activatable entries.
3
3
  */
4
- import { Array, Boolean, ChildEntities, Entity, Enum, EnumCase, GenEnum, GenIncludeIdentifier, GenTypeAlias, IncludeIdentifier, Integer, Object, Optional, Param, Required, String, TypeAlias, TypeArgument, } from "tsondb/schema/def";
5
- import { NestedTranslationMap } from "./Locale.js";
6
- import { SelectOptionCategory } from "./_ActivatableSelectOptionCategory.js";
7
- import { DurationUnitValue } from "./_ActivatableSkillDuration.js";
8
- import { AspectIdentifier, CloseCombatTechniqueIdentifier, GeneralIdentifier, MagicalTraditionIdentifier, PatronIdentifier, PropertyIdentifier, RaceIdentifier, RangedCombatTechniqueIdentifier, SkillIdentifier, WeaponIdentifier, } from "./_Identifier.js";
9
- import { AdvancedSpecialAbilityRestrictedOptionIdentifier, CombatRelatedSpecialAbilityIdentifier, CombatTechniqueIdentifier, NewSkillApplicationOrUseParentIdentifier, SelectOptionParentIdentifier, VolumePointsOptionReferenceIdentifier, } from "./_IdentifierGroup.js";
10
- import { MathOperation } from "./_MathExpression.js";
11
- import { GeneralPrerequisites } from "./_Prerequisite.js";
12
- import { ResponsiveText, ResponsiveTextOptional } from "./_ResponsiveText.js";
13
- import { DisplayOption } from "./prerequisites/DisplayOption.js";
14
- import { Errata } from "./source/_Erratum.js";
15
- import { optionalSrc } from "./source/_PublicationRef.js";
4
+ import { Integer, Optional, Required, String } from "tsondb/schema/def";
16
5
  export const name = Required({
17
6
  comment: "Name of the activatable entry.",
18
7
  type: String({ minLength: 1 }),
@@ -35,267 +24,6 @@ export const maximum = Optional({
35
24
  The maximum is only set if it differs from the defaults specified above.`,
36
25
  type: Integer({ minimum: 1 }),
37
26
  });
38
- const SelectOptions = TypeAlias(import.meta.url, {
39
- name: "SelectOptions",
40
- comment: `Definitions for possible options for the activatable entry. They can either be derived from entry categories or be defined explicitly. Both can happen as well, but if there is an explicitly defined select option and a derived select option has the same identifier (which may only happen if skill or combat technique identifiers are used for explicit select options), the explicit definition overwrites the derived option.
41
-
42
- Note that this is only a full definition of options for simple logic that can be made explicit using the more detailed configuration for both derived categories and explicit options. There are quite a few entries whose option logic cannot be fully represented here, so that it needs to be implemented manually.`,
43
- type: () => Object({
44
- derived: Optional({
45
- comment: `An entry category with optional further configuration. All available entries from the specified categories will be included as separate select options. You can also specify a set of groups that should only be included. Groups not mentioned will be excluded then.`,
46
- type: IncludeIdentifier(SelectOptionCategory),
47
- }),
48
- }, { minProperties: 1 }),
49
- });
50
- export const select_options = Optional({
51
- comment: `Definitions for possible options for the activatable entry, derived from entry categories.
52
-
53
- Note that this is only a full definition of options for simple logic that can be made explicit using the more detailed configuration for both derived categories and explicit options. There are quite a few entries whose option logic cannot be fully represented here, so that it needs to be implemented manually.`,
54
- type: IncludeIdentifier(SelectOptions),
55
- });
56
- export const ExplicitSelectOption = Enum(import.meta.url, {
57
- name: "ExplicitSelectOption",
58
- values: () => ({
59
- General: EnumCase({ type: GeneralIdentifier() }),
60
- Skill: EnumCase({ type: IncludeIdentifier(ExplicitSkillSelectOption) }),
61
- CombatTechnique: EnumCase({ type: IncludeIdentifier(ExplicitCombatTechniqueSelectOption) }),
62
- }),
63
- });
64
- export const GeneralSelectOption = Entity(import.meta.url, {
65
- name: "GeneralSelectOption",
66
- namePlural: "GeneralSelectOptions",
67
- type: () => Object({
68
- parent: Required({
69
- comment: "The entry that contains select option.",
70
- type: IncludeIdentifier(SelectOptionParentIdentifier),
71
- }),
72
- profession_only: Optional({
73
- comment: "Sometimes, professions use specific text selections that are not contained in described lists. This ensures you can use them for professions only. They are not going to be displayed as options to the user.",
74
- type: Boolean(),
75
- }),
76
- skill_applications: Required({
77
- comment: "Registers new applications, which get enabled once this entry is activated with its respective select option. It specifies an entry-unique identifier and the skill it belongs to. A translation can be left out if its name equals the name of the origin select option.",
78
- type: ChildEntities(NewSkillApplication),
79
- }),
80
- skill_uses: Required({
81
- comment: "Registers uses, which get enabled once this entry is activated with its respective select option. It specifies an entry-unique identifier and the skill it belongs to. A translation can be left out if its name equals the name of the origin select option.",
82
- type: ChildEntities(SkillUse),
83
- }),
84
- prerequisites: Optional({
85
- comment: "Prerequisites for the select option.",
86
- type: IncludeIdentifier(GeneralPrerequisites),
87
- }),
88
- binding_cost: Optional({
89
- comment: "Specific binding cost for the select option. Only has an effect if the associated entry supports binding costs.",
90
- type: Integer({ minimum: 0 }),
91
- }),
92
- ap_value: Optional({
93
- comment: "Specific AP cost for the select option.",
94
- type: Integer({ minimum: 1 }),
95
- }),
96
- src: optionalSrc,
97
- translations: NestedTranslationMap(Required, "GeneralSelectOption", Object({
98
- name: Required({
99
- comment: "The name of the select option.",
100
- type: String({ minLength: 1 }),
101
- }),
102
- name_in_profession: Optional({
103
- comment: "The name of the select option when displayed in a generated profession text.",
104
- type: String({ minLength: 1 }),
105
- }),
106
- description: Optional({
107
- comment: "The description of the select option. Useful for Bad Habits, Trade Secrets and other entries where a description is available.",
108
- type: String({ minLength: 1, isMarkdown: true }),
109
- }),
110
- errata: Optional({
111
- type: IncludeIdentifier(Errata),
112
- }),
113
- })),
114
- }),
115
- parentReferenceKey: "parent",
116
- displayName: {},
117
- displayNameCustomizer: ({ instance, instanceDisplayName, instanceDisplayNameLocaleId, getDisplayNameForInstanceId, }) => ({
118
- name: `${getDisplayNameForInstanceId(instance.parent[instance.parent.kind])?.name} — ${instanceDisplayName}`,
119
- localeId: instanceDisplayNameLocaleId,
120
- }),
121
- });
122
- export const explicit_select_options = Required({
123
- comment: `Explicit definitions for possible options for the activatable entry.
124
-
125
- Note that this is only a full definition of options for simple logic that can be made explicit using the more detailed configuration for both derived categories and explicit options. There are quite a few entries whose option logic cannot be fully represented here, so that it needs to be implemented manually.`,
126
- type: ChildEntities(GeneralSelectOption),
127
- });
128
- const ExplicitSkillSelectOption = TypeAlias(import.meta.url, {
129
- name: "ExplicitSkillSelectOption",
130
- type: () => Object({
131
- id: Required({
132
- comment: "The skill’s identifier.",
133
- type: SkillIdentifier(),
134
- }),
135
- prerequisites: Optional({
136
- comment: "Prerequisites for the select option.",
137
- type: IncludeIdentifier(GeneralPrerequisites),
138
- }),
139
- binding_cost: Optional({
140
- comment: "Specific binding cost for the select option. Only has an effect if the associated entry supports binding costs.",
141
- type: Integer({ minimum: 0 }),
142
- }),
143
- ap_value: Optional({
144
- comment: "Specific AP cost for the select option.",
145
- type: Integer({ minimum: 1 }),
146
- }),
147
- src: optionalSrc,
148
- translations: NestedTranslationMap(Optional, "ExplicitSkillSelectOption", Object({
149
- errata: Optional({
150
- type: IncludeIdentifier(Errata),
151
- }),
152
- }, { minProperties: 1 })),
153
- }),
154
- });
155
- const ExplicitCombatTechniqueSelectOption = TypeAlias(import.meta.url, {
156
- name: "ExplicitCombatTechniqueSelectOption",
157
- type: () => Object({
158
- id: Required({
159
- comment: "The combat technique’s identifier.",
160
- type: IncludeIdentifier(CombatTechniqueIdentifier),
161
- }),
162
- prerequisites: Optional({
163
- comment: "Prerequisites for the select option.",
164
- type: IncludeIdentifier(GeneralPrerequisites),
165
- }),
166
- binding_cost: Optional({
167
- comment: "Specific binding cost for the select option. Only has an effect if the associated entry supports binding costs.",
168
- type: Integer({ minimum: 0 }),
169
- }),
170
- ap_value: Optional({
171
- comment: "Specific AP cost for the select option.",
172
- type: Integer({ minimum: 1 }),
173
- }),
174
- src: optionalSrc,
175
- translations: NestedTranslationMap(Optional, "ExplicitCombatTechniqueSelectOption", Object({
176
- errata: Optional({
177
- type: IncludeIdentifier(Errata),
178
- }),
179
- }, { minProperties: 1 })),
180
- }),
181
- });
182
- // "Options": {
183
- // "$comment": "Unfinished generalized options handling.",
184
- // "type": "array",
185
- // "minItems": 1,
186
- // "items": {
187
- // "oneOf": [
188
- // {
189
- // "type": "object",
190
- // "properties": {
191
- // "type": { "const": "List" },
192
- // "value": {
193
- // "type": "object",
194
- // "properties": {
195
- // "list": {
196
- // "oneOf": [
197
- // {
198
- // "type": "object",
199
- // "properties": {
200
- // "type": { "const": "Generate" },
201
- // "value": { "$ref": "#/definitions/SelectOptionCategories" }
202
- // },
203
- // "required": ["type", "value"],
204
- // "additionalProperties": false
205
- // },
206
- // {
207
- // "type": "object",
208
- // "properties": {
209
- // "type": { "const": "Explicit" },
210
- // "value": { "$ref": "#/definitions/SelectOptions" }
211
- // },
212
- // "required": ["type", "value"],
213
- // "additionalProperties": false
214
- // }
215
- // ]
216
- // },
217
- // "multiple": {
218
- // "description": "Sometimes, multiple options from a single list have to or can be chosen. Its possible to define a number of options that have to be selected or a range of numbers of options that can be selected.",
219
- // "oneOf": [
220
- // {
221
- // "type": "object",
222
- // "properties": {
223
- // "type": { "const": "Fixed" },
224
- // "value": {
225
- // "description": "The number of options that have to be selected.",
226
- // "type": "integer",
227
- // "minimum": 2
228
- // }
229
- // },
230
- // "required": ["type", "value"],
231
- // "additionalProperties": false
232
- // },
233
- // {
234
- // "type": "object",
235
- // "properties": {
236
- // "type": { "const": "Range" },
237
- // "value": {
238
- // "type": "object",
239
- // "properties": {
240
- // "min": {
241
- // "description": "The minimum number of options that need to be selected. If left empty it defaults to 1.",
242
- // "type": "integer",
243
- // "minimum": 2
244
- // },
245
- // "max": {
246
- // "description": "The maximum number of options that need to be selected.",
247
- // "type": "integer",
248
- // "minimum": 2
249
- // }
250
- // },
251
- // "required": ["max"],
252
- // "additionalProperties": false
253
- // }
254
- // },
255
- // "required": ["type", "value"],
256
- // "additionalProperties": false
257
- // }
258
- // ]
259
- // }
260
- // },
261
- // "required": ["list"],
262
- // "additionalProperties": false
263
- // }
264
- // },
265
- // "required": ["type", "value"],
266
- // "additionalProperties": false
267
- // },
268
- // {
269
- // "type": "object",
270
- // "properties": {
271
- // "type": { "const": "TextInput" },
272
- // "value": {
273
- // "type": "object",
274
- // "properties": {
275
- // "label": {
276
- // "type": "object",
277
- // "description": "All translations for the entry, identified by IETF language tag (BCP47).",
278
- // "patternProperties": {
279
- // "^[a-z]{2}-[A-Z]{2}$": {
280
- // "description": "The text input label.",
281
- // "type": "string",
282
- // "minLength": 1
283
- // }
284
- // },
285
- // "minProperties": 1,
286
- // "additionalProperties": false
287
- // }
288
- // },
289
- // "required": ["label"],
290
- // "additionalProperties": false
291
- // }
292
- // },
293
- // "required": ["type", "value"],
294
- // "additionalProperties": false
295
- // }
296
- // ]
297
- // }
298
- // },
299
27
  export const rules = Required({
300
28
  comment: "The rule text.",
301
29
  type: String({ minLength: 1, isMarkdown: true }),
@@ -304,1130 +32,11 @@ export const effect = Required({
304
32
  comment: "The effect description.",
305
33
  type: String({ minLength: 1, isMarkdown: true }),
306
34
  });
307
- const CombatSpecialAbilityUsageType = Enum(import.meta.url, {
308
- name: "CombatSpecialAbilityUsageType",
309
- comment: "The definition of how the combat special ability can be used in combat.",
310
- values: () => ({
311
- Passive: EnumCase({ type: null }),
312
- BasicManeuver: EnumCase({ type: null }),
313
- SpecialManeuver: EnumCase({ type: null }),
314
- }),
315
- });
316
- export const usage_type = Required({
317
- comment: "The definition of how the combat special ability can be used in combat.",
318
- type: IncludeIdentifier(CombatSpecialAbilityUsageType),
319
- });
320
- const CombatSpecialAbilityType = Enum(import.meta.url, {
321
- name: "CombatSpecialAbilityType",
322
- comment: "The definition of if the combat special ability can be used when armed or when unarmed.",
323
- values: () => ({
324
- Armed: EnumCase({ type: null }),
325
- Unarmed: EnumCase({ type: null }),
326
- }),
327
- });
328
- export const type = Required({
329
- comment: "The definition of if the combat special ability can be used when armed or when unarmed.",
330
- type: IncludeIdentifier(CombatSpecialAbilityType),
331
- });
332
- export const NewSkillApplication = Entity(import.meta.url, {
333
- name: "NewSkillApplication",
334
- namePlural: "NewSkillApplications",
335
- comment: "Registers new skill applications, which get enabled once the referenced entry is activated. It specifies the skill(s) it belongs to. A translation can be left out if its name equals the name of the origin activatable entry.",
336
- type: () => Object({
337
- parent: Required({
338
- comment: "The entry that enables the new skill application.",
339
- type: IncludeIdentifier(NewSkillApplicationOrUseParentIdentifier),
340
- }),
341
- skills: Required({
342
- comment: "The skill(s) this application belongs to.",
343
- type: Array(SkillIdentifier(), { minItems: 1 }),
344
- }),
345
- required_skill_rating: Optional({
346
- comment: "If an application applies to multiple skills, it may need to ensure the respective skill is on a certain skill rating if the activatable entry cannot ensure this prerequisite.",
347
- type: Integer({ minimum: 1 }),
348
- }),
349
- translations: NestedTranslationMap(Optional, "NewSkillApplication", Object({
350
- name: Required({
351
- comment: "The name of the application if different from the activatable entry’s name.",
352
- type: String({ minLength: 1 }),
353
- }),
354
- })),
355
- }),
356
- parentReferenceKey: "parent",
357
- displayName: {},
358
- displayNameCustomizer: ({ instance, instanceDisplayName, instanceDisplayNameLocaleId, getDisplayNameForInstanceId, }) => ({
359
- name: `${instanceDisplayName ||
360
- getDisplayNameForInstanceId(instance.parent[instance.parent.kind])}`,
361
- localeId: instanceDisplayNameLocaleId,
362
- }),
363
- });
364
- export const skill_applications = Required({
365
- comment: "Registers new skill applications, which get enabled once this entry is activated. It specifies an entry-unique identifier and the skill it belongs to. A translation can be left out if its name equals the name of the origin activatable entry.",
366
- type: ChildEntities(NewSkillApplication),
367
- });
368
- export const SkillUse = Entity(import.meta.url, {
369
- name: "SkillUse",
370
- namePlural: "SkillUses",
371
- comment: "Registers uses, which get enabled once this entry is activated. It specifies the skill(s) it belongs to. A translation can be left out if its name equals the name of the origin activatable entry.",
372
- type: () => Object({
373
- parent: Required({
374
- comment: "The entry that enables the use.",
375
- type: IncludeIdentifier(NewSkillApplicationOrUseParentIdentifier),
376
- }),
377
- skills: Required({
378
- comment: "The skill(s) this use belongs to.",
379
- type: Array(SkillIdentifier(), { minItems: 1 }),
380
- }),
381
- required_skill_rating: Optional({
382
- comment: "If a use applies to multiple skills, it may need to ensure the respective skill is on a certain skill rating if the activatable entry cannot ensure this prerequisite.",
383
- type: Integer({ minimum: 1 }),
384
- }),
385
- translations: NestedTranslationMap(Optional, "SkillUse", Object({
386
- name: Required({
387
- comment: "The name of the use if different from the activatable entry’s name.",
388
- type: String({ minLength: 1 }),
389
- }),
390
- })),
391
- }),
392
- parentReferenceKey: "parent",
393
- displayName: {},
394
- displayNameCustomizer: ({ instance, instanceDisplayName, instanceDisplayNameLocaleId, getDisplayNameForInstanceId, }) => ({
395
- name: `${instanceDisplayName ||
396
- getDisplayNameForInstanceId(instance.parent[instance.parent.kind])}`,
397
- localeId: instanceDisplayNameLocaleId,
398
- }),
399
- });
400
- export const skill_uses = Required({
401
- comment: "Registers uses, which get enabled once this entry is activated. It specifies an entry-unique identifier and the skill it belongs to. A translation can be left out if its name equals the name of the origin activatable entry.",
402
- type: ChildEntities(SkillUse),
403
- });
404
- const Penalty = Enum(import.meta.url, {
405
- name: "Penalty",
406
- comment: "The penalty the special ability gives when used.",
407
- values: () => ({
408
- Single: EnumCase({ type: IncludeIdentifier(SinglePenalty) }),
409
- ByHandedness: EnumCase({ type: IncludeIdentifier(PenaltyByHandedness) }),
410
- ByActivation: EnumCase({ type: IncludeIdentifier(PenaltyByActivation) }),
411
- Selection: EnumCase({ type: IncludeIdentifier(PenaltySelection) }),
412
- ByLevel: EnumCase({ type: IncludeIdentifier(PenaltyByLevel) }),
413
- ByAttack: EnumCase({ type: IncludeIdentifier(PenaltyByAttack) }),
414
- DependsOnHitZone: EnumCase({ type: null }),
415
- }),
416
- });
417
35
  export const range_l10n = Optional({
418
36
  comment: "The range of the advantage.",
419
37
  isDeprecated: true,
420
38
  type: String({ minLength: 1 }),
421
39
  });
422
- export const penalty = Optional({
423
- comment: "The penalty the special ability gives when used.",
424
- type: IncludeIdentifier(Penalty),
425
- });
426
- export const penalty_l10n = Optional({
427
- comment: "The penalty the special ability gives when used.",
428
- isDeprecated: true,
429
- type: String({ minLength: 1 }),
430
- });
431
- const SinglePenalty = TypeAlias(import.meta.url, {
432
- name: "SinglePenalty",
433
- type: () => Object({
434
- value: Required({
435
- comment: "The penalty value.",
436
- type: Integer(),
437
- }),
438
- applies_to_parry: Optional({
439
- comment: "Set to `true` if the penalty applies to the parry instead of the attack.",
440
- type: Boolean(),
441
- }),
442
- }),
443
- });
444
- const PenaltyByHandedness = TypeAlias(import.meta.url, {
445
- name: "PenaltyByHandedness",
446
- type: () => Object({
447
- one_handed: Required({
448
- comment: "The penalty value for one-handed weapons.",
449
- type: Integer(),
450
- }),
451
- two_handed: Required({
452
- comment: "The penalty value for two-handed weapons.",
453
- type: Integer(),
454
- }),
455
- applies_to_parry: Optional({
456
- comment: "Set to `true` if the penalty applies to the parry instead of the attack.",
457
- type: Boolean(),
458
- }),
459
- }),
460
- });
461
- const PenaltyByActivation = TypeAlias(import.meta.url, {
462
- name: "PenaltyByActivation",
463
- type: () => Object({
464
- active: Required({
465
- comment: "The penalty value if the entry has been bought by the character.",
466
- type: Integer(),
467
- }),
468
- inactive: Required({
469
- comment: "The penalty value if the entry has not been bought by the character.",
470
- type: Integer(),
471
- }),
472
- applies_to_parry: Optional({
473
- comment: "Set to `true` if the penalty applies to the parry instead of the attack.",
474
- type: Boolean(),
475
- }),
476
- }),
477
- });
478
- const PenaltySelection = TypeAlias(import.meta.url, {
479
- name: "PenaltySelection",
480
- type: () => Object({
481
- options: Required({
482
- type: IncludeIdentifier(PenaltySelectionOptions),
483
- }),
484
- }),
485
- });
486
- const PenaltySelectionOptions = Enum(import.meta.url, {
487
- name: "PenaltySelectionOptions",
488
- values: () => ({
489
- Specific: EnumCase({ type: IncludeIdentifier(SpecificPenaltySelectionOptions) }),
490
- Range: EnumCase({ type: IncludeIdentifier(PenaltySelectionOptionsRange) }),
491
- }),
492
- });
493
- const SpecificPenaltySelectionOptions = TypeAlias(import.meta.url, {
494
- name: "SpecificPenaltySelectionOptions",
495
- type: () => Object({
496
- list: Required({
497
- comment: "The list of specific penalty options.",
498
- type: Array(IncludeIdentifier(SpecificPenaltySelectionOption), { minItems: 2 }),
499
- }),
500
- }),
501
- });
502
- const SpecificPenaltySelectionOption = TypeAlias(import.meta.url, {
503
- name: "SpecificPenaltySelectionOption",
504
- type: () => Object({
505
- value: Required({
506
- comment: "The penalty value.",
507
- type: Integer(),
508
- }),
509
- }),
510
- });
511
- const PenaltySelectionOptionsRange = TypeAlias(import.meta.url, {
512
- name: "PenaltySelectionOptionsRange",
513
- type: () => Object({
514
- minimum: Required({
515
- comment: "The minimum penalty value.",
516
- type: Integer(),
517
- }),
518
- maximum: Required({
519
- comment: "The maximum penalty value.",
520
- type: Integer(),
521
- }),
522
- }),
523
- });
524
- const PenaltyByLevel = TypeAlias(import.meta.url, {
525
- name: "PenaltyByLevel",
526
- type: () => Object({
527
- levels: Required({
528
- comment: "A continuous range of penalties for each level. The first element is the penalty for the first level, the second element is the penalty for the second level, and so on.",
529
- type: Array(IncludeIdentifier(PenaltyByLevelLevel), { minItems: 2 }),
530
- }),
531
- external: Optional({
532
- comment: "The combat-related special ability of which the level defines the penalty instead.",
533
- type: IncludeIdentifier(PenaltyByExternalLevel),
534
- }),
535
- }),
536
- });
537
- const PenaltyByLevelLevel = TypeAlias(import.meta.url, {
538
- name: "PenaltyByLevelLevel",
539
- type: () => Object({
540
- value: Required({
541
- comment: "The penalty value for this level.",
542
- type: Integer(),
543
- }),
544
- }),
545
- });
546
- const PenaltyByExternalLevel = TypeAlias(import.meta.url, {
547
- name: "PenaltyByExternalLevel",
548
- comment: "The combat-related special ability of which the level defines the penalty instead.",
549
- type: () => Object({
550
- id: Required({
551
- comment: "The identifier of the combat-related special ability of which the level defines the penalty instead.",
552
- type: IncludeIdentifier(CombatRelatedSpecialAbilityIdentifier),
553
- }),
554
- }),
555
- });
556
- const PenaltyByAttack = TypeAlias(import.meta.url, {
557
- name: "PenaltyByAttack",
558
- type: () => Object({
559
- list: Required({
560
- comment: "A list of penalties for subsequent attacks. The first element is the penalty for the first attack, the second element is the penalty for the second attack, and so on. The order of the first element may be changed using `initial_order`, so that e.g. if set to `2`, the first element is the penalty for the second attack, the second element is the penalty for the third attack, and so on.",
561
- type: Array(IncludeIdentifier(PenaltyByAttackOrderItem), { minItems: 1 }),
562
- }),
563
- initial_order: Optional({
564
- comment: "The order of the first element in the `list` of penalties.",
565
- type: Integer(),
566
- }),
567
- attack_replacement: Optional({
568
- comment: "Set if a predefined different word should be used instead of the word `attack` for display purposes.",
569
- type: IncludeIdentifier(PenaltyByAttackReplacement),
570
- }),
571
- }),
572
- });
573
- const PenaltyByAttackOrderItem = TypeAlias(import.meta.url, {
574
- name: "PenaltyByAttackOrderItem",
575
- type: () => Object({
576
- value: Required({
577
- comment: "The penalty value for this order.",
578
- type: Integer(),
579
- }),
580
- }),
581
- });
582
- const PenaltyByAttackReplacement = Enum(import.meta.url, {
583
- name: "PenaltyByAttackReplacement",
584
- comment: "Set if a predefined different word should be used instead of the word `attack` for display purposes.",
585
- values: () => ({
586
- Throw: EnumCase({ type: null }),
587
- }),
588
- });
589
- const EnchantmentCost = Enum(import.meta.url, {
590
- name: "EnchantmentCost",
591
- values: () => ({
592
- ArcaneEnergyCost: EnumCase({ type: IncludeIdentifier(ArcaneEnergyCost) }),
593
- BindingCost: EnumCase({ type: IncludeIdentifier(BindingCost) }),
594
- }),
595
- });
596
- export const cost = Optional({
597
- comment: "The cost when casting the entry.",
598
- type: IncludeIdentifier(EnchantmentCost),
599
- });
600
- export const ArcaneEnergyCost = Enum(import.meta.url, {
601
- name: "ArcaneEnergyCost",
602
- comment: "The AE cost.",
603
- values: () => ({
604
- Fixed: EnumCase({ type: IncludeIdentifier(FixedArcaneEnergyCost) }),
605
- PerCountable: EnumCase({ type: IncludeIdentifier(ArcaneEnergyCostPerCountable) }),
606
- Interval: EnumCase({ type: IncludeIdentifier(IntervalArcaneEnergyCost) }),
607
- ActivationAndHalfInterval: EnumCase({
608
- type: IncludeIdentifier(ActivationAndHalfIntervalArcaneEnergyCost),
609
- }),
610
- Indefinite: EnumCase({ type: IncludeIdentifier(IndefiniteArcaneEnergyCost) }),
611
- Disjunction: EnumCase({ type: IncludeIdentifier(ArcaneEnergyCostDisjunction) }),
612
- Variable: EnumCase({ type: null }),
613
- }),
614
- });
615
- export const aeCost = Optional({
616
- comment: "The AE cost.",
617
- isDeprecated: true,
618
- type: String({ minLength: 1 }),
619
- });
620
- const FixedArcaneEnergyCost = TypeAlias(import.meta.url, {
621
- name: "FixedArcaneEnergyCost",
622
- type: () => Object({
623
- value: Required({
624
- comment: "The AE cost value.",
625
- type: Integer({ minimum: 1 }),
626
- }),
627
- is_permanent: Optional({
628
- comment: "Set to `true` if the AE costs are permanent.",
629
- type: Boolean(),
630
- }),
631
- interval: Optional({
632
- comment: "Specified if the AE cost `value` has to be paid for each time interval.",
633
- type: IncludeIdentifier(DurationUnitValue),
634
- }),
635
- per_level: Optional({
636
- 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`).",
637
- type: IncludeIdentifier(FixedArcaneEnergyCostPerLevel),
638
- }),
639
- translations: NestedTranslationMap(Optional, "FixedArcaneEnergyCost", Object({
640
- note: Optional({
641
- comment: "A note, appended to the generated option string in parenthesis.",
642
- type: IncludeIdentifier(ResponsiveTextOptional),
643
- }),
644
- }, { minProperties: 1 })),
645
- }),
646
- });
647
- const FixedArcaneEnergyCostPerLevel = Enum(import.meta.url, {
648
- name: "FixedArcaneEnergyCostPerLevel",
649
- 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`).",
650
- values: () => ({
651
- Compressed: EnumCase({ type: null }),
652
- Verbose: EnumCase({ type: null }),
653
- }),
654
- });
655
- const ArcaneEnergyCostPerCountable = TypeAlias(import.meta.url, {
656
- name: "ArcaneEnergyCostPerCountable",
657
- type: () => Object({
658
- value: Required({
659
- comment: "The AE cost value that has to be per a specific countable entity.",
660
- type: Integer({ minimum: 1 }),
661
- }),
662
- base_value: Optional({
663
- comment: "If defined, in addition to the cost per entity you have to pay a flat amount, regardless of the entity count.",
664
- type: Integer({ minimum: 1 }),
665
- }),
666
- translations: NestedTranslationMap(Required, "ArcaneEnergyCostPerCountable", Object({
667
- per: Required({
668
- comment: "The cost have to be per a specific countable entity, e.g. `8 AE per person`.",
669
- type: IncludeIdentifier(ResponsiveText),
670
- }),
671
- note: Optional({
672
- comment: "A note, appended to the generated string in parenthesis.",
673
- type: IncludeIdentifier(ResponsiveTextOptional),
674
- }),
675
- })),
676
- }),
677
- });
678
- const IntervalArcaneEnergyCost = TypeAlias(import.meta.url, {
679
- name: "IntervalArcaneEnergyCost",
680
- type: () => Object({
681
- value: Required({
682
- comment: "The AE cost value that has to be payed each interval.",
683
- type: Integer({ minimum: 1 }),
684
- }),
685
- interval: Required({
686
- comment: "The time interval for which the AE cost `value` has to be paid.",
687
- type: IncludeIdentifier(DurationUnitValue),
688
- }),
689
- }),
690
- });
691
- const ActivationAndHalfIntervalArcaneEnergyCost = TypeAlias(import.meta.url, {
692
- name: "ActivationAndHalfIntervalArcaneEnergyCost",
693
- type: () => Object({
694
- value: Required({
695
- comment: "The AE cost value that has to be payed for activation. Half of this value has to be payed each interval.",
696
- type: Integer({ minimum: 2, multipleOf: 2 }),
697
- }),
698
- interval: Required({
699
- comment: "The time interval for which the AE cost `value` has to be paid.",
700
- type: IncludeIdentifier(DurationUnitValue),
701
- }),
702
- }),
703
- });
704
- const IndefiniteArcaneEnergyCost = TypeAlias(import.meta.url, {
705
- name: "IndefiniteArcaneEnergyCost",
706
- type: () => Object({
707
- modifier: Optional({
708
- comment: "Specified if the indefinite AP cost description needs to be modified by a certain value.",
709
- type: IncludeIdentifier(IndefiniteArcaneEnergyCostModifier),
710
- }),
711
- translations: NestedTranslationMap(Required, "IndefiniteArcaneEnergyCost", Object({
712
- description: Required({
713
- comment: "A description of where the cost come from.",
714
- type: IncludeIdentifier(ResponsiveText),
715
- }),
716
- })),
717
- }),
718
- });
719
- const IndefiniteArcaneEnergyCostModifier = TypeAlias(import.meta.url, {
720
- name: "IndefiniteArcaneEnergyCostModifier",
721
- type: () => Object({
722
- arithmetic: Required({
723
- comment: "The arithmetic how to apply the `value` to the `base`.",
724
- type: IncludeIdentifier(IndefiniteArcaneEnergyCostModifierArithmetic),
725
- }),
726
- value: Required({
727
- comment: "The value that is applied to the `base` using the defined `arithmetic`.",
728
- type: Integer({ minimum: 1 }),
729
- }),
730
- }),
731
- });
732
- const IndefiniteArcaneEnergyCostModifierArithmetic = Enum(import.meta.url, {
733
- name: "IndefiniteArcaneEnergyCostModifierArithmetic",
734
- values: () => ({
735
- Add: EnumCase({ type: null }),
736
- }),
737
- });
738
- const ArcaneEnergyCostDisjunction = TypeAlias(import.meta.url, {
739
- name: "ArcaneEnergyCostDisjunction",
740
- type: () => Object({
741
- interval: Optional({
742
- comment: "Specified if the selected AE cost option has to be paid for each time interval.",
743
- type: IncludeIdentifier(ArcaneEnergyCostDisjunctionInterval),
744
- }),
745
- options: Required({
746
- comment: "The possible AE cost values.",
747
- type: Array(IncludeIdentifier(ArcaneEnergyCostDisjunctionOption), { minItems: 1 }),
748
- }),
749
- }),
750
- });
751
- const ArcaneEnergyCostDisjunctionInterval = TypeAlias(import.meta.url, {
752
- name: "ArcaneEnergyCostDisjunctionInterval",
753
- type: () => Object({
754
- value: Required({
755
- comment: "The interval itself.",
756
- type: IncludeIdentifier(DurationUnitValue),
757
- }),
758
- activation_value: Required({
759
- comment: "The AE cost value for activation.",
760
- type: Integer({ minimum: 1 }),
761
- }),
762
- after_activation: Required({
763
- 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.
764
-
765
- This works different than other sustained spells, since for them the end of the cast usually already counts as part of the first interval.`,
766
- type: Boolean(),
767
- }),
768
- }),
769
- });
770
- const ArcaneEnergyCostDisjunctionOption = TypeAlias(import.meta.url, {
771
- name: "ArcaneEnergyCostDisjunctionOption",
772
- type: () => Object({
773
- value: Required({
774
- comment: "A possible AE cost value.",
775
- type: Integer({ minimum: 1 }),
776
- }),
777
- translations: NestedTranslationMap(Optional, "ArcaneEnergyCostDisjunctionOption", Object({
778
- note: Optional({
779
- comment: "A note, appended to the generated option string in parenthesis.",
780
- type: IncludeIdentifier(ResponsiveTextOptional),
781
- }),
782
- }, { minProperties: 1 })),
783
- }),
784
- });
785
- const NoArcaneEnergyCost = TypeAlias(import.meta.url, {
786
- name: "NoArcaneEnergyCost",
787
- type: () => Object({
788
- translations: NestedTranslationMap(Optional, "NoArcaneEnergyCost", Object({
789
- note: Optional({
790
- comment: "A note, appended to the generated string in parenthesis.",
791
- type: IncludeIdentifier(ResponsiveTextOptional),
792
- }),
793
- }, { minProperties: 1 })),
794
- }),
795
- });
796
- const Volume = Enum(import.meta.url, {
797
- name: "Volume",
798
- comment: "The volume points the enchantment needs.",
799
- values: () => ({
800
- Fixed: EnumCase({ type: IncludeIdentifier(FixedVolume) }),
801
- PerLevel: EnumCase({ type: IncludeIdentifier(VolumePerLevel) }),
802
- ByLevel: EnumCase({ type: IncludeIdentifier(VolumeByLevel) }),
803
- Map: EnumCase({ type: IncludeIdentifier(VolumeMap) }),
804
- DerivedFromSelection: EnumCase({ type: IncludeIdentifier(VolumeDerivedFromSelection) }),
805
- }),
806
- });
807
- export const volume = Required({
808
- comment: "The volume points the enchantment needs.",
809
- type: IncludeIdentifier(Volume),
810
- });
811
- export const volume_l10n = Optional({
812
- comment: "The volume points the enchantment needs.",
813
- isDeprecated: true,
814
- type: String({ minLength: 1 }),
815
- });
816
- const FixedVolume = TypeAlias(import.meta.url, {
817
- name: "FixedVolume",
818
- type: () => Object({
819
- points: Required({
820
- comment: "The volume points.",
821
- type: Integer({ minimum: 0 }),
822
- }),
823
- }),
824
- });
825
- const VolumePerLevel = TypeAlias(import.meta.url, {
826
- name: "VolumePerLevel",
827
- type: () => Object({
828
- points: Required({
829
- comment: "The volume points per level.",
830
- type: Integer({ minimum: 1 }),
831
- }),
832
- }),
833
- });
834
- const VolumeByLevel = TypeAlias(import.meta.url, {
835
- name: "VolumeByLevel",
836
- type: () => Object({
837
- list: Required({
838
- 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.",
839
- type: Array(IncludeIdentifier(VolumeByLevelItem), { minItems: 2 }),
840
- }),
841
- }),
842
- });
843
- const VolumeByLevelItem = TypeAlias(import.meta.url, {
844
- name: "VolumeByLevelItem",
845
- type: () => Object({
846
- points: Required({
847
- comment: "The volume points for this level.",
848
- type: Integer({ minimum: 0 }),
849
- }),
850
- }),
851
- });
852
- const VolumeMap = TypeAlias(import.meta.url, {
853
- name: "VolumeMap",
854
- 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:
855
-
856
- \`\`\`yaml
857
- options:
858
- - points: 3
859
- associated_options:
860
- - id:
861
- tag: General
862
- value: # ...
863
- # ...
864
- translations:
865
- en-US:
866
- label: "Chimera, Daimonid, Golems, Undead"
867
- label_standalone: "Chimera/Daimonid/Golems/Undead"
868
- - points: 4
869
- associated_options:
870
- - id:
871
- tag: General
872
- value: # ...
873
- # ...
874
- translations:
875
- en-US:
876
- label: "Fairies, Ghosts"
877
- label_standalone: "Fairies/Ghosts"
878
- - points: 5
879
- associated_options:
880
- - id:
881
- tag: General
882
- value: # ...
883
- # ...
884
- translations:
885
- en-US:
886
- label: "Demons, Elementals"
887
- label_standalone: "Demons/Elementals"
888
- \`\`\`
889
-
890
- 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.`,
891
- type: () => Object({
892
- options: Required({
893
- comment: "The possible costs and associated labels.",
894
- type: Array(IncludeIdentifier(VolumeMapOption), { minItems: 2 }),
895
- }),
896
- translations: NestedTranslationMap(Optional, "VolumeMap", Object({
897
- list_prepend: Optional({
898
- comment: "Place a string between the `for` and the grouped map option labels.",
899
- type: IncludeIdentifier(ResponsiveTextOptional),
900
- }),
901
- list_append: Optional({
902
- comment: "Place a string after the grouped map option labels.",
903
- type: IncludeIdentifier(ResponsiveTextOptional),
904
- }),
905
- replacement: Optional({
906
- 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.",
907
- type: IncludeIdentifier(ResponsiveTextOptional),
908
- }),
909
- }, { minProperties: 1 })),
910
- }),
911
- });
912
- const VolumeMapOption = TypeAlias(import.meta.url, {
913
- name: "VolumeMapOption",
914
- type: () => Object({
915
- points: Required({
916
- comment: "The full permanent AE cost value for this option.",
917
- type: Integer({ minimum: 1 }),
918
- }),
919
- associated_options: Required({
920
- comment: "Links to the options this volume specification is meant for.",
921
- type: Array(IncludeIdentifier(VolumeMapOptionAssociatedOption), { minItems: 1 }),
922
- }),
923
- translations: NestedTranslationMap(Optional, "VolumeMapOption", Object({
924
- label: Required({
925
- comment: "The description of the option for cost string generation.",
926
- type: IncludeIdentifier(ResponsiveTextOptional),
927
- }),
928
- label_standalone: Optional({
929
- comment: "The description of the option if used standalone. Only used if different from `label`.",
930
- type: IncludeIdentifier(ResponsiveTextOptional),
931
- }),
932
- }, { minProperties: 1 })),
933
- }),
934
- });
935
- const VolumeMapOptionAssociatedOption = TypeAlias(import.meta.url, {
936
- name: "VolumeMapOptionAssociatedOption",
937
- type: () => Object({
938
- id: Required({
939
- comment: "The option’s identifier.",
940
- type: IncludeIdentifier(VolumePointsOptionReferenceIdentifier),
941
- }),
942
- }),
943
- });
944
- const VolumeDerivedFromSelection = TypeAlias(import.meta.url, {
945
- name: "VolumeDerivedFromSelection",
946
- type: () => Object({
947
- fallback: Required({
948
- comment: "The volume for the selection if it does not define a specific one.",
949
- type: Integer({ minimum: 0 }),
950
- }),
951
- }),
952
- });
953
- export const BindingCost = Enum(import.meta.url, {
954
- name: "BindingCost",
955
- comment: "The binding cost for an enchantment.",
956
- values: () => ({
957
- Fixed: EnumCase({ type: IncludeIdentifier(FixedBindingCost) }),
958
- PerLevel: EnumCase({ type: IncludeIdentifier(BindingCostPerLevel) }),
959
- Map: EnumCase({ type: IncludeIdentifier(BindingCostMap) }),
960
- DerivedFromSelection: EnumCase({ type: IncludeIdentifier(BindingCostDerivedFromSelection) }),
961
- }),
962
- });
963
- export const bindingCost = Optional({
964
- comment: "The binding cost for an enchantment.",
965
- isDeprecated: true,
966
- type: String({ minLength: 1 }),
967
- });
968
- const FixedBindingCost = TypeAlias(import.meta.url, {
969
- name: "FixedBindingCost",
970
- type: () => Object({
971
- permanent_value: Required({
972
- comment: `The permanent AE cost.
973
-
974
- If the enchantment has multiple levels, it is only applied for the first level.`,
975
- type: Integer({ minimum: 1 }),
976
- }),
977
- }),
978
- });
979
- const BindingCostPerLevel = TypeAlias(import.meta.url, {
980
- name: "BindingCostPerLevel",
981
- type: () => Object({
982
- permanent_value: Required({
983
- comment: "The permanent AE cost per level.",
984
- type: Integer({ minimum: 1 }),
985
- }),
986
- }),
987
- });
988
- const BindingCostMap = TypeAlias(import.meta.url, {
989
- name: "BindingCostMap",
990
- 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:
991
-
992
- \`\`\`yaml
993
- options:
994
- - permanent_value: 2
995
- translations:
996
- en-US:
997
- label: "Daggers"
998
- label_standalone: "Dagger"
999
- - permanent_value: 4
1000
- translations:
1001
- en-US:
1002
- label: "Swords"
1003
- label_standalone: "Sword"
1004
- - permanent_value: 8
1005
- translations:
1006
- en-US:
1007
- label: "Two-Handed Swords"
1008
- label_standalone: "Two-Handed Sword"
1009
- list_prepend: "spell-swords with the combat technique"
1010
- \`\`\`
1011
-
1012
- This will generate the exact same string as seen above.`,
1013
- type: () => Object({
1014
- options: Required({
1015
- comment: "The possible costs and associated labels.",
1016
- type: Array(IncludeIdentifier(BindingCostMapOption), { minItems: 2 }),
1017
- }),
1018
- translations: NestedTranslationMap(Optional, "BindingCostMap", Object({
1019
- list_prepend: Optional({
1020
- comment: "Place a string between the `for` and the grouped map option labels.",
1021
- type: IncludeIdentifier(ResponsiveTextOptional),
1022
- }),
1023
- list_append: Optional({
1024
- comment: "Place a string after the grouped map option labels.",
1025
- type: IncludeIdentifier(ResponsiveTextOptional),
1026
- }),
1027
- replacement: Optional({
1028
- 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.",
1029
- type: IncludeIdentifier(ResponsiveTextOptional),
1030
- }),
1031
- }, { minProperties: 1 })),
1032
- }),
1033
- });
1034
- const BindingCostMapOption = TypeAlias(import.meta.url, {
1035
- name: "BindingCostMapOption",
1036
- type: () => Object({
1037
- permanent_value: Required({
1038
- comment: "The full permanent AE cost value for this option.",
1039
- type: Integer({ minimum: 1 }),
1040
- }),
1041
- translations: NestedTranslationMap(Optional, "BindingCostMapOption", Object({
1042
- label: Required({
1043
- comment: "The description of the option for cost string generation.",
1044
- type: IncludeIdentifier(ResponsiveTextOptional),
1045
- }),
1046
- label_standalone: Optional({
1047
- comment: "The description of the option if used standalone. Only used if different from `label`.",
1048
- type: IncludeIdentifier(ResponsiveTextOptional),
1049
- }),
1050
- })),
1051
- }),
1052
- });
1053
- const BindingCostDerivedFromSelection = TypeAlias(import.meta.url, {
1054
- name: "BindingCostDerivedFromSelection",
1055
- type: () => Object({
1056
- fallback: Required({
1057
- comment: "The binding cost for the selection if it does not define a specific one.",
1058
- type: Integer({ minimum: 0 }),
1059
- }),
1060
- }),
1061
- });
1062
- const PropertyDeclaration = Enum(import.meta.url, {
1063
- name: "PropertyDeclaration",
1064
- comment: "The magic property’s identifier. `DependingOnProperty` can only be used if the special ability has an option to select a property.",
1065
- values: () => ({
1066
- DependingOnSelection: EnumCase({ type: null }),
1067
- Fixed: EnumCase({ type: PropertyIdentifier() }),
1068
- }),
1069
- });
1070
- export const property = Required({
1071
- comment: "The magic property’s identifier. `DependingOnProperty` can only be used if the special ability has an option to select a property.",
1072
- type: IncludeIdentifier(PropertyDeclaration),
1073
- });
1074
- export const aspect = Required({
1075
- comment: "The blessed aspect.",
1076
- type: AspectIdentifier(),
1077
- });
1078
- export const aspectOptional = Optional({
1079
- comment: "The blessed aspect.",
1080
- type: AspectIdentifier(),
1081
- });
1082
- const AdvancedSpecialAbility = GenEnum(import.meta.url, {
1083
- name: "AdvancedSpecialAbility",
1084
- comment: "A reference to an advanced special ability.",
1085
- parameters: [Param("Identifier")],
1086
- values: Identifier => ({
1087
- General: EnumCase({ type: TypeArgument(Identifier) }),
1088
- RestrictOptions: EnumCase({
1089
- type: GenIncludeIdentifier(RestrictAdvancedSpecialAbilityOptions, [TypeArgument(Identifier)]),
1090
- }),
1091
- OneOf: EnumCase({
1092
- type: GenIncludeIdentifier(OneOfAdvancedSpecialAbilityOptions, [TypeArgument(Identifier)]),
1093
- }),
1094
- DeriveFromExternalOption: EnumCase({
1095
- type: GenIncludeIdentifier(AdvancedSpecialAbilityDerivedFromExternalOption, [
1096
- TypeArgument(Identifier),
1097
- ]),
1098
- }),
1099
- }),
1100
- });
1101
- const RestrictAdvancedSpecialAbilityOptions = GenTypeAlias(import.meta.url, {
1102
- name: "RestrictAdvancedSpecialAbilityOptions",
1103
- parameters: [Param("Identifier")],
1104
- type: Identifier => Object({
1105
- id: Required({
1106
- comment: "The advanced special ability’s identifier.",
1107
- type: TypeArgument(Identifier),
1108
- }),
1109
- option: Required({
1110
- comment: "Specify the select option(s) that only are allowed for the referenced advanced special ability; others are disallowed.",
1111
- type: Array(IncludeIdentifier(AdvancedSpecialAbilityRestrictedOptionIdentifier), {
1112
- minItems: 1,
1113
- }),
1114
- }),
1115
- }),
1116
- });
1117
- const OneOfAdvancedSpecialAbilityOptions = GenTypeAlias(import.meta.url, {
1118
- name: "OneOfAdvancedSpecialAbilityOptions",
1119
- parameters: [Param("Identifier")],
1120
- type: Identifier => Object({
1121
- options: Required({
1122
- comment: "The possible advanced special abilities.",
1123
- type: Array(TypeArgument(Identifier), { minItems: 2 }),
1124
- }),
1125
- is_selection_required_on_purchase: Required({
1126
- comment: "Do have to choose the advanced special ability when buying the style special ability? Otherwise the decision can be made later.",
1127
- type: Boolean(),
1128
- }),
1129
- display_option: Optional({
1130
- type: IncludeIdentifier(DisplayOption),
1131
- }),
1132
- }),
1133
- });
1134
- const AdvancedSpecialAbilityDerivedFromExternalOption = GenTypeAlias(import.meta.url, {
1135
- name: "AdvancedSpecialAbilityDerivedFromExternalOption",
1136
- parameters: [Param("Identifier")],
1137
- type: Identifier => Object({
1138
- external_entry: Required({
1139
- comment: "The possible advanced special abilities.",
1140
- type: MagicalTraditionIdentifier(),
1141
- }),
1142
- map: Required({
1143
- comment: "Map options from the external entry to allowed advanced special abilities.",
1144
- type: Array(GenIncludeIdentifier(AdvancedSpecialAbilityDerivedFromExternalOptionMapping, [
1145
- TypeArgument(Identifier),
1146
- ]), { minItems: 1 }),
1147
- }),
1148
- display_option: Optional({
1149
- type: IncludeIdentifier(DisplayOption),
1150
- }),
1151
- }),
1152
- });
1153
- const AdvancedSpecialAbilityDerivedFromExternalOptionMapping = GenTypeAlias(import.meta.url, {
1154
- name: "AdvancedSpecialAbilityDerivedFromExternalOptionMapping",
1155
- parameters: [Param("Identifier")],
1156
- comment: "Mapping from an option of the external entry to an allowed advanced special ability.",
1157
- type: Identifier => Object({
1158
- from_option: Required({
1159
- comment: "The select option’s identifier.",
1160
- type: PatronIdentifier(),
1161
- }),
1162
- to_advanced: Required({
1163
- comment: "The advanced special ability’s identifier.",
1164
- type: TypeArgument(Identifier),
1165
- }),
1166
- }),
1167
- });
1168
- export const advanced = (identifier) => Required({
1169
- comment: "The Advanced Special Abilities for the respective Style Special Ability. Sometimes, only a specific select option or a set of select options of an entry is allowed, which can be modelled by the option property. It can also be that you can choose from a set of special abilities, but then you can’t specify an option.",
1170
- type: Array(GenIncludeIdentifier(AdvancedSpecialAbility, [identifier]), {
1171
- minItems: 3,
1172
- maxItems: 3,
1173
- }),
1174
- });
1175
- const ApplicableCombatTechniques = Enum(import.meta.url, {
1176
- name: "ApplicableCombatTechniques",
1177
- values: () => ({
1178
- None: EnumCase({ type: null }),
1179
- DependingOnCombatStyle: EnumCase({ type: null }),
1180
- All: EnumCase({ type: IncludeIdentifier(AllApplicableCombatTechniques) }),
1181
- AllClose: EnumCase({ type: IncludeIdentifier(AllApplicableCloseCombatTechniques) }),
1182
- AllRanged: EnumCase({ type: IncludeIdentifier(AllApplicableRangedCombatTechniques) }),
1183
- Specific: EnumCase({ type: IncludeIdentifier(SpecificApplicableCombatTechniques) }),
1184
- }),
1185
- });
1186
- export const combat_techniques = Required({
1187
- comment: "The combat techniques the special ability is applicable to.",
1188
- type: IncludeIdentifier(ApplicableCombatTechniques),
1189
- });
1190
- const AllApplicableCombatTechniques = TypeAlias(import.meta.url, {
1191
- name: "AllApplicableCombatTechniques",
1192
- type: () => Object({
1193
- restrictions: Optional({
1194
- type: Array(IncludeIdentifier(ApplicableAllCombatTechniquesRestriction), { minItems: 1 }),
1195
- }),
1196
- }),
1197
- });
1198
- const AllApplicableCloseCombatTechniques = TypeAlias(import.meta.url, {
1199
- name: "AllApplicableCloseCombatTechniques",
1200
- type: () => Object({
1201
- restrictions: Optional({
1202
- type: Array(IncludeIdentifier(ApplicableCloseCombatTechniquesRestriction), { minItems: 1 }),
1203
- }),
1204
- }),
1205
- });
1206
- const AllApplicableRangedCombatTechniques = TypeAlias(import.meta.url, {
1207
- name: "AllApplicableRangedCombatTechniques",
1208
- type: () => Object({
1209
- restrictions: Optional({
1210
- type: Array(IncludeIdentifier(ApplicableRangedCombatTechniquesRestriction), {
1211
- minItems: 1,
1212
- }),
1213
- }),
1214
- }),
1215
- });
1216
- const SpecificApplicableCombatTechniques = TypeAlias(import.meta.url, {
1217
- name: "SpecificApplicableCombatTechniques",
1218
- type: () => Object({
1219
- list: Required({
1220
- type: Array(IncludeIdentifier(SpecificApplicableCombatTechnique), { minItems: 1 }),
1221
- }),
1222
- }),
1223
- });
1224
- const SpecificApplicableCombatTechnique = TypeAlias(import.meta.url, {
1225
- name: "SpecificApplicableCombatTechnique",
1226
- type: () => Object({
1227
- id: Required({
1228
- type: IncludeIdentifier(CombatTechniqueIdentifier),
1229
- }),
1230
- restrictions: Optional({
1231
- type: Array(IncludeIdentifier(ApplicableSpecificCombatTechniquesRestriction), {
1232
- minItems: 1,
1233
- }),
1234
- }),
1235
- }),
1236
- });
1237
- const ApplicableAllCombatTechniquesRestriction = Enum(import.meta.url, {
1238
- name: "ApplicableAllCombatTechniquesRestriction",
1239
- values: () => ({
1240
- Improvised: EnumCase({ type: null }),
1241
- PointedBlade: EnumCase({ type: null }),
1242
- Mount: EnumCase({ type: null }),
1243
- Race: EnumCase({ type: IncludeIdentifier(ApplicableCombatTechniquesRaceRestriction) }),
1244
- ExcludeCombatTechniques: EnumCase({
1245
- type: GenIncludeIdentifier(ApplicableCombatTechniquesNegativeCombatTechniquesRestriction, [
1246
- IncludeIdentifier(CombatTechniqueIdentifier),
1247
- ]),
1248
- }),
1249
- }),
1250
- });
1251
- const ApplicableCloseCombatTechniquesRestriction = Enum(import.meta.url, {
1252
- name: "ApplicableCloseCombatTechniquesRestriction",
1253
- values: () => ({
1254
- Improvised: EnumCase({ type: null }),
1255
- PointedBlade: EnumCase({ type: null }),
1256
- Mount: EnumCase({ type: null }),
1257
- HasParry: EnumCase({ type: null }),
1258
- OneHanded: EnumCase({ type: null }),
1259
- ParryingWeapon: EnumCase({ type: null }),
1260
- Race: EnumCase({ type: IncludeIdentifier(ApplicableCombatTechniquesRaceRestriction) }),
1261
- ExcludeCombatTechniques: EnumCase({
1262
- type: GenIncludeIdentifier(ApplicableCombatTechniquesNegativeCombatTechniquesRestriction, [
1263
- CloseCombatTechniqueIdentifier(),
1264
- ]),
1265
- }),
1266
- }),
1267
- });
1268
- const ApplicableRangedCombatTechniquesRestriction = Enum(import.meta.url, {
1269
- name: "ApplicableRangedCombatTechniquesRestriction",
1270
- values: () => ({
1271
- Improvised: EnumCase({ type: null }),
1272
- PointedBlade: EnumCase({ type: null }),
1273
- Mount: EnumCase({ type: null }),
1274
- Race: EnumCase({ type: IncludeIdentifier(ApplicableCombatTechniquesRaceRestriction) }),
1275
- ExcludeCombatTechniques: EnumCase({
1276
- type: GenIncludeIdentifier(ApplicableCombatTechniquesNegativeCombatTechniquesRestriction, [
1277
- RangedCombatTechniqueIdentifier(),
1278
- ]),
1279
- }),
1280
- }),
1281
- });
1282
- const ApplicableSpecificCombatTechniquesRestriction = Enum(import.meta.url, {
1283
- name: "ApplicableSpecificCombatTechniquesRestriction",
1284
- values: () => ({
1285
- Improvised: EnumCase({ type: null }),
1286
- PointedBlade: EnumCase({ type: null }),
1287
- Mount: EnumCase({ type: null }),
1288
- Race: EnumCase({ type: IncludeIdentifier(ApplicableCombatTechniquesRaceRestriction) }),
1289
- Level: EnumCase({ type: IncludeIdentifier(ApplicableCombatTechniquesLevelRestriction) }),
1290
- Weapons: EnumCase({ type: IncludeIdentifier(ApplicableCombatTechniquesWeaponRestriction) }),
1291
- }),
1292
- });
1293
- const ApplicableCombatTechniquesNegativeCombatTechniquesRestriction = GenTypeAlias(import.meta.url, {
1294
- name: "ApplicableCombatTechniquesNegativeCombatTechniquesRestriction",
1295
- parameters: [Param("Ref")],
1296
- type: Ref => Object({
1297
- list: Required({
1298
- comment: "The combat techniques this combat special ability is **not** applicable to.",
1299
- type: Array(TypeArgument(Ref), { minItems: 1 }),
1300
- }),
1301
- }),
1302
- });
1303
- const ApplicableCombatTechniquesRaceRestriction = TypeAlias(import.meta.url, {
1304
- name: "ApplicableCombatTechniquesRaceRestriction",
1305
- type: () => RaceIdentifier(),
1306
- });
1307
- const ApplicableCombatTechniquesLevelRestriction = TypeAlias(import.meta.url, {
1308
- name: "ApplicableCombatTechniquesLevelRestriction",
1309
- type: () => Object({
1310
- level: Required({
1311
- comment: "The combat special ability is only applicable on a certain level.",
1312
- type: Integer({ minimum: 1 }),
1313
- }),
1314
- }),
1315
- });
1316
- const ApplicableCombatTechniquesWeaponRestriction = TypeAlias(import.meta.url, {
1317
- name: "ApplicableCombatTechniquesWeaponRestriction",
1318
- type: () => Object({
1319
- list: Required({
1320
- comment: "The specific weapons this combat special ability is only applicable to.",
1321
- type: Array(WeaponIdentifier(), { minItems: 1 }),
1322
- }),
1323
- }),
1324
- });
1325
- const AdventurePointsValue = Enum(import.meta.url, {
1326
- name: "AdventurePointsValue",
1327
- values: () => ({
1328
- Fixed: EnumCase({ type: IncludeIdentifier(FixedAdventurePointsValue) }),
1329
- ByLevel: EnumCase({ type: IncludeIdentifier(AdventurePointsValueByLevel) }),
1330
- DerivedFromSelection: EnumCase({
1331
- type: IncludeIdentifier(AdventurePointsDerivedFromSelection),
1332
- }),
1333
- DependingOnActiveInstances: EnumCase({
1334
- type: IncludeIdentifier(AdventurePointsDependingOnActiveInstances),
1335
- }),
1336
- Indefinite: EnumCase({ type: null }),
1337
- }),
1338
- });
1339
- export const ap_value = Required({
1340
- comment: "The adventure points value.",
1341
- type: IncludeIdentifier(AdventurePointsValue),
1342
- });
1343
- export const ap_value_l10n = Optional({
1344
- comment: "The adventure points value.",
1345
- isDeprecated: true,
1346
- type: String({ minLength: 1 }),
1347
- });
1348
- export const ap_value_append = Optional({
1349
- comment: "The string to append to the generated AP value text.",
1350
- isDeprecated: true,
1351
- type: String({ minLength: 1 }),
1352
- });
1353
- export const FixedAdventurePointsValue = TypeAlias(import.meta.url, {
1354
- name: "FixedAdventurePointsValue",
1355
- comment: "A fixed adventure points value. If the entry has levels, this is the cost per level as well.",
1356
- type: () => IncludeIdentifier(AdventurePointsSingleValue),
1357
- });
1358
- const AdventurePointsValueByLevel = TypeAlias(import.meta.url, {
1359
- name: "AdventurePointsValueByLevel",
1360
- comment: "An entry with levels may have different costs for each level. The length of the list must match the amount of levels the special ability has.",
1361
- type: () => Array(IncludeIdentifier(AdventurePointsSingleValue), { minItems: 2 }),
1362
- });
1363
- const AdventurePointsDerivedFromSelection = TypeAlias(import.meta.url, {
1364
- name: "AdventurePointsDerivedFromSelection",
1365
- comment: "The adventure points value is derived from the selection of the special ability. Its display value may be able to be derived from the given information for the select options. If that is not the case or the generated text would not match the original one, a replacement text can be provided.",
1366
- type: () => Object({
1367
- translations: NestedTranslationMap(Optional, "AdventurePointsDerivedFromSelection", Object({
1368
- replacement: Optional({
1369
- comment: "A replacement for the generated text if it would not match the original one.",
1370
- type: String({ minLength: 1, isMarkdown: true }),
1371
- }),
1372
- }, { minProperties: 1 })),
1373
- }),
1374
- });
1375
- const AdventurePointsSingleValue = TypeAlias(import.meta.url, {
1376
- name: "AdventurePointsSingleValue",
1377
- comment: "A single adventure points value.",
1378
- type: () => Integer({ minimum: 0 }),
1379
- });
1380
- export const AdventurePointsDependingOnActiveInstances = Enum(import.meta.url, {
1381
- name: "AdventurePointsDependingOnActiveInstances",
1382
- comment: "The adventure points cost depends on how many instances of the entry are already active.",
1383
- values: () => ({
1384
- Threshold: EnumCase({
1385
- type: IncludeIdentifier(AdventurePointsDependingOnActiveInstancesThreshold),
1386
- }),
1387
- Expression: EnumCase({
1388
- type: IncludeIdentifier(AdventurePointsDependingOnActiveInstancesExpression),
1389
- }),
1390
- }),
1391
- });
1392
- const AdventurePointsDependingOnActiveInstancesThreshold = TypeAlias(import.meta.url, {
1393
- name: "AdventurePointsDependingOnActiveInstancesThreshold",
1394
- comment: "The adventure points cost depends on how many instances of the entry are already active.",
1395
- type: () => Object({
1396
- normal: Required({
1397
- comment: "The normal adventure points value.",
1398
- type: Integer({ minimum: 0 }),
1399
- }),
1400
- threshold: Required({
1401
- comment: "The number of active instances **after** which the alternative cost applies.",
1402
- type: Integer({ minimum: 1 }),
1403
- }),
1404
- alternative: Required({
1405
- comment: "The alternative adventure points value.",
1406
- type: Integer({ minimum: 0 }),
1407
- }),
1408
- }),
1409
- });
1410
- const AdventurePointsDependingOnActiveInstancesExpression = TypeAlias(import.meta.url, {
1411
- name: "AdventurePointsDependingOnActiveInstancesExpression",
1412
- comment: "The adventure points cost depends on how many instances of the entry are already active.",
1413
- type: () => GenIncludeIdentifier(MathOperation, [
1414
- IncludeIdentifier(AdventurePointsDependingOnActiveInstancesExpressionValue),
1415
- ]),
1416
- });
1417
- const AdventurePointsDependingOnActiveInstancesExpressionValue = Enum(import.meta.url, {
1418
- name: "AdventurePointsDependingOnActiveInstancesExpressionValue",
1419
- comment: `The type of value allowed in the expression to calculate the AP value.`,
1420
- values: () => ({
1421
- Constant: EnumCase({
1422
- comment: "A constant integer value.",
1423
- type: Integer(),
1424
- }),
1425
- Active: EnumCase({
1426
- comment: "The number of active instances.",
1427
- type: null,
1428
- }),
1429
- }),
1430
- });
1431
40
  export const input = Optional({
1432
41
  comment: "A string that is used as a label for an input field.",
1433
42
  type: String({ minLength: 1 }),