@archivist-gg/dnd5e 0.3.1 → 0.3.5

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 (259) hide show
  1. package/LICENSES/SRD.md +25 -6
  2. package/dist/armor/armor.codec.js +4 -3
  3. package/dist/armor/armor.parser.js +3 -2
  4. package/dist/armor/armor.schema.d.ts +4 -0
  5. package/dist/armor/armor.schema.js +2 -1
  6. package/dist/armor/armor.types.d.ts +8 -0
  7. package/dist/background/background.codec.js +7 -6
  8. package/dist/background/background.parser.js +6 -5
  9. package/dist/background/background.schema.d.ts +26 -0
  10. package/dist/background/background.schema.js +5 -4
  11. package/dist/background/background.types.d.ts +22 -0
  12. package/dist/{chunk-4TIJKN6O.js → chunk-23LZLBJK.js} +1 -1
  13. package/dist/{chunk-AFKTJXRA.js → chunk-2DFENQIJ.js} +18 -0
  14. package/dist/chunk-2FRUSVZS.js +489 -0
  15. package/dist/chunk-2VDTW7QO.js +1580 -0
  16. package/dist/{chunk-ZZGEVJKX.js → chunk-3JOTQW7A.js} +1 -1
  17. package/dist/{chunk-5ZBE4CWV.js → chunk-3PZHBLFG.js} +1 -1
  18. package/dist/chunk-4U55VNC7.js +22 -0
  19. package/dist/{chunk-4JHOHWBI.js → chunk-4XTNPNQB.js} +1 -1
  20. package/dist/{chunk-HCP3GMHS.js → chunk-5N2GW72F.js} +15 -2
  21. package/dist/{chunk-42Y5IJKT.js → chunk-5RKLL2AD.js} +5 -1
  22. package/dist/{chunk-SE7AZDR3.js → chunk-63XQXPZL.js} +29 -3
  23. package/dist/{chunk-4F6AIZ36.js → chunk-6BFWZW6T.js} +1 -1
  24. package/dist/{chunk-GJOI2GHP.js → chunk-6GNXYAYP.js} +1 -1
  25. package/dist/{chunk-66XXW2Z2.js → chunk-6PXTNCBP.js} +2 -2
  26. package/dist/chunk-6X2NV665.js +33 -0
  27. package/dist/{chunk-LV4SNWZQ.js → chunk-6X4KUDMU.js} +8 -1
  28. package/dist/{chunk-ZMR77DDL.js → chunk-AW3EHF3L.js} +1 -1
  29. package/dist/{chunk-TLYDBT5F.js → chunk-CGRLQ34U.js} +64 -7
  30. package/dist/chunk-CJYCVNW2.js +7 -0
  31. package/dist/{chunk-XLSVNUTK.js → chunk-CV5XDJKU.js} +1 -1
  32. package/dist/{chunk-RAWJTA45.js → chunk-DEEHHLAP.js} +1 -1
  33. package/dist/{chunk-6IRYTM5V.js → chunk-DPUJDOKV.js} +119 -28
  34. package/dist/{chunk-GE4TLPWM.js → chunk-EHDATXP7.js} +1 -1
  35. package/dist/chunk-EVMUJYUD.js +195 -0
  36. package/dist/{chunk-K6Q5OUGK.js → chunk-GFZ7PITJ.js} +86 -10
  37. package/dist/{chunk-6NK2MUD3.js → chunk-HZA7OE7N.js} +9 -2
  38. package/dist/{chunk-TN6ZLTNU.js → chunk-I2NDWFDD.js} +51 -4
  39. package/dist/{chunk-3DZ74AKK.js → chunk-IN4M4X7P.js} +8 -2
  40. package/dist/chunk-IUAAXXNO.js +58 -0
  41. package/dist/{chunk-NXSWH3AE.js → chunk-IWRVOCT5.js} +1 -1
  42. package/dist/{chunk-XJNECUPT.js → chunk-JC5UNIVM.js} +19 -0
  43. package/dist/{chunk-24GFQU7T.js → chunk-JSZ4H6AQ.js} +1 -1
  44. package/dist/{chunk-XTIQWSFM.js → chunk-KADJZGZY.js} +1 -1
  45. package/dist/{chunk-L7E2UT5A.js → chunk-KK33PIDN.js} +5 -1
  46. package/dist/chunk-KPEJMNRD.js +302 -0
  47. package/dist/chunk-KU3YLF6D.js +106 -0
  48. package/dist/{chunk-5INR4NSL.js → chunk-LDDCNPHD.js} +1 -1
  49. package/dist/chunk-LVQLWRCU.js +15 -0
  50. package/dist/chunk-MI7P3NX3.js +161 -0
  51. package/dist/{chunk-PHQRGDRQ.js → chunk-N3A5ICBO.js} +5 -1
  52. package/dist/chunk-O4SRD3J5.js +165 -0
  53. package/dist/chunk-OAXWSVJB.js +81 -0
  54. package/dist/chunk-OZP6JFGT.js +162 -0
  55. package/dist/{chunk-NAEPSZAM.js → chunk-PDJSUH24.js} +24 -2
  56. package/dist/chunk-PP2UHLBA.js +50 -0
  57. package/dist/chunk-PVCEA4HZ.js +6 -0
  58. package/dist/{chunk-RSDRMH54.js → chunk-RF4TYCA2.js} +1 -1
  59. package/dist/chunk-RLGQ5PZZ.js +16 -0
  60. package/dist/chunk-RVXC6ZHY.js +89 -0
  61. package/dist/chunk-S7REMWW4.js +21 -0
  62. package/dist/{chunk-7VJ6BOA5.js → chunk-SMLXZUBH.js} +9 -1
  63. package/dist/chunk-TOM66P2P.js +38 -0
  64. package/dist/chunk-UA5KS2PL.js +26 -0
  65. package/dist/{chunk-N6N74K6X.js → chunk-UBBKSYBY.js} +1 -1
  66. package/dist/{chunk-353WXS6S.js → chunk-UIRMA5KM.js} +1 -1
  67. package/dist/{chunk-BIK4DFWK.js → chunk-ULCQ73LA.js} +1 -1
  68. package/dist/{chunk-2BWAID3Y.js → chunk-UMWIPLLM.js} +29 -3
  69. package/dist/chunk-UQ3ZFCWD.js +178 -0
  70. package/dist/chunk-UXPGW4TI.js +101 -0
  71. package/dist/chunk-V2MJE6NC.js +133 -0
  72. package/dist/{chunk-D3CLOBE3.js → chunk-V373TRJE.js} +48 -10
  73. package/dist/chunk-VQAXTIBW.js +100 -0
  74. package/dist/chunk-W74BCA7V.js +159 -0
  75. package/dist/{chunk-WP2CX2JO.js → chunk-WELIKLZF.js} +22 -1
  76. package/dist/{chunk-MDEJHMKK.js → chunk-WHVLNFTG.js} +26 -5
  77. package/dist/{chunk-GZ46OVGZ.js → chunk-WSVMLNTO.js} +1 -1
  78. package/dist/{chunk-4LZJXJJS.js → chunk-WXWPK3LI.js} +6 -2
  79. package/dist/chunk-X3D6LXUU.js +185 -0
  80. package/dist/chunk-XJ2F2WO6.js +8 -0
  81. package/dist/{chunk-73HOFQQ5.js → chunk-Y4AGLCY6.js} +1 -1
  82. package/dist/chunk-YBLDE5CG.js +42 -0
  83. package/dist/{chunk-JEYQU3JT.js → chunk-YHYTW5QA.js} +2 -18
  84. package/dist/{chunk-PZOWBI3B.js → chunk-YLL2QXY2.js} +7 -2
  85. package/dist/class/class.codec.js +12 -9
  86. package/dist/class/class.parser.js +11 -8
  87. package/dist/class/class.schema.d.ts +55 -3
  88. package/dist/class/class.schema.js +9 -7
  89. package/dist/class/class.types.d.ts +48 -3
  90. package/dist/condition/condition.codec.d.ts +9 -0
  91. package/dist/condition/condition.entity-type.d.ts +2 -0
  92. package/dist/condition/condition.parser.d.ts +13 -0
  93. package/dist/condition/condition.parser.js +7 -0
  94. package/dist/condition/condition.schema.d.ts +29 -0
  95. package/dist/condition/condition.types.d.ts +15 -0
  96. package/dist/condition/condition.types.js +0 -0
  97. package/dist/dnd/constants.d.ts +22 -0
  98. package/dist/dnd/constants.js +9 -3
  99. package/dist/dnd/formula-tags.js +2 -2
  100. package/dist/dnd/math.d.ts +26 -0
  101. package/dist/dnd/math.js +12 -2
  102. package/dist/dnd/prose-tags.js +1 -1
  103. package/dist/dnd/resource-formula.d.ts +36 -10
  104. package/dist/dnd/resource-formula.js +10 -155
  105. package/dist/dnd/srd-tag-converter.js +3 -3
  106. package/dist/dnd/tag-grammar.js +1 -1
  107. package/dist/dnd/warn-once.d.ts +2 -0
  108. package/dist/dnd/warn-once.js +8 -0
  109. package/dist/entities/base-item-resolver.js +2 -2
  110. package/dist/entities/slug.d.ts +13 -0
  111. package/dist/entities/slug.js +5 -3
  112. package/dist/entities/wikilink-display.d.ts +3 -0
  113. package/dist/entities/wikilink-display.js +10 -0
  114. package/dist/feat/feat.category-codes.d.ts +32 -0
  115. package/dist/feat/feat.category-codes.js +14 -0
  116. package/dist/feat/feat.codec.js +7 -5
  117. package/dist/feat/feat.parser.js +6 -4
  118. package/dist/feat/feat.schema.d.ts +239 -0
  119. package/dist/feat/feat.schema.js +5 -3
  120. package/dist/feat/feat.types.d.ts +37 -1
  121. package/dist/index.js +2033 -6907
  122. package/dist/item/item.codec.js +4 -3
  123. package/dist/item/item.enrichment.js +4 -4
  124. package/dist/item/item.parser.js +3 -2
  125. package/dist/item/item.schema.d.ts +69 -3
  126. package/dist/item/item.schema.js +2 -1
  127. package/dist/item/item.types.d.ts +69 -3
  128. package/dist/monster/monster.codec.d.ts +7 -6
  129. package/dist/monster/monster.enrichment.js +4 -4
  130. package/dist/monster/monster.format.d.ts +135 -0
  131. package/dist/monster/monster.format.js +78 -0
  132. package/dist/monster/monster.parser.d.ts +6 -1
  133. package/dist/monster/monster.parser.js +10 -1
  134. package/dist/monster/monster.schema.d.ts +369 -0
  135. package/dist/monster/monster.schema.js +34 -0
  136. package/dist/monster/monster.types.d.ts +200 -14
  137. package/dist/optional-feature/optional-feature.codec.js +6 -5
  138. package/dist/optional-feature/optional-feature.parser.js +5 -4
  139. package/dist/optional-feature/optional-feature.schema.d.ts +185 -0
  140. package/dist/optional-feature/optional-feature.schema.js +4 -3
  141. package/dist/pack.d.ts +1 -1
  142. package/dist/pc/conditions.constants.d.ts +0 -1
  143. package/dist/pc/conditions.constants.js +1 -3
  144. package/dist/pc/decision-recognizer.js +1 -1
  145. package/dist/pc/pc.additional-spells.d.ts +47 -0
  146. package/dist/pc/pc.additional-spells.js +23 -0
  147. package/dist/pc/pc.asi-flatten.d.ts +18 -0
  148. package/dist/pc/pc.decision-engine.d.ts +105 -17
  149. package/dist/pc/pc.decision-engine.js +28 -12
  150. package/dist/pc/pc.defense-normalize.d.ts +11 -0
  151. package/dist/pc/pc.defense-normalize.js +6 -0
  152. package/dist/pc/pc.equipment.d.ts +31 -2
  153. package/dist/pc/pc.equipment.js +12 -8
  154. package/dist/pc/pc.feature-effects.d.ts +234 -11
  155. package/dist/pc/pc.feature-effects.js +21 -5
  156. package/dist/pc/pc.parser.js +2 -2
  157. package/dist/pc/pc.pools.d.ts +11 -3
  158. package/dist/pc/pc.pools.js +9 -13
  159. package/dist/pc/pc.proficiencies.d.ts +54 -29
  160. package/dist/pc/pc.proficiencies.js +74 -95
  161. package/dist/pc/pc.proficiency-grants.d.ts +58 -0
  162. package/dist/pc/pc.proficiency-normalize.d.ts +24 -0
  163. package/dist/pc/pc.proficiency-normalize.js +12 -0
  164. package/dist/pc/pc.proficiency-query.d.ts +13 -0
  165. package/dist/pc/pc.proficiency-query.js +1 -1
  166. package/dist/pc/pc.recalc.d.ts +69 -14
  167. package/dist/pc/pc.recalc.js +261 -122
  168. package/dist/pc/pc.resolver.d.ts +34 -8
  169. package/dist/pc/pc.resolver.js +27 -12
  170. package/dist/pc/pc.resource-seed.d.ts +3 -2
  171. package/dist/pc/pc.resource-seed.js +19 -17
  172. package/dist/pc/pc.resources.d.ts +87 -0
  173. package/dist/pc/pc.resources.js +21 -0
  174. package/dist/pc/pc.rest.d.ts +10 -1
  175. package/dist/pc/pc.rest.js +66 -12
  176. package/dist/pc/pc.schema.d.ts +139 -3
  177. package/dist/pc/pc.schema.js +4 -2
  178. package/dist/pc/pc.slotting.js +3 -3
  179. package/dist/pc/pc.spellcasting.d.ts +75 -6
  180. package/dist/pc/pc.spellcasting.js +16 -6
  181. package/dist/pc/pc.table-column.d.ts +23 -0
  182. package/dist/pc/pc.table-column.js +13 -3
  183. package/dist/pc/pc.types.d.ts +251 -12
  184. package/dist/pc/pool-layout.d.ts +47 -0
  185. package/dist/pc/pool-layout.js +16 -0
  186. package/dist/pc/roll-scope.d.ts +2 -0
  187. package/dist/pc/roll-scope.js +8 -0
  188. package/dist/pc/roll-tag-labels.d.ts +40 -0
  189. package/dist/pc/roll-tag-labels.js +17 -0
  190. package/dist/pc/spell-source.d.ts +21 -0
  191. package/dist/pc/spell-source.js +13 -0
  192. package/dist/race/race.codec.js +9 -7
  193. package/dist/race/race.parser.js +8 -6
  194. package/dist/race/race.schema.d.ts +51 -1
  195. package/dist/race/race.schema.js +8 -5
  196. package/dist/race/race.structural.d.ts +7 -0
  197. package/dist/race/race.structural.js +6 -0
  198. package/dist/race/race.types.d.ts +20 -0
  199. package/dist/schemas/attack-schema.d.ts +5 -0
  200. package/dist/schemas/caster-type-schema.d.ts +14 -0
  201. package/dist/schemas/caster-type-schema.js +6 -0
  202. package/dist/schemas/choice-schema.js +2 -2
  203. package/dist/schemas/entity-extras-schema.d.ts +53 -0
  204. package/dist/schemas/entity-extras-schema.js +10 -0
  205. package/dist/schemas/equipment-grant-schema.d.ts +2 -0
  206. package/dist/schemas/equipment-grant-schema.js +1 -1
  207. package/dist/schemas/feature-alias.d.ts +34 -0
  208. package/dist/schemas/feature-effect-schema.d.ts +133 -0
  209. package/dist/schemas/feature-effect-schema.js +1 -1
  210. package/dist/schemas/feature-schema.d.ts +8 -0
  211. package/dist/schemas/feature-schema.js +6 -4
  212. package/dist/schemas/resource-schema.d.ts +43 -0
  213. package/dist/schemas/resource-schema.js +1 -1
  214. package/dist/schemas/selection-pool-schema.d.ts +2 -0
  215. package/dist/schemas/selection-pool-schema.js +1 -1
  216. package/dist/spell/spell.access.js +23 -3
  217. package/dist/spell/spell.codec.js +4 -3
  218. package/dist/spell/spell.enrichment.js +4 -4
  219. package/dist/spell/spell.parser.d.ts +30 -0
  220. package/dist/spell/spell.parser.js +9 -2
  221. package/dist/spell/spell.scaling.d.ts +27 -6
  222. package/dist/spell/spell.scaling.js +25 -6
  223. package/dist/spell/spell.schema.d.ts +44 -2
  224. package/dist/spell/spell.schema.js +2 -1
  225. package/dist/spell/spell.types.d.ts +14 -0
  226. package/dist/subclass/subclass.codec.d.ts +1 -1
  227. package/dist/subclass/subclass.codec.js +11 -8
  228. package/dist/subclass/subclass.parser.js +10 -7
  229. package/dist/subclass/subclass.schema.d.ts +54 -7
  230. package/dist/subclass/subclass.schema.js +8 -6
  231. package/dist/subclass/subclass.types.d.ts +20 -2
  232. package/dist/types/choice.d.ts +53 -2
  233. package/dist/types/choice.js +13 -1
  234. package/dist/types/equipment-grant.d.ts +8 -1
  235. package/dist/types/feature-effect.d.ts +85 -23
  236. package/dist/types/feature.d.ts +70 -1
  237. package/dist/types/optional-feature.types.d.ts +28 -0
  238. package/dist/types/resource.d.ts +21 -1
  239. package/dist/types/selection-pool.d.ts +17 -2
  240. package/dist/weapon/weapon.classify.js +2 -2
  241. package/dist/weapon/weapon.codec.js +4 -3
  242. package/dist/weapon/weapon.parser.js +3 -2
  243. package/dist/weapon/weapon.schema.d.ts +4 -0
  244. package/dist/weapon/weapon.schema.js +2 -1
  245. package/dist/weapon/weapon.types.d.ts +8 -0
  246. package/package.json +2 -2
  247. package/dist/chunk-5XUXXAQJ.js +0 -30
  248. package/dist/chunk-7P65Q426.js +0 -158
  249. package/dist/chunk-7TEK5KK7.js +0 -49
  250. package/dist/chunk-AIRFC5NQ.js +0 -143
  251. package/dist/chunk-CZPMTQOY.js +0 -68
  252. package/dist/chunk-N2JE7BWL.js +0 -81
  253. package/dist/chunk-NXR3BD2V.js +0 -90
  254. package/dist/chunk-O5EYMKFH.js +0 -6
  255. package/dist/chunk-Q5K6LWBZ.js +0 -45
  256. package/dist/chunk-TNUFPIXI.js +0 -1110
  257. package/dist/chunk-TZK36BU7.js +0 -38
  258. package/dist/chunk-W7HWMMBF.js +0 -46
  259. package/dist/chunk-Y4I74YEG.js +0 -33
@@ -5,8 +5,33 @@ export declare const spellEntitySchema: z.ZodObject<{
5
5
  school: z.ZodOptional<z.ZodString>;
6
6
  casting_time: z.ZodOptional<z.ZodString>;
7
7
  range: z.ZodOptional<z.ZodString>;
8
- components: z.ZodOptional<z.ZodString>;
9
- duration: z.ZodOptional<z.ZodString>;
8
+ components: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
9
+ v: z.ZodOptional<z.ZodBoolean>;
10
+ s: z.ZodOptional<z.ZodBoolean>;
11
+ m: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodObject<{
12
+ text: z.ZodString;
13
+ cost: z.ZodOptional<z.ZodNumber>;
14
+ consume: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
15
+ }, z.core.$strict>]>>;
16
+ r: z.ZodOptional<z.ZodBoolean>;
17
+ }, z.core.$strict>]>>;
18
+ duration: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
19
+ type: z.ZodLiteral<"permanent">;
20
+ ends: z.ZodArray<z.ZodEnum<{
21
+ trigger: "trigger";
22
+ dispel: "dispel";
23
+ }>>;
24
+ }, z.core.$strict>, z.ZodObject<{
25
+ type: z.ZodLiteral<"timed">;
26
+ duration: z.ZodObject<{
27
+ type: z.ZodEnum<{
28
+ minute: "minute";
29
+ hour: "hour";
30
+ }>;
31
+ amount: z.ZodNumber;
32
+ up_to: z.ZodOptional<z.ZodBoolean>;
33
+ }, z.core.$strict>;
34
+ }, z.core.$strict>], "type">>]>>;
10
35
  concentration: z.ZodOptional<z.ZodBoolean>;
11
36
  ritual: z.ZodOptional<z.ZodBoolean>;
12
37
  classes: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -28,4 +53,21 @@ export declare const spellEntitySchema: z.ZodObject<{
28
53
  shape_size: z.ZodOptional<z.ZodNumber>;
29
54
  desc: z.ZodOptional<z.ZodString>;
30
55
  }, z.core.$strip>>>;
56
+ rendering_hint: z.ZodOptional<z.ZodString>;
57
+ misc_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
58
+ area_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
+ condition_inflict: z.ZodOptional<z.ZodArray<z.ZodString>>;
60
+ affects_creature_type: z.ZodOptional<z.ZodArray<z.ZodString>>;
61
+ spell_attack: z.ZodOptional<z.ZodEnum<{
62
+ melee: "melee";
63
+ ranged: "ranged";
64
+ }>>;
65
+ ability_check: z.ZodOptional<z.ZodArray<z.ZodString>>;
66
+ damage_resist: z.ZodOptional<z.ZodArray<z.ZodString>>;
67
+ damage_immune: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
+ condition_immune: z.ZodOptional<z.ZodArray<z.ZodString>>;
69
+ damage_vulnerable: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
+ has_fluff: z.ZodOptional<z.ZodBoolean>;
71
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
72
+ has_fluff_images: z.ZodOptional<z.ZodBoolean>;
31
73
  }, z.core.$strict>;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  spellEntitySchema
3
- } from "../chunk-Y4I74YEG.js";
3
+ } from "../chunk-VQAXTIBW.js";
4
+ import "../chunk-UA5KS2PL.js";
4
5
  export {
5
6
  spellEntitySchema
6
7
  };
@@ -20,6 +20,20 @@ export interface Spell {
20
20
  ability: string;
21
21
  };
22
22
  casting_options?: CastingOption[];
23
+ rendering_hint?: string;
24
+ misc_tags?: string[];
25
+ area_tags?: string[];
26
+ condition_inflict?: string[];
27
+ affects_creature_type?: string[];
28
+ spell_attack?: "melee" | "ranged";
29
+ ability_check?: string[];
30
+ damage_resist?: string[];
31
+ damage_immune?: string[];
32
+ condition_immune?: string[];
33
+ damage_vulnerable?: string[];
34
+ has_fluff?: boolean;
35
+ image?: string | string[];
36
+ has_fluff_images?: boolean;
23
37
  source?: string;
24
38
  edition?: "2014" | "2024" | string;
25
39
  }
@@ -3,7 +3,7 @@ import type { SubclassEntity } from "./subclass.types.js";
3
3
  /**
4
4
  * Normalizing codec (0c.1a). `parse` delegates to `parseSubclass`, which validates
5
5
  * against `subclassEntitySchema`. `subclass.types` is this entity's dnd5e home for
6
- * `SubclassEntity` (consumed by the PC resolver/types); its `Edition`/`SpellcastingConfig`
6
+ * `SubclassEntity` (consumed by the PC resolver/types); its `Edition`/`SubclassSpellcastingConfig`
7
7
  * imports resolve dnd5e-internally from `class.types`. `serialize` stays `yaml.dump`
8
8
  * (the edit-save path uses obsidian's separate serializer; gate (d) verifies `yaml.dump`
9
9
  * round-trips through `parseSubclass`).
@@ -1,14 +1,17 @@
1
1
  import {
2
2
  subclassCodec
3
- } from "../chunk-XLSVNUTK.js";
4
- import "../chunk-L7E2UT5A.js";
5
- import "../chunk-W7HWMMBF.js";
6
- import "../chunk-4TIJKN6O.js";
7
- import "../chunk-CZPMTQOY.js";
3
+ } from "../chunk-CV5XDJKU.js";
4
+ import "../chunk-KK33PIDN.js";
5
+ import "../chunk-OAXWSVJB.js";
6
+ import "../chunk-4U55VNC7.js";
7
+ import "../chunk-23LZLBJK.js";
8
+ import "../chunk-CJYCVNW2.js";
9
+ import "../chunk-W74BCA7V.js";
8
10
  import "../chunk-WYGD2UGN.js";
9
- import "../chunk-PZOWBI3B.js";
10
- import "../chunk-NXSWH3AE.js";
11
- import "../chunk-NXR3BD2V.js";
11
+ import "../chunk-YLL2QXY2.js";
12
+ import "../chunk-IWRVOCT5.js";
13
+ import "../chunk-X3D6LXUU.js";
14
+ import "../chunk-UA5KS2PL.js";
12
15
  export {
13
16
  subclassCodec
14
17
  };
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  parseSubclass
3
- } from "../chunk-L7E2UT5A.js";
4
- import "../chunk-W7HWMMBF.js";
5
- import "../chunk-4TIJKN6O.js";
6
- import "../chunk-CZPMTQOY.js";
3
+ } from "../chunk-KK33PIDN.js";
4
+ import "../chunk-OAXWSVJB.js";
5
+ import "../chunk-4U55VNC7.js";
6
+ import "../chunk-23LZLBJK.js";
7
+ import "../chunk-CJYCVNW2.js";
8
+ import "../chunk-W74BCA7V.js";
7
9
  import "../chunk-WYGD2UGN.js";
8
- import "../chunk-PZOWBI3B.js";
9
- import "../chunk-NXSWH3AE.js";
10
- import "../chunk-NXR3BD2V.js";
10
+ import "../chunk-YLL2QXY2.js";
11
+ import "../chunk-IWRVOCT5.js";
12
+ import "../chunk-X3D6LXUU.js";
13
+ import "../chunk-UA5KS2PL.js";
11
14
  export {
12
15
  parseSubclass
13
16
  };
@@ -10,12 +10,13 @@ export declare const subclassEntitySchema: z.ZodObject<{
10
10
  source: z.ZodString;
11
11
  description: z.ZodString;
12
12
  spellcasting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
13
- caster_type: z.ZodEnum<{
14
- pact: "pact";
15
- full: "full";
13
+ caster_type: z.ZodOptional<z.ZodEnum<{
16
14
  half: "half";
15
+ full: "full";
16
+ pact: "pact";
17
17
  third: "third";
18
- }>;
18
+ artificer: "artificer";
19
+ }>>;
19
20
  ability: z.ZodEnum<{
20
21
  str: "str";
21
22
  dex: "dex";
@@ -24,11 +25,11 @@ export declare const subclassEntitySchema: z.ZodObject<{
24
25
  wis: "wis";
25
26
  cha: "cha";
26
27
  }>;
27
- preparation: z.ZodEnum<{
28
+ preparation: z.ZodOptional<z.ZodEnum<{
28
29
  known: "known";
29
30
  prepared: "prepared";
30
- }>;
31
- spell_list: z.ZodString;
31
+ }>>;
32
+ spell_list: z.ZodOptional<z.ZodString>;
32
33
  }, z.core.$strip>>>;
33
34
  table: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
34
35
  columns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
@@ -49,6 +50,7 @@ export declare const subclassEntitySchema: z.ZodObject<{
49
50
  reset: z.ZodEnum<{
50
51
  "short-rest": "short-rest";
51
52
  "long-rest": "long-rest";
53
+ either: "either";
52
54
  dawn: "dawn";
53
55
  dusk: "dusk";
54
56
  turn: "turn";
@@ -74,12 +76,17 @@ export declare const subclassEntitySchema: z.ZodObject<{
74
76
  reset: z.ZodEnum<{
75
77
  "short-rest": "short-rest";
76
78
  "long-rest": "long-rest";
79
+ either: "either";
77
80
  dawn: "dawn";
78
81
  dusk: "dusk";
79
82
  turn: "turn";
80
83
  round: "round";
81
84
  custom: "custom";
82
85
  }>;
86
+ restores: z.ZodOptional<z.ZodEnum<{
87
+ uses: "uses";
88
+ "spell-slots": "spell-slots";
89
+ }>>;
83
90
  }, z.core.$strip>>>;
84
91
  }, z.core.$strip>>;
85
92
  selection_pools: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -112,7 +119,47 @@ export declare const subclassEntitySchema: z.ZodObject<{
112
119
  layout: z.ZodOptional<z.ZodEnum<{
113
120
  "spell-like": "spell-like";
114
121
  blocks: "blocks";
122
+ "dice-pool": "dice-pool";
123
+ "point-pool": "point-pool";
115
124
  }>>;
116
125
  }, z.core.$strip>;
117
126
  }, z.core.$strip>>>;
127
+ rendering_hint: z.ZodOptional<z.ZodString>;
128
+ short_name: z.ZodOptional<z.ZodString>;
129
+ has_fluff: z.ZodOptional<z.ZodBoolean>;
130
+ has_fluff_images: z.ZodOptional<z.ZodBoolean>;
131
+ fluff: z.ZodOptional<z.ZodUnknown>;
132
+ table_col_labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
133
+ cantrip_progression: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
134
+ prepared_spells_change: z.ZodOptional<z.ZodString>;
135
+ prepared_spells_progression: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
136
+ spells_known_progression: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
137
+ feat_progression: z.ZodOptional<z.ZodArray<z.ZodObject<{
138
+ name: z.ZodString;
139
+ progression: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodNumber>, z.ZodArray<z.ZodNumber>]>;
140
+ feature_type: z.ZodOptional<z.ZodArray<z.ZodString>>;
141
+ featureType: z.ZodOptional<z.ZodArray<z.ZodString>>;
142
+ category: z.ZodOptional<z.ZodArray<z.ZodString>>;
143
+ required: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
144
+ }, z.core.$strip>>>;
145
+ optionalfeature_progression: z.ZodOptional<z.ZodArray<z.ZodObject<{
146
+ name: z.ZodString;
147
+ progression: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodNumber>, z.ZodArray<z.ZodNumber>]>;
148
+ feature_type: z.ZodOptional<z.ZodArray<z.ZodString>>;
149
+ featureType: z.ZodOptional<z.ZodArray<z.ZodString>>;
150
+ category: z.ZodOptional<z.ZodArray<z.ZodString>>;
151
+ required: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
152
+ }, z.core.$strip>>>;
153
+ additional_spells: z.ZodOptional<z.ZodArray<z.ZodObject<{
154
+ name: z.ZodOptional<z.ZodString>;
155
+ ability: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
156
+ choose: z.ZodArray<z.ZodString>;
157
+ }, z.core.$strip>]>>;
158
+ known: z.ZodOptional<z.ZodUnknown>;
159
+ innate: z.ZodOptional<z.ZodUnknown>;
160
+ prepared: z.ZodOptional<z.ZodUnknown>;
161
+ expanded: z.ZodOptional<z.ZodUnknown>;
162
+ resourceName: z.ZodOptional<z.ZodString>;
163
+ }, z.core.$strip>>>;
164
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
118
165
  }, z.core.$strip>;
@@ -1,12 +1,14 @@
1
1
  import {
2
2
  subclassEntitySchema
3
- } from "../chunk-W7HWMMBF.js";
4
- import "../chunk-4TIJKN6O.js";
5
- import "../chunk-CZPMTQOY.js";
3
+ } from "../chunk-OAXWSVJB.js";
4
+ import "../chunk-23LZLBJK.js";
5
+ import "../chunk-CJYCVNW2.js";
6
+ import "../chunk-W74BCA7V.js";
6
7
  import "../chunk-WYGD2UGN.js";
7
- import "../chunk-PZOWBI3B.js";
8
- import "../chunk-NXSWH3AE.js";
9
- import "../chunk-NXR3BD2V.js";
8
+ import "../chunk-YLL2QXY2.js";
9
+ import "../chunk-IWRVOCT5.js";
10
+ import "../chunk-X3D6LXUU.js";
11
+ import "../chunk-UA5KS2PL.js";
10
12
  export {
11
13
  subclassEntitySchema
12
14
  };
@@ -1,6 +1,7 @@
1
1
  import type { Feature, Resource } from "@archivist-gg/dnd5e";
2
- import type { Edition, SpellcastingConfig } from "@archivist-gg/dnd5e/class/class.types";
2
+ import type { Edition, SubclassSpellcastingConfig } from "@archivist-gg/dnd5e/class/class.types";
3
3
  import type { SelectionPool, PoolGrant, TabDecl } from "@archivist-gg/dnd5e/types/selection-pool";
4
+ import type { AdditionalSpellsEntry, ProgressionEntry } from "@archivist-gg/dnd5e/schemas/entity-extras-schema";
4
5
  export interface SubclassEntity {
5
6
  slug: string;
6
7
  name: string;
@@ -8,7 +9,7 @@ export interface SubclassEntity {
8
9
  edition: Edition;
9
10
  source: string;
10
11
  description: string;
11
- spellcasting?: SpellcastingConfig | null;
12
+ spellcasting?: SubclassSpellcastingConfig | null;
12
13
  table?: Record<number, {
13
14
  columns?: Record<string, string | number>;
14
15
  }>;
@@ -17,4 +18,21 @@ export interface SubclassEntity {
17
18
  selection_pools?: SelectionPool[];
18
19
  pool_grants?: PoolGrant[];
19
20
  tabs?: TabDecl[];
21
+ /** Converter/bundle extras declared by subclass.schema.ts §2.7; all optional, none read today. */
22
+ rendering_hint?: string;
23
+ short_name?: string;
24
+ has_fluff?: boolean;
25
+ has_fluff_images?: boolean;
26
+ /** RAW 5etools passthrough (single measured key-set `{_subclassFluff:{…}}`): mirrors `z.unknown()`. */
27
+ fluff?: unknown;
28
+ table_col_labels?: string[];
29
+ cantrip_progression?: number[];
30
+ prepared_spells_change?: string;
31
+ prepared_spells_progression?: number[];
32
+ spells_known_progression?: number[];
33
+ feat_progression?: ProgressionEntry[];
34
+ optionalfeature_progression?: ProgressionEntry[];
35
+ additional_spells?: AdditionalSpellsEntry[];
36
+ /** One wikilink, or an array of them for the multi-fluff-image emit. */
37
+ image?: string | string[];
20
38
  }
@@ -3,11 +3,62 @@ import type { FeatureEffect } from "./feature-effect.js";
3
3
  export type Ability = keyof Abilities;
4
4
  export type SkillSlug = "acrobatics" | "animal-handling" | "arcana" | "athletics" | "deception" | "history" | "insight" | "intimidation" | "investigation" | "medicine" | "nature" | "perception" | "performance" | "persuasion" | "religion" | "sleight-of-hand" | "stealth" | "survival";
5
5
  export declare const ALL_SKILL_SLUGS: SkillSlug[];
6
- /** The SRD language set: 8 standard + 8 exotic. Authoritative and reused as
7
- * KNOWN_LANGUAGES by the proficiency aggregate; slugs are edition-agnostic. */
6
+ /** The language vocabulary the engine matches every language grant and pick
7
+ * against: 8 standard + 8 exotic + 2 SECRET. It is NOT "the SRD language set" —
8
+ * the two secret languages are class-taught and appear on no SRD language list.
9
+ * Slugs are edition-agnostic, apostrophe-retaining and canonical under
10
+ * `toProfSlug`, exactly as ALL_TOOLS is.
11
+ *
12
+ * A cross-repo CONTRACT with three kinds of consumer, so widening this list is a
13
+ * data change at all three · named by symbol, because line cites rot:
14
+ * · the SRD GENERATOR: `race-merge.ts` builds `KNOWN_LANGUAGES = new Set(ALL_LANGUAGES)`
15
+ * and `extractLanguagesFromTraits` gates species prose tokens through it, so
16
+ * this constant is INPUT DATA to canonical species output. That name belongs
17
+ * to the generator and to nothing else. Guarded by
18
+ * `tests/srd-canonical/merger-rules/srd-race-languages.test.ts`.
19
+ * · the ENGINE: `enumerateOptions` uses it as the from-less `domain:"language"`
20
+ * picker pool, and `computeEffectiveProficiencies` canonicalizes grants, picks
21
+ * and manual adds against it through `pc.decision-engine.ts`'s one canonical
22
+ * comparison, `matchPool` — a module-level helper it shares with its other call
23
+ * sites, not one of its own. `computeEffectiveProficiencies` reads ALL_LANGUAGES
24
+ * from HERE, directly — it does not go through the generator's KNOWN_LANGUAGES.
25
+ * · the PLUGIN: `proficiency-edit-modal.ts` renders its LANGUAGE section from
26
+ * `[...ALL_LANGUAGES, ...suppressed]`.
27
+ * Membership is also what makes two spellings of one language FOLD onto a single
28
+ * row: a vocabulary MISS keys on the raw string and splits the row in two. */
8
29
  export declare const STANDARD_LANGUAGES: string[];
9
30
  export declare const EXOTIC_LANGUAGES: string[];
31
+ /** Secret languages: granted by a class feature (Druid, Rogue), never carried by a
32
+ * race or background language list. `thieves'-cant` RETAINS the ASCII apostrophe —
33
+ * the file's stated convention, and the slug `toProfSlug` already produces from
34
+ * both live spellings (the converter's `Thieves' Cant` and the 2014 SRD prose's
35
+ * U+2019 form). */
36
+ export declare const SECRET_LANGUAGES: string[];
10
37
  export declare const ALL_LANGUAGES: string[];
38
+ /** The SRD tool set: 17 artisan's tools + 10 musical instruments + 2 gaming sets
39
+ * + 6 other tools = 35. Like ALL_LANGUAGES this is a SINGLE edition-agnostic
40
+ * list covering 2014 and 2024, and where the two editions name the same tool
41
+ * differently the 2024 name wins. Across all 35 entries there is exactly one
42
+ * such delta: `Playing Card Set` (2014) vs `Playing Cards` (2024), resolved
43
+ * here to "playing-cards".
44
+ *
45
+ * Apostrophes are RETAINED ("thieves'-tools", "calligrapher's-supplies").
46
+ * These are the slugs the product already emits · see
47
+ * `tools/srd-canonical/merger-rules/background-merge.ts`, whose output is live
48
+ * in `background.2024.json` · and humanizeProficiency is apostrophe-safe.
49
+ * Stripping the apostrophes would diverge from that live data and CREATE the
50
+ * collision it would claim to avoid.
51
+ *
52
+ * Every entry is already canonical under toProfSlug (identity) and the set is
53
+ * collision-free under it. Ordering is alphabetical within each subset, and
54
+ * ALL_TOOLS composes the four subsets in that order, mirroring
55
+ * ALL_LANGUAGES = STANDARD + EXOTIC + SECRET. The list is a cross-repo contract: a
56
+ * one-entry divergence is silent and permanent, so it is pinned verbatim. */
57
+ export declare const ARTISANS_TOOLS: string[];
58
+ export declare const MUSICAL_INSTRUMENTS: string[];
59
+ export declare const GAMING_SETS: string[];
60
+ export declare const OTHER_TOOLS: string[];
61
+ export declare const ALL_TOOLS: string[];
11
62
  export type FeatCategory = "origin" | "general" | "fighting-style" | "epic-boon";
12
63
  /** Closed, enumerated registry filter — YAML can never express a query the
13
64
  * engine would apply unsafely. `"self"` resolves against the owning
@@ -1,12 +1,24 @@
1
1
  import {
2
2
  ALL_LANGUAGES,
3
3
  ALL_SKILL_SLUGS,
4
+ ALL_TOOLS,
5
+ ARTISANS_TOOLS,
4
6
  EXOTIC_LANGUAGES,
7
+ GAMING_SETS,
8
+ MUSICAL_INSTRUMENTS,
9
+ OTHER_TOOLS,
10
+ SECRET_LANGUAGES,
5
11
  STANDARD_LANGUAGES
6
- } from "../chunk-7TEK5KK7.js";
12
+ } from "../chunk-KU3YLF6D.js";
7
13
  export {
8
14
  ALL_LANGUAGES,
9
15
  ALL_SKILL_SLUGS,
16
+ ALL_TOOLS,
17
+ ARTISANS_TOOLS,
10
18
  EXOTIC_LANGUAGES,
19
+ GAMING_SETS,
20
+ MUSICAL_INSTRUMENTS,
21
+ OTHER_TOOLS,
22
+ SECRET_LANGUAGES,
11
23
  STANDARD_LANGUAGES
12
24
  };
@@ -3,12 +3,19 @@
3
3
  * `category` is a player-picked class of item ("martial-weapon",
4
4
  * "simple-weapon", "martial-melee-weapon", "any-armor", "shield", …) resolved
5
5
  * by a nested select-entity. `gold` is gp folded into the bundle. */
6
- export type EquipmentGrant = {
6
+ export type EquipmentGrant =
7
+ /** `contains_value` (COPPER; `1500` = 15 gp) is seeded as gold by the plugin's starting-equipment seeder
8
+ * (R4-G3b §9); `worth_value` is never seeded; `display_name` is read by grantLabel. */
9
+ {
7
10
  item: string;
8
11
  qty?: number;
12
+ contains_value?: number;
13
+ display_name?: string;
14
+ worth_value?: number;
9
15
  } | {
10
16
  category: string;
11
17
  qty?: number;
18
+ display_name?: string;
12
19
  } | {
13
20
  gold: number;
14
21
  };
@@ -1,28 +1,53 @@
1
1
  import type { Ability } from "./choice.js";
2
2
  export type SenseType = "darkvision" | "blindsight" | "tremorsense" | "truesight";
3
- export type FeatureEffect = {
3
+ /** Present on every arm: whose numbers the effect changes. Absent === "self". The engine's fold readers skip
4
+ * every effect whose subject is present and not "self" (`foldsOnSelf` in pc.feature-effects.ts). */
5
+ type Subject = {
6
+ subject?: string;
7
+ };
8
+ /** A prose qualifier, carried for display; on `apply-condition` and `immune-condition` the `condition` key is the
9
+ * condition NAME instead, so those two arms do not carry this qualifier. */
10
+ type Qualified = {
11
+ condition?: string;
12
+ } & Subject;
13
+ /**
14
+ * Hand-written MIRROR of `featureEffectSchema` (schemas/feature-effect-schema.ts). The two are cross-checked at the
15
+ * four parser returns and by `_kindPin` in the schema file; edit both in the same commit.
16
+ */
17
+ export type FeatureEffect = ({
4
18
  kind: "initiative-bonus";
5
19
  value: number;
6
- } | {
20
+ } & Qualified) | ({
7
21
  kind: "immune-condition";
8
22
  condition: string;
9
23
  while?: string;
10
- } | {
24
+ } & Subject) | ({
11
25
  kind: "resistance";
12
26
  damage_type: string;
13
- } | {
27
+ } & Qualified) | ({
14
28
  kind: "hp-per-level-bonus";
15
29
  value: number;
16
- } | {
30
+ } & Qualified) | ({
17
31
  kind: "speed-bonus";
18
32
  mode: "walk" | "fly" | "swim" | "climb" | "burrow";
19
33
  value: number;
20
34
  set?: boolean;
21
- } | {
35
+ scales_at?: {
36
+ level: number;
37
+ value: number;
38
+ }[];
39
+ } & Qualified) | ({
40
+ kind: "attunement-limit";
41
+ value: number;
42
+ scales_at?: {
43
+ level: number;
44
+ value: number;
45
+ }[];
46
+ } & Qualified) | ({
22
47
  kind: "sense";
23
48
  type: SenseType;
24
49
  range: number;
25
- } | {
50
+ } & Qualified) | ({
26
51
  kind: "apply-condition";
27
52
  condition: string;
28
53
  duration?: string;
@@ -31,49 +56,86 @@ export type FeatureEffect = {
31
56
  ability: string;
32
57
  timing: string;
33
58
  };
34
- } | {
59
+ } & Subject) | ({
35
60
  kind: "damage-bonus";
36
61
  damage_type: string;
37
62
  amount: string;
38
63
  applies_to?: "weapon" | "spell" | "all";
39
- condition?: string;
40
- } | {
64
+ } & Qualified) | ({
41
65
  kind: "proficiency";
42
66
  proficiency_type: "skill" | "tool" | "language" | "saving-throw" | "armor" | "weapon";
43
67
  value: string;
44
- } | {
68
+ expertise?: boolean;
69
+ } & Qualified) | ({
45
70
  kind: "ac-bonus";
46
71
  value: number;
47
72
  requires_armor?: boolean;
48
- } | {
73
+ } & Qualified) | ({
49
74
  kind: "unarmored-ac";
50
75
  abilities: Ability[];
51
76
  base?: number;
52
77
  allow_shield?: boolean;
53
- } | {
78
+ } & Qualified) | ({
79
+ kind: "unarmed-strike";
80
+ dice?: string | {
81
+ column: string;
82
+ };
83
+ abilities?: Ability[];
84
+ } & Qualified) | ({
54
85
  kind: "weapon-ability";
55
86
  ability: Ability | "spellcasting";
56
87
  weapons?: string | string[];
57
- } | {
88
+ } & Qualified) | ({
58
89
  kind: "roll-modifier";
59
- mode: "advantage" | "disadvantage";
60
- roll: "ability-check" | "saving-throw" | "attack";
90
+ mode: "advantage" | "disadvantage" | "reroll" | "add-d4";
91
+ roll: "ability-check" | "saving-throw" | "attack" | "any";
61
92
  scope?: string;
62
- condition?: string;
63
- } | {
93
+ } & Qualified) | ({
64
94
  kind: "crit-range";
65
95
  min_roll: number;
66
96
  applies_to?: "weapon" | "spell" | "all";
67
- condition?: string;
68
- } | {
97
+ } & Qualified) | ({
69
98
  kind: "extra-attack";
70
99
  count: number;
71
- } | {
100
+ scales_at?: {
101
+ level: number;
102
+ count: number;
103
+ }[];
104
+ } & Qualified) | ({
72
105
  kind: "reroll-damage";
73
106
  max_reroll: number;
74
107
  applies_to?: "weapon" | "spell" | "all";
75
108
  once_per_die?: boolean;
76
- } | {
109
+ } & Qualified) | ({
77
110
  kind: "attack-rule";
78
111
  flag: "no-ranged-in-melee-disadvantage";
79
- };
112
+ } & Qualified) | ({
113
+ kind: "immunity";
114
+ damage_type: string;
115
+ } & Qualified) | ({
116
+ kind: "vulnerability";
117
+ damage_type: string;
118
+ } & Qualified) | ({
119
+ kind: "temp-hp";
120
+ amount: string;
121
+ } & Qualified) | ({
122
+ kind: "heal";
123
+ amount: string;
124
+ } & Qualified) | ({
125
+ kind: "ability-score-increase";
126
+ abilities: "chosen" | Ability[];
127
+ amount: number;
128
+ choose: number | null;
129
+ max: number | null;
130
+ } & Qualified) | ({
131
+ kind: "extra-action";
132
+ count: number;
133
+ action_type: "action" | "bonus-action" | "reaction";
134
+ } & Qualified) | ({
135
+ kind: "save-outcome";
136
+ ability: Ability | "any";
137
+ on_success: "none" | "half" | "full";
138
+ on_failure: "none" | "half" | "full";
139
+ applies_to: string | null;
140
+ } & Qualified);
141
+ export {};