@archivist-gg/dnd5e 0.3.11 → 0.3.17

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 (192) hide show
  1. package/LICENSES/SRD.md +38 -3
  2. package/dist/armor/armor.codec.js +3 -3
  3. package/dist/armor/armor.parser.js +2 -2
  4. package/dist/armor/armor.schema.d.ts +1 -0
  5. package/dist/armor/armor.schema.js +1 -1
  6. package/dist/armor/armor.types.d.ts +2 -0
  7. package/dist/background/background.codec.js +5 -5
  8. package/dist/background/background.parser.js +4 -4
  9. package/dist/background/background.schema.js +3 -3
  10. package/dist/{chunk-XTRDCSJB.js → chunk-2JSQE3DD.js} +15 -1
  11. package/dist/chunk-2LULMQTF.js +14 -0
  12. package/dist/{chunk-MAH6DCRI.js → chunk-2UDSN6VW.js} +1 -1
  13. package/dist/chunk-3LWMFYKS.js +57 -0
  14. package/dist/{chunk-JCEV7KYN.js → chunk-3MGQFFNE.js} +1 -1
  15. package/dist/chunk-3VZZDKRA.js +1014 -0
  16. package/dist/{chunk-2DFENQIJ.js → chunk-5GKJAUMX.js} +2 -0
  17. package/dist/{chunk-2M34FLAY.js → chunk-5MXFW4O3.js} +9 -3
  18. package/dist/{chunk-4DOMDEBZ.js → chunk-6EI737IO.js} +1 -1
  19. package/dist/{chunk-G247QXWW.js → chunk-7ATNGKBS.js} +1 -1
  20. package/dist/{chunk-XY6X2APM.js → chunk-7Q2VPKCD.js} +17 -0
  21. package/dist/{chunk-T2SNEJOE.js → chunk-7QN7XSAK.js} +1 -1
  22. package/dist/{chunk-DNAJRMNN.js → chunk-A54HHCWW.js} +6 -7
  23. package/dist/{chunk-7YU4NPKR.js → chunk-AZRGFUSR.js} +1 -1
  24. package/dist/{chunk-PP2UHLBA.js → chunk-B3DP42OM.js} +5 -0
  25. package/dist/chunk-CM5CWO4K.js +735 -0
  26. package/dist/{chunk-MQ747UCR.js → chunk-DOXSFYLH.js} +70 -2
  27. package/dist/chunk-EJP263OP.js +186 -0
  28. package/dist/{chunk-SMLXZUBH.js → chunk-EYX4JMAU.js} +4 -1
  29. package/dist/{chunk-V6LJFP4R.js → chunk-FANQVQ3D.js} +2 -2
  30. package/dist/{chunk-AW3EHF3L.js → chunk-FC4IGH5Y.js} +1 -1
  31. package/dist/{chunk-23LZLBJK.js → chunk-G6MHJDVT.js} +6 -2
  32. package/dist/{chunk-JANNRGJC.js → chunk-G6PBI2BU.js} +1 -1
  33. package/dist/chunk-H5PTKYXL.js +101 -0
  34. package/dist/{chunk-LWFTHJIE.js → chunk-HHBD4SQ6.js} +1 -1
  35. package/dist/{chunk-JC5UNIVM.js → chunk-HS6FIOLP.js} +2 -0
  36. package/dist/chunk-HTYMW5CH.js +228 -0
  37. package/dist/chunk-IHE6KVC3.js +13 -0
  38. package/dist/{chunk-QHMWA3SZ.js → chunk-JCMUVZIK.js} +1 -1
  39. package/dist/{chunk-V373TRJE.js → chunk-JSM6JFZR.js} +198 -125
  40. package/dist/{chunk-LDDCNPHD.js → chunk-K5NJBTE2.js} +1 -1
  41. package/dist/chunk-KR6JF3BF.js +14 -0
  42. package/dist/{chunk-4ISR76DH.js → chunk-KSTV7J2U.js} +9 -3
  43. package/dist/chunk-LBEXLN6I.js +91 -0
  44. package/dist/{chunk-BLRW2UU6.js → chunk-LF5AGJA4.js} +2 -2
  45. package/dist/{chunk-UBBKSYBY.js → chunk-LHZXYFBU.js} +30 -1
  46. package/dist/{chunk-BIA32MQ5.js → chunk-MBX25B6D.js} +1 -1
  47. package/dist/{chunk-R2ZV233X.js → chunk-MYY2C5MB.js} +3 -3
  48. package/dist/{chunk-J77CKYV3.js → chunk-OFCSP6MT.js} +1 -1
  49. package/dist/{chunk-2INMRR3Q.js → chunk-ONTGZR5T.js} +326 -149
  50. package/dist/{chunk-MWCCGPG3.js → chunk-OOSRUJBI.js} +3 -2
  51. package/dist/{chunk-U3BABVJF.js → chunk-PKX6TGRE.js} +2 -2
  52. package/dist/{chunk-PJMG5XV3.js → chunk-PQZ4LM4Z.js} +1 -1
  53. package/dist/chunk-PXVNAY7T.js +84 -0
  54. package/dist/chunk-QH36K2PU.js +158 -0
  55. package/dist/{chunk-R747YKS7.js → chunk-QZSWN2KT.js} +1 -1
  56. package/dist/{chunk-CHUALUIX.js → chunk-RYLXAYIQ.js} +1 -1
  57. package/dist/{chunk-GFZ7PITJ.js → chunk-S3YUXDSC.js} +6 -1
  58. package/dist/{chunk-PZCE7DJM.js → chunk-T6QIF5XR.js} +31 -1
  59. package/dist/{chunk-CBEKVAX4.js → chunk-TULQ4FFX.js} +41 -13
  60. package/dist/{chunk-S56D6B6C.js → chunk-UUBJCNQU.js} +12 -3
  61. package/dist/{chunk-5N2GW72F.js → chunk-UZXG6QSY.js} +2 -1
  62. package/dist/{chunk-4XTNPNQB.js → chunk-VPYBK2MG.js} +1 -1
  63. package/dist/{chunk-3HX5VLWP.js → chunk-VRV3NNTA.js} +2 -2
  64. package/dist/{chunk-HZA7OE7N.js → chunk-XCFC7LGF.js} +2 -1
  65. package/dist/{chunk-BL3VELKP.js → chunk-Y5VVP73C.js} +1 -1
  66. package/dist/{chunk-PI4LLJG4.js → chunk-YD2VAHA6.js} +2 -2
  67. package/dist/{chunk-UIRMA5KM.js → chunk-YDGMBMYI.js} +1 -1
  68. package/dist/{chunk-NWDF5HG3.js → chunk-YKL6SHRJ.js} +1 -1
  69. package/dist/{chunk-6X4KUDMU.js → chunk-ZCTUYGNV.js} +7 -2
  70. package/dist/chunk-ZUQW5VBZ.js +89 -0
  71. package/dist/class/class.codec.js +7 -7
  72. package/dist/class/class.parser.js +6 -6
  73. package/dist/class/class.schema.d.ts +18 -0
  74. package/dist/class/class.schema.js +5 -5
  75. package/dist/class/class.standard-array.d.ts +16 -0
  76. package/dist/class/class.standard-array.js +20 -0
  77. package/dist/class/class.types.d.ts +3 -0
  78. package/dist/dnd/amount-text.d.ts +38 -0
  79. package/dist/dnd/amount-text.js +13 -0
  80. package/dist/dnd/resource-words.d.ts +4 -0
  81. package/dist/dnd/resource-words.js +30 -0
  82. package/dist/entities/base-item-resolver.js +2 -2
  83. package/dist/entities/slug.d.ts +18 -8
  84. package/dist/entities/slug.js +3 -1
  85. package/dist/feat/feat.codec.js +5 -5
  86. package/dist/feat/feat.parser.js +4 -4
  87. package/dist/feat/feat.schema.d.ts +41 -3
  88. package/dist/feat/feat.schema.js +3 -3
  89. package/dist/index.js +7513 -4177
  90. package/dist/item/item.actions-map.d.ts +40 -5
  91. package/dist/item/item.actions-map.js +5 -84
  92. package/dist/item/item.attunement.js +3 -9
  93. package/dist/item/item.bonuses.js +5 -2
  94. package/dist/item/item.codec.js +3 -3
  95. package/dist/item/item.conditions.js +4 -1
  96. package/dist/item/item.conditions.types.d.ts +4 -0
  97. package/dist/item/item.cost.d.ts +3 -0
  98. package/dist/item/item.cost.js +29 -0
  99. package/dist/item/item.icon.d.ts +15 -0
  100. package/dist/item/item.icon.js +211 -0
  101. package/dist/item/item.parser.js +2 -2
  102. package/dist/item/item.schema.d.ts +16 -1
  103. package/dist/item/item.schema.js +3 -1
  104. package/dist/item/item.types.d.ts +9 -2
  105. package/dist/monster/monster.parser.js +5 -5
  106. package/dist/monster/monster.schema.js +4 -4
  107. package/dist/optional-feature/optional-feature.codec.js +5 -4
  108. package/dist/optional-feature/optional-feature.parser.js +4 -3
  109. package/dist/optional-feature/optional-feature.schema.d.ts +255 -3
  110. package/dist/optional-feature/optional-feature.schema.js +7 -2
  111. package/dist/pc/pc.additional-spells.js +3 -3
  112. package/dist/pc/pc.amount-bindings.d.ts +32 -0
  113. package/dist/pc/pc.amount-bindings.js +23 -0
  114. package/dist/pc/pc.asi-flatten.d.ts +62 -1
  115. package/dist/pc/pc.asi-flatten.js +16 -0
  116. package/dist/pc/pc.conditions.js +1 -1
  117. package/dist/pc/pc.containment.d.ts +45 -0
  118. package/dist/pc/pc.containment.js +24 -0
  119. package/dist/pc/pc.decision-engine.d.ts +24 -3
  120. package/dist/pc/pc.decision-engine.js +26 -16
  121. package/dist/pc/pc.entry-overrides.d.ts +79 -0
  122. package/dist/pc/pc.entry-overrides.js +40 -0
  123. package/dist/pc/pc.equipment.d.ts +2 -2
  124. package/dist/pc/pc.equipment.js +19 -7
  125. package/dist/pc/pc.feature-effects.d.ts +12 -0
  126. package/dist/pc/pc.feature-effects.js +2 -2
  127. package/dist/pc/pc.infusions.d.ts +228 -0
  128. package/dist/pc/pc.infusions.js +64 -0
  129. package/dist/pc/pc.member-choices.d.ts +90 -0
  130. package/dist/pc/pc.member-choices.js +32 -0
  131. package/dist/pc/pc.parser.js +18 -1
  132. package/dist/pc/pc.pools.d.ts +8 -1
  133. package/dist/pc/pc.pools.js +13 -3
  134. package/dist/pc/pc.proficiencies.js +23 -15
  135. package/dist/pc/pc.proficiency-query.js +6 -0
  136. package/dist/pc/pc.recalc.d.ts +39 -36
  137. package/dist/pc/pc.recalc.js +115 -70
  138. package/dist/pc/pc.resolver.d.ts +2 -1
  139. package/dist/pc/pc.resolver.js +22 -14
  140. package/dist/pc/pc.resource-seed.js +1 -1
  141. package/dist/pc/pc.resources.d.ts +6 -1
  142. package/dist/pc/pc.resources.js +3 -1
  143. package/dist/pc/pc.rest.d.ts +21 -1
  144. package/dist/pc/pc.rest.js +52 -19
  145. package/dist/pc/pc.schema.d.ts +43 -2
  146. package/dist/pc/pc.schema.js +1 -1
  147. package/dist/pc/pc.slotting.d.ts +36 -3
  148. package/dist/pc/pc.slotting.js +13 -5
  149. package/dist/pc/pc.tool-picks.d.ts +51 -0
  150. package/dist/pc/pc.tool-picks.js +18 -0
  151. package/dist/pc/pc.types.d.ts +115 -14
  152. package/dist/pc/pc.weapon-grant.d.ts +15 -0
  153. package/dist/pc/pool-layout.d.ts +8 -0
  154. package/dist/pc/pool-layout.js +5 -3
  155. package/dist/pc/resource-equivalents.d.ts +44 -0
  156. package/dist/pc/spell-source.js +4 -9
  157. package/dist/race/race.codec.js +6 -6
  158. package/dist/race/race.parser.js +5 -5
  159. package/dist/race/race.schema.js +4 -4
  160. package/dist/schemas/attack-schema.d.ts +1 -1
  161. package/dist/schemas/choice-schema.js +2 -2
  162. package/dist/schemas/feature-effect-schema.d.ts +41 -3
  163. package/dist/schemas/feature-effect-schema.js +1 -1
  164. package/dist/schemas/feature-schema.js +3 -3
  165. package/dist/schemas/selection-pool-schema.d.ts +10 -0
  166. package/dist/schemas/selection-pool-schema.js +1 -1
  167. package/dist/spell/spell.codec.js +2 -2
  168. package/dist/spell/spell.parser.d.ts +6 -1
  169. package/dist/spell/spell.parser.js +5 -3
  170. package/dist/spell/spell.types.d.ts +10 -0
  171. package/dist/srd/retired-items.d.ts +14 -0
  172. package/dist/srd/retired-items.js +11 -0
  173. package/dist/subclass/subclass.codec.js +7 -7
  174. package/dist/subclass/subclass.parser.js +6 -6
  175. package/dist/subclass/subclass.schema.d.ts +10 -0
  176. package/dist/subclass/subclass.schema.js +5 -5
  177. package/dist/types/choice.d.ts +13 -0
  178. package/dist/types/equipment-grant.d.ts +18 -1
  179. package/dist/types/equipment-grant.js +12 -0
  180. package/dist/types/feature-effect.d.ts +12 -1
  181. package/dist/types/optional-feature.types.d.ts +84 -1
  182. package/dist/types/selection-pool.d.ts +18 -3
  183. package/dist/weapon/weapon.classify.d.ts +10 -8
  184. package/dist/weapon/weapon.classify.js +2 -2
  185. package/dist/weapon/weapon.codec.js +3 -3
  186. package/dist/weapon/weapon.parser.js +2 -2
  187. package/dist/weapon/weapon.schema.d.ts +1 -0
  188. package/dist/weapon/weapon.schema.js +1 -1
  189. package/dist/weapon/weapon.types.d.ts +2 -0
  190. package/package.json +1 -1
  191. package/dist/chunk-O4SRD3J5.js +0 -165
  192. package/dist/chunk-WXWPK3LI.js +0 -55
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  parseRace
3
- } from "../chunk-BL3VELKP.js";
4
- import "../chunk-V6LJFP4R.js";
3
+ } from "../chunk-Y5VVP73C.js";
4
+ import "../chunk-FANQVQ3D.js";
5
5
  import "../chunk-4U55VNC7.js";
6
- import "../chunk-PI4LLJG4.js";
6
+ import "../chunk-YD2VAHA6.js";
7
7
  import "../chunk-WYGD2UGN.js";
8
8
  import "../chunk-ZJXSXVFP.js";
9
- import "../chunk-2M34FLAY.js";
10
- import "../chunk-XTRDCSJB.js";
9
+ import "../chunk-5MXFW4O3.js";
10
+ import "../chunk-2JSQE3DD.js";
11
11
  import "../chunk-UA5KS2PL.js";
12
12
  export {
13
13
  parseRace
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  fixedAsiSchema,
3
3
  raceEntitySchema
4
- } from "../chunk-V6LJFP4R.js";
5
- import "../chunk-PI4LLJG4.js";
4
+ } from "../chunk-FANQVQ3D.js";
5
+ import "../chunk-YD2VAHA6.js";
6
6
  import "../chunk-WYGD2UGN.js";
7
7
  import "../chunk-ZJXSXVFP.js";
8
- import "../chunk-2M34FLAY.js";
9
- import "../chunk-XTRDCSJB.js";
8
+ import "../chunk-5MXFW4O3.js";
9
+ import "../chunk-2JSQE3DD.js";
10
10
  import "../chunk-UA5KS2PL.js";
11
11
  export {
12
12
  fixedAsiSchema,
@@ -2,9 +2,9 @@ import { z } from "zod";
2
2
  export declare const attackSchema: z.ZodObject<{
3
3
  name: z.ZodString;
4
4
  type: z.ZodEnum<{
5
- spell: "spell";
6
5
  melee: "melee";
7
6
  ranged: "ranged";
7
+ spell: "spell";
8
8
  }>;
9
9
  ability: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
10
10
  str: "str";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  choiceSchema
3
- } from "../chunk-2M34FLAY.js";
4
- import "../chunk-XTRDCSJB.js";
3
+ } from "../chunk-5MXFW4O3.js";
4
+ import "../chunk-2JSQE3DD.js";
5
5
  export {
6
6
  choiceSchema
7
7
  };
@@ -18,6 +18,31 @@ export declare const featureEffectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
18
  minimum: z.ZodOptional<z.ZodNumber>;
19
19
  condition: z.ZodOptional<z.ZodString>;
20
20
  subject: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ kind: z.ZodLiteral<"save-bonus">;
23
+ ability: z.ZodEnum<{
24
+ str: "str";
25
+ dex: "dex";
26
+ con: "con";
27
+ int: "int";
28
+ wis: "wis";
29
+ cha: "cha";
30
+ }>;
31
+ minimum: z.ZodOptional<z.ZodNumber>;
32
+ saves: z.ZodOptional<z.ZodArray<z.ZodEnum<{
33
+ str: "str";
34
+ dex: "dex";
35
+ con: "con";
36
+ int: "int";
37
+ wis: "wis";
38
+ cha: "cha";
39
+ }>>>;
40
+ inactive_while: z.ZodOptional<z.ZodEnum<{
41
+ incapacitated: "incapacitated";
42
+ unconscious: "unconscious";
43
+ }>>;
44
+ condition: z.ZodOptional<z.ZodString>;
45
+ subject: z.ZodOptional<z.ZodString>;
21
46
  }, z.core.$strip>, z.ZodObject<{
22
47
  kind: z.ZodLiteral<"half-proficiency">;
23
48
  skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -93,11 +118,24 @@ export declare const featureEffectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
93
118
  kind: z.ZodLiteral<"damage-bonus">;
94
119
  damage_type: z.ZodString;
95
120
  amount: z.ZodString;
96
- applies_to: z.ZodOptional<z.ZodEnum<{
97
- weapon: "weapon";
121
+ applies_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
98
122
  spell: "spell";
99
123
  all: "all";
100
- }>>;
124
+ }>, z.ZodEnum<{
125
+ weapon: "weapon";
126
+ melee: "melee";
127
+ ranged: "ranged";
128
+ unarmed: "unarmed";
129
+ finesse: "finesse";
130
+ thrown: "thrown";
131
+ }>, z.ZodArray<z.ZodEnum<{
132
+ weapon: "weapon";
133
+ melee: "melee";
134
+ ranged: "ranged";
135
+ unarmed: "unarmed";
136
+ finesse: "finesse";
137
+ thrown: "thrown";
138
+ }>>]>>;
101
139
  condition: z.ZodOptional<z.ZodString>;
102
140
  subject: z.ZodOptional<z.ZodString>;
103
141
  }, z.core.$strip>, z.ZodObject<{
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  featureEffectSchema
3
- } from "../chunk-XTRDCSJB.js";
3
+ } from "../chunk-2JSQE3DD.js";
4
4
  export {
5
5
  featureEffectSchema
6
6
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  featureObjectSchema,
3
3
  featureSchema
4
- } from "../chunk-PI4LLJG4.js";
4
+ } from "../chunk-YD2VAHA6.js";
5
5
  import "../chunk-WYGD2UGN.js";
6
6
  import "../chunk-ZJXSXVFP.js";
7
- import "../chunk-2M34FLAY.js";
8
- import "../chunk-XTRDCSJB.js";
7
+ import "../chunk-5MXFW4O3.js";
8
+ import "../chunk-2JSQE3DD.js";
9
9
  export {
10
10
  featureObjectSchema,
11
11
  featureSchema
@@ -11,8 +11,18 @@ export declare const selectionPoolSchema: z.ZodObject<{
11
11
  }, z.core.$strip>;
12
12
  count: z.ZodObject<{
13
13
  column: z.ZodString;
14
+ label: z.ZodOptional<z.ZodString>;
14
15
  }, z.core.$strip>;
15
16
  replaceable: z.ZodOptional<z.ZodBoolean>;
17
+ active: z.ZodOptional<z.ZodObject<{
18
+ column: z.ZodString;
19
+ label: z.ZodString;
20
+ verb: z.ZodString;
21
+ counter_label: z.ZodOptional<z.ZodString>;
22
+ create_label: z.ZodOptional<z.ZodString>;
23
+ create_verb: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>>;
25
+ head_resource: z.ZodOptional<z.ZodString>;
16
26
  }, z.core.$strip>;
17
27
  export declare const poolGrantSchema: z.ZodObject<{
18
28
  pool: z.ZodString;
@@ -2,7 +2,7 @@ import {
2
2
  poolGrantSchema,
3
3
  selectionPoolSchema,
4
4
  tabDeclSchema
5
- } from "../chunk-23LZLBJK.js";
5
+ } from "../chunk-G6MHJDVT.js";
6
6
  export {
7
7
  poolGrantSchema,
8
8
  selectionPoolSchema,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  spellCodec
3
- } from "../chunk-MWCCGPG3.js";
4
- import "../chunk-XY6X2APM.js";
3
+ } from "../chunk-OOSRUJBI.js";
4
+ import "../chunk-7Q2VPKCD.js";
5
5
  import "../chunk-ZDAEGJH4.js";
6
6
  import "../chunk-UA5KS2PL.js";
7
7
  export {
@@ -1,4 +1,4 @@
1
- import { Spell } from "./spell.types.js";
1
+ import { Spell, SpellMaterial } from "./spell.types.js";
2
2
  import { ParseResult } from "@archivist-gg/core";
3
3
  /**
4
4
  * §3.3 · collapse the converter's structured `components` object to the corpus's own string form
@@ -13,6 +13,11 @@ import { ParseResult } from "@archivist-gg/core";
13
13
  * the unreachable-shape fallback (the schema has already accepted the value by the time we run).
14
14
  */
15
15
  export declare function normalizeSpellComponents(value: unknown): string;
16
+ /**
17
+ * D2b-B · the structured material component the string form cannot carry: `components.m` when it is an OBJECT (`text` with an
18
+ * optional `cost` and `consume`), copied field by field; `undefined` for every other shape. Structural narrowing, as above.
19
+ */
20
+ export declare function spellMaterialOf(value: unknown): SpellMaterial | undefined;
16
21
  /**
17
22
  * §3.3 · collapse the converter's structured `duration` array to the corpus's own lowercase string
18
23
  * form (`until dispelled`, `up to 1 hour`), leaving a string input byte-unchanged. Concentration is
@@ -2,13 +2,15 @@ import {
2
2
  mirrorSpellShapes,
3
3
  normalizeSpellComponents,
4
4
  normalizeSpellDuration,
5
- parseSpell
6
- } from "../chunk-XY6X2APM.js";
5
+ parseSpell,
6
+ spellMaterialOf
7
+ } from "../chunk-7Q2VPKCD.js";
7
8
  import "../chunk-ZDAEGJH4.js";
8
9
  import "../chunk-UA5KS2PL.js";
9
10
  export {
10
11
  mirrorSpellShapes,
11
12
  normalizeSpellComponents,
12
13
  normalizeSpellDuration,
13
- parseSpell
14
+ parseSpell,
15
+ spellMaterialOf
14
16
  };
@@ -1,5 +1,10 @@
1
1
  import type { CastingOption } from "@archivist-gg/dnd5e/types/casting-option";
2
2
  export type { CastingOption };
3
+ export interface SpellMaterial {
4
+ text: string;
5
+ cost?: number;
6
+ consume?: boolean | string;
7
+ }
3
8
  export interface Spell {
4
9
  name: string;
5
10
  level?: number;
@@ -7,6 +12,11 @@ export interface Spell {
7
12
  casting_time?: string;
8
13
  range?: string;
9
14
  components?: string;
15
+ /** D2b-B: the converter's structured material component (`components.m` as an object), kept beside the `components` string,
16
+ * which cannot carry its numbers: `cost` in copper pieces as authored (5etools), `consume` true or a word ("optional").
17
+ * Absent for a string `components`, a bare `m: true` or a string `m`. A PARSE output only, never a YAML key: the codec
18
+ * drops it on serialize. */
19
+ material?: SpellMaterial;
10
20
  duration?: string;
11
21
  concentration?: boolean;
12
22
  ritual?: boolean;
@@ -0,0 +1,14 @@
1
+ export interface RetiredItem {
2
+ retired_slug: string;
3
+ retired_name: string;
4
+ /** The bundle-relative note path the retired record shipped at (dnd5e 0.3.12). */
5
+ retired_path: string;
6
+ kept_slug: string;
7
+ kept_name: string;
8
+ }
9
+ export declare const RETIRED_ITEMS: readonly RetiredItem[];
10
+ /** The kept slug for a retired item slug, or undefined. */
11
+ export declare function keptSlugFor(slug: string): string | undefined;
12
+ /** The kept slug for an UNWRAPPED link target: a slug, or a compendium path (`SRD 5e/Magic Items/Hand Crossbow +2`), read
13
+ * the way `resolveBaseItem` reads one. A vault-root path (`Compendium/SRD 5e/...`) never resolved and is left alone. */
14
+ export declare function keptSlugForLink(target: string): string | undefined;
@@ -0,0 +1,11 @@
1
+ import {
2
+ RETIRED_ITEMS,
3
+ keptSlugFor,
4
+ keptSlugForLink
5
+ } from "../chunk-CM5CWO4K.js";
6
+ import "../chunk-ZCTUYGNV.js";
7
+ export {
8
+ RETIRED_ITEMS,
9
+ keptSlugFor,
10
+ keptSlugForLink
11
+ };
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  subclassCodec
3
- } from "../chunk-R747YKS7.js";
4
- import "../chunk-J77CKYV3.js";
5
- import "../chunk-BLRW2UU6.js";
3
+ } from "../chunk-QZSWN2KT.js";
4
+ import "../chunk-OFCSP6MT.js";
5
+ import "../chunk-LF5AGJA4.js";
6
6
  import "../chunk-4U55VNC7.js";
7
- import "../chunk-23LZLBJK.js";
7
+ import "../chunk-G6MHJDVT.js";
8
8
  import "../chunk-CJYCVNW2.js";
9
- import "../chunk-PI4LLJG4.js";
9
+ import "../chunk-YD2VAHA6.js";
10
10
  import "../chunk-WYGD2UGN.js";
11
11
  import "../chunk-ZJXSXVFP.js";
12
- import "../chunk-2M34FLAY.js";
13
- import "../chunk-XTRDCSJB.js";
12
+ import "../chunk-5MXFW4O3.js";
13
+ import "../chunk-2JSQE3DD.js";
14
14
  import "../chunk-UA5KS2PL.js";
15
15
  export {
16
16
  subclassCodec
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  parseSubclass
3
- } from "../chunk-J77CKYV3.js";
4
- import "../chunk-BLRW2UU6.js";
3
+ } from "../chunk-OFCSP6MT.js";
4
+ import "../chunk-LF5AGJA4.js";
5
5
  import "../chunk-4U55VNC7.js";
6
- import "../chunk-23LZLBJK.js";
6
+ import "../chunk-G6MHJDVT.js";
7
7
  import "../chunk-CJYCVNW2.js";
8
- import "../chunk-PI4LLJG4.js";
8
+ import "../chunk-YD2VAHA6.js";
9
9
  import "../chunk-WYGD2UGN.js";
10
10
  import "../chunk-ZJXSXVFP.js";
11
- import "../chunk-2M34FLAY.js";
12
- import "../chunk-XTRDCSJB.js";
11
+ import "../chunk-5MXFW4O3.js";
12
+ import "../chunk-2JSQE3DD.js";
13
13
  import "../chunk-UA5KS2PL.js";
14
14
  export {
15
15
  parseSubclass
@@ -106,8 +106,18 @@ export declare const subclassEntitySchema: z.ZodObject<{
106
106
  }, z.core.$strip>;
107
107
  count: z.ZodObject<{
108
108
  column: z.ZodString;
109
+ label: z.ZodOptional<z.ZodString>;
109
110
  }, z.core.$strip>;
110
111
  replaceable: z.ZodOptional<z.ZodBoolean>;
112
+ active: z.ZodOptional<z.ZodObject<{
113
+ column: z.ZodString;
114
+ label: z.ZodString;
115
+ verb: z.ZodString;
116
+ counter_label: z.ZodOptional<z.ZodString>;
117
+ create_label: z.ZodOptional<z.ZodString>;
118
+ create_verb: z.ZodOptional<z.ZodString>;
119
+ }, z.core.$strip>>;
120
+ head_resource: z.ZodOptional<z.ZodString>;
111
121
  }, z.core.$strip>>>;
112
122
  pool_grants: z.ZodOptional<z.ZodArray<z.ZodObject<{
113
123
  pool: z.ZodString;
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  subclassEntitySchema
3
- } from "../chunk-BLRW2UU6.js";
4
- import "../chunk-23LZLBJK.js";
3
+ } from "../chunk-LF5AGJA4.js";
4
+ import "../chunk-G6MHJDVT.js";
5
5
  import "../chunk-CJYCVNW2.js";
6
- import "../chunk-PI4LLJG4.js";
6
+ import "../chunk-YD2VAHA6.js";
7
7
  import "../chunk-WYGD2UGN.js";
8
8
  import "../chunk-ZJXSXVFP.js";
9
- import "../chunk-2M34FLAY.js";
10
- import "../chunk-XTRDCSJB.js";
9
+ import "../chunk-5MXFW4O3.js";
10
+ import "../chunk-2JSQE3DD.js";
11
11
  import "../chunk-UA5KS2PL.js";
12
12
  export {
13
13
  subclassEntitySchema
@@ -75,11 +75,21 @@ export interface EntityFilter {
75
75
  /** Armor proficiency class. Matched against an armor entity's `category`
76
76
  * field exactly; "shield" selects shields. */
77
77
  armor_category?: "light" | "medium" | "heavy" | "shield";
78
+ /** Item axis: an item entity's `type` ("instrument", "artisan's tools", "gaming set"); ANY listed type matches.
79
+ * Compared case-insensitively with apostrophes, separators and a plural "s" folded (`categoryWords` in
80
+ * pc.tool-picks.ts), so "artisans tools" matches "artisan's tools". A starting-equipment tool category
81
+ * (`musical-instrument`, `artisan's-tools`, `gaming-set`, or an `X-or-Y` union of them) sets it. */
82
+ item_type?: string[];
83
+ /** Item axis: true keeps only MUNDANE items, dropping one whose `rarity` names a magic tier. Starting gear sets
84
+ * it, because magic instruments (Instrument of Scribing, +3 Rhythm-Maker's Drum) also carry `type: instrument`. */
85
+ mundane?: boolean;
78
86
  /** Spell axis: filter spells by class list, level, and edition. Set together on a
79
87
  * select-entity{entity_type:"spell"} choice (e.g. Magic Initiate). */
80
88
  list?: string;
81
89
  level?: number;
82
90
  edition?: string;
91
+ /** D2b-A: true keeps only spells a note marks `ritual` (Pact of the Tome's rituals). */
92
+ ritual?: boolean;
83
93
  }
84
94
  export interface InlineOption {
85
95
  value: string;
@@ -108,6 +118,9 @@ export type Choice = {
108
118
  entity_type: string;
109
119
  from?: string[];
110
120
  where?: EntityFilter;
121
+ /** D2b-A: the pick names a TARGET (the cantrip a blast invocation's rider reaches), not a grant: nothing it picks
122
+ * becomes the character's own (a spell, a feat, a feature). */
123
+ target?: true;
111
124
  } | {
112
125
  kind: "select-proficiency";
113
126
  id: string;
@@ -1,7 +1,9 @@
1
1
  /** One thing a starting-equipment option grants. `item` is a BARE compendium
2
2
  * slug (e.g. "chain-mail"); the seeder resolves it to the full edition slug.
3
3
  * `category` is a player-picked class of item ("martial-weapon",
4
- * "simple-weapon", "martial-melee-weapon", "any-armor", "shield", …) resolved
4
+ * "simple-weapon", "martial-melee-weapon", "any-armor", "shield",
5
+ * "musical-instrument", "artisan's-tools", "gaming-set", a tool `X-or-Y` union;
6
+ * the vocabulary is `categoryToEntitySelect`'s in pc.decision-engine.ts) resolved
5
7
  * by a nested select-entity. `gold` is gp folded into the bundle. */
6
8
  export type EquipmentGrant =
7
9
  /** `contains_value` (COPPER; `1500` = 15 gp) is seeded as gold by the plugin's starting-equipment seeder
@@ -19,6 +21,21 @@ export type EquipmentGrant =
19
21
  } | {
20
22
  gold: number;
21
23
  };
24
+ /** THE rule for which grant is a player-picked CATEGORY: an object whose `category` is a non-empty string. Shared by
25
+ * the engine's nested-pick synthesis and the plugin's seeder, so the nth category grant of an option always
26
+ * consumes the nth pick key and the two can never count a malformed grant differently. */
27
+ export declare function isCategoryGrant(g: unknown): g is Extract<EquipmentGrant, {
28
+ category: string;
29
+ }>;
30
+ /** The persistence key of the nested pick for grant `k` of option `j` of starting-equipment entry `i`: the one
31
+ * spelling the engine emits and the plugin reads. `k` indexes the option's WHOLE grant list, not its category
32
+ * grants alone. */
33
+ export declare const equipmentCategoryKey: (i: number, j: number, k: number) => string;
34
+ /** The ORDERED pick keys of one option's category grants, the order `resolveGrants` consumes them in. */
35
+ export declare const equipmentCategoryKeys: (grants: readonly unknown[], i: number, j: number) => string[];
36
+ /** True for a starting-equipment decision key (`equipment-<i>` and its nested picks). The Equipment step owns
37
+ * these; every other step's decision strip leaves them out. */
38
+ export declare const isStartingEquipmentKey: (key: string) => boolean;
22
39
  /** One selectable option of a `kind:"choice"` starting-equipment entry. `label`
23
40
  * is the human display string (the `.pc-cb-eqopt` text); `grants` is what seeds. */
24
41
  export interface EquipmentOption {
@@ -0,0 +1,12 @@
1
+ import {
2
+ equipmentCategoryKey,
3
+ equipmentCategoryKeys,
4
+ isCategoryGrant,
5
+ isStartingEquipmentKey
6
+ } from "../chunk-2LULMQTF.js";
7
+ export {
8
+ equipmentCategoryKey,
9
+ equipmentCategoryKeys,
10
+ isCategoryGrant,
11
+ isStartingEquipmentKey
12
+ };
@@ -1,5 +1,10 @@
1
1
  import type { Ability } from "./choice.js";
2
2
  export type SenseType = "darkvision" | "blindsight" | "tremorsense" | "truesight";
3
+ /** A damage rider's weapon scope, the `damage-bonus` arm's structured `applies_to` words (ART-c1 Task 9b, controller
4
+ * ruling 8): `melee` and `ranged` are the weapon's CATEGORY (a thrown melee weapon stays melee), `unarmed` the engine's
5
+ * Unarmed Strike row, `finesse` and `thrown` the row's properties, and `weapon` every attack row (today's reach, the
6
+ * Unarmed Strike row included). A list reaches a row when ANY word matches it. */
7
+ export type WeaponScope = "weapon" | "melee" | "ranged" | "unarmed" | "finesse" | "thrown";
3
8
  /** Present on every arm: whose numbers the effect changes. Absent === "self". The engine's fold readers skip
4
9
  * every effect whose subject is present and not "self" (`foldsOnSelf` in pc.feature-effects.ts). */
5
10
  type Subject = {
@@ -22,6 +27,12 @@ export type FeatureEffect = ({
22
27
  skills: string[];
23
28
  ability: Ability;
24
29
  minimum?: number;
30
+ } & Qualified) | ({
31
+ kind: "save-bonus";
32
+ ability: Ability;
33
+ minimum?: number;
34
+ saves?: Ability[];
35
+ inactive_while?: "incapacitated" | "unconscious";
25
36
  } & Qualified) | ({
26
37
  kind: "half-proficiency";
27
38
  skills?: string[];
@@ -69,7 +80,7 @@ export type FeatureEffect = ({
69
80
  kind: "damage-bonus";
70
81
  damage_type: string;
71
82
  amount: string;
72
- applies_to?: "weapon" | "spell" | "all";
83
+ applies_to?: "spell" | "all" | WeaponScope | WeaponScope[];
73
84
  } & Qualified) | ({
74
85
  kind: "proficiency";
75
86
  proficiency_type: "skill" | "tool" | "language" | "saving-throw" | "armor" | "weapon";
@@ -1,3 +1,4 @@
1
+ import type { Choice } from "./choice.js";
1
2
  import type { FeatureEffect } from "./feature-effect.js";
2
3
  import type { ActionCost, ResetTrigger, ResourceConsumption } from "./resource.js";
3
4
  import type { Duration } from "../schemas/duration-schema.js";
@@ -8,7 +9,7 @@ import type { AdditionalSpellsEntry, ProgressionEntry } from "../schemas/entity-
8
9
  * `feature_type` field is now an open string (see {@link OptionalFeatureEntity})
9
10
  * so homebrew categories parse; this union is kept purely as a reference list.
10
11
  */
11
- export type OptionalFeatureKind = "invocation" | "fighting_style" | "metamagic" | "maneuver" | "infusion";
12
+ export type OptionalFeatureKind = "invocation" | "fighting_style" | "metamagic" | "maneuver" | "infusion" | "artificer_plan";
12
13
  /** A class/subclass named reference carried by a level prerequisite; mirrors namedRefSchema. */
13
14
  export type OptionalFeatureNamedRef = {
14
15
  name: string;
@@ -45,6 +46,76 @@ export type OptionalFeaturePrerequisite = {
45
46
  entry?: string;
46
47
  entry_summary?: string;
47
48
  };
49
+ /** ART-a (spec §4.2). */
50
+ export interface FilterSpec {
51
+ rarity: string[];
52
+ types?: string[];
53
+ exclude_types?: string[];
54
+ cursed?: false;
55
+ }
56
+ export interface OptionCreates {
57
+ item?: string;
58
+ variant?: {
59
+ candidates: string[];
60
+ };
61
+ filter?: FilterSpec;
62
+ }
63
+ export interface OptionRow {
64
+ key: string;
65
+ name: string;
66
+ min_level: number;
67
+ attunement?: boolean;
68
+ creates: OptionCreates;
69
+ }
70
+ export interface InfuseItem {
71
+ bonuses?: {
72
+ ac?: number;
73
+ weapon_attack?: number;
74
+ weapon_damage?: number;
75
+ spell_attack?: number;
76
+ saving_throws?: number;
77
+ speed?: {
78
+ walk?: number;
79
+ fly?: number;
80
+ swim?: number;
81
+ climb?: number;
82
+ };
83
+ };
84
+ resist?: string[];
85
+ charges?: {
86
+ max: number;
87
+ dice?: string;
88
+ recharge?: string;
89
+ recharge_amount?: string;
90
+ };
91
+ action?: ActionCost;
92
+ /** ART-c1 (R-3 a): the Actions row's range ("Self"); absent draws no range. */
93
+ range?: string;
94
+ }
95
+ export interface InfuseTarget {
96
+ kind: "armor" | "shield" | "weapon" | "gear";
97
+ category?: string[];
98
+ property?: string;
99
+ name_any?: string[];
100
+ }
101
+ export interface InfuseBlock {
102
+ targets: InfuseTarget[];
103
+ targets_label?: string;
104
+ new_object?: string;
105
+ rarity?: string;
106
+ attunement?: {
107
+ required: true;
108
+ };
109
+ choice?: {
110
+ kind: "damage-type";
111
+ options?: string[];
112
+ };
113
+ item?: InfuseItem;
114
+ scales_at?: Array<{
115
+ level: number;
116
+ item: InfuseItem;
117
+ }>;
118
+ }
48
119
  export interface OptionalFeatureEntity {
49
120
  slug: string;
50
121
  name: string;
@@ -87,4 +158,16 @@ export interface OptionalFeatureEntity {
87
158
  optionalfeature_progression?: ProgressionEntry[];
88
159
  /** One wikilink, or an array of them for the multi-fluff-image emit. */
89
160
  image?: string | string[];
161
+ /** ART-a (spec §4.1): a pick is a COPY `<note slug>#<param>`; needs `options` and `item_choice`. */
162
+ repeatable?: true;
163
+ /** `learn`: the param is the item's FULL slug (TCE); `create`: the param is a row key, the item chosen at Create (EFA). */
164
+ item_choice?: "learn" | "create";
165
+ /** The table a copy's param must satisfy (spec §4.2). */
166
+ options?: OptionRow[];
167
+ /** This member infuses an existing object; its effect is an item-vocabulary overlay (spec §4.2). */
168
+ infuse?: InfuseBlock;
169
+ /** D2b-A (design §2.2 step 1): the member's OWN choices (Lessons of the First Ones' Origin feat, Superior Technique's
170
+ * maneuver, Pact of the Tome's cantrips and rituals), in the same `Choice` vocabulary features and feats use. Absent,
171
+ * the engine derives them from the raw keys the note already carries (`memberChoices`, `pc.member-choices.ts`). */
172
+ choices?: Choice[];
90
173
  }
@@ -1,3 +1,12 @@
1
+ /** ART-a (spec §4.5): the at-once counter of an item-bound pool; its defaults are applied at read (`poolActiveWords`). */
2
+ export interface PoolActive {
3
+ column: string;
4
+ label: string;
5
+ verb: string;
6
+ counter_label?: string;
7
+ create_label?: string;
8
+ create_verb?: string;
9
+ }
1
10
  /** A (sub)class-declared selectable pool (e.g. Interdict Boons). The engine is
2
11
  * generic: every game-specific string lives here in data, never in code. */
3
12
  export interface SelectionPool {
@@ -10,11 +19,17 @@ export interface SelectionPool {
10
19
  available_to: "self";
11
20
  };
12
21
  };
13
- /** Pick count read from the owning class table column at the current level. */
22
+ /** Pick count read from the owning class table column at the current level. `label` is the known-counter word,
23
+ * read through `poolCountLabel` (absent reads "Known", ART-a spec §4.5). */
14
24
  count: {
15
25
  column: string;
26
+ label?: string;
16
27
  };
17
28
  replaceable?: boolean;
29
+ /** ART-a (spec §4.5): the at-once counter (Infused Items, Magic Items). */
30
+ active?: PoolActive;
31
+ /** ART-a (spec §4.5): a resource id the tab head shows when the pool spends none of its own. */
32
+ head_resource?: string;
18
33
  }
19
34
  /** Subclass auto-grants that extend a named pool and do NOT count toward picks. */
20
35
  export interface PoolGrant {
@@ -28,8 +43,8 @@ export interface PoolGrant {
28
43
  * members' `rendering_hint` at resolve time onto `ResolvedPool.layout` (pc/pool-layout.ts), and that
29
44
  * derivation is UNCONDITIONAL: it runs whether or not the declaration carries a `layout`. R4-G4 T5
30
45
  * LANDED the precedence in the plugin: `TabsContainer`'s dynamic-pool-tab loop reads the AUTHORED
31
- * value first, then `ResolvedPool.layout`, then the `spell-like` default, and `PoolTab`'s `LAYOUTS`
32
- * registry routes all four members (an unknown string degrades to `spell-like` and never throws).
46
+ * value first, then `ResolvedPool.layout`. Since PT (spec §9) every pool tab draws one table and the value
47
+ * picks only the tab's HEAD (`poolPresentation`); `spell-like` and `blocks` still parse and are ignored.
33
48
  * R4-G5 CLOSED that list, and NOT by adding values: `pool-selection` and `stance` never get a layout value
34
49
  * (measured, spec §10: the three `stance`-hinted documents are field-identical to three unhinted siblings, and
35
50
  * `pool-selection`'s meaning is delivered by `spell-like` plus the §5 head), and `granted-die-to-ally` is a
@@ -1,13 +1,15 @@
1
1
  import type { WeaponEntity } from "./weapon.types.js";
2
2
  /** The two attack modes a weapon supports, derived from data the SRD pipeline
3
- * actually preserves. The SRD runtime data miscategorizes throwable MELEE
4
- * weapons (dagger/spear/handaxe/javelin/light hammer/trident) as `*-ranged`,
5
- * so the melee/ranged split is reconstructed here instead of trusted:
6
- * a category-ranged weapon is PURE ranged only when it needs ammunition or
7
- * loading, or is one of the two genuinely-ranged thrown weapons (dart, net —
8
- * a closed SRD set; a homebrew weapon whose bare slug is exactly "dart"/"net"
9
- * is force-classified pure ranged). Everything else category-ranged is a
10
- * throwable melee weapon. `reach` is 5 ft, +5 with the reach property. */
3
+ * actually preserves. Since dnd5e 0.3.13 the SRD data files the throwable
4
+ * MELEE weapons (dagger/spear/handaxe/javelin/light hammer/trident) as
5
+ * `*-melee`, but older SRD data, imported records and homebrew can still file
6
+ * them as `*-ranged` (by their thrown range), so the melee/ranged split is
7
+ * reconstructed here instead of trusted: a category-ranged weapon is PURE
8
+ * ranged only when it needs ammunition or loading, or is one of the two
9
+ * genuinely-ranged thrown weapons (dart, net: a closed SRD set; a homebrew
10
+ * weapon whose bare slug is exactly "dart"/"net" is force-classified pure
11
+ * ranged). Everything else category-ranged is a throwable melee weapon.
12
+ * `reach` is 5 ft., +5 with the reach property. */
11
13
  export interface WeaponRangeModes {
12
14
  melee: {
13
15
  reach: number;