@archivist-gg/dnd5e 0.3.17 → 0.3.24

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 (439) hide show
  1. package/LICENSE +48 -21
  2. package/README.md +26 -48
  3. package/dist/armor/armor.codec.d.ts +0 -7
  4. package/dist/armor/armor.codec.js +1 -9
  5. package/dist/armor/armor.parser.js +1 -8
  6. package/dist/armor/armor.schema.js +1 -7
  7. package/dist/armor/armor.types.d.ts +0 -3
  8. package/dist/background/background.codec.d.ts +0 -6
  9. package/dist/background/background.codec.js +1 -12
  10. package/dist/background/background.parser.js +1 -11
  11. package/dist/background/background.schema.js +1 -12
  12. package/dist/background/background.types.d.ts +0 -5
  13. package/dist/chunk-2EOGK6R6.js +1 -0
  14. package/dist/chunk-2HRRH3WL.js +1 -0
  15. package/dist/chunk-2LCGKNVM.js +1 -0
  16. package/dist/chunk-2NUDWOFG.js +1 -0
  17. package/dist/chunk-334WLI7V.js +1 -0
  18. package/dist/chunk-3LWOVRLA.js +1 -0
  19. package/dist/chunk-3QQOATV3.js +1 -0
  20. package/dist/chunk-4E2GIWJE.js +1 -0
  21. package/dist/chunk-4GN3GYMP.js +1 -0
  22. package/dist/chunk-4IAMSRHD.js +1 -0
  23. package/dist/chunk-4JEF3CET.js +1 -0
  24. package/dist/chunk-4KVVAENP.js +1 -0
  25. package/dist/chunk-56JK6VCL.js +1 -0
  26. package/dist/chunk-5FEXHY4U.js +1 -0
  27. package/dist/chunk-63YJPWTM.js +1 -0
  28. package/dist/chunk-6ASJ3MVB.js +1 -0
  29. package/dist/chunk-6IC53O3Q.js +1 -0
  30. package/dist/chunk-6LCNV26D.js +1 -0
  31. package/dist/chunk-6W253VHH.js +1 -0
  32. package/dist/chunk-7AKJBRBD.js +1 -0
  33. package/dist/chunk-7EL3GWWJ.js +1 -0
  34. package/dist/chunk-7FPQJDFD.js +1 -0
  35. package/dist/chunk-7J5BNH2D.js +1 -0
  36. package/dist/chunk-7LPKI27J.js +1 -0
  37. package/dist/chunk-7UPYRKMF.js +1 -0
  38. package/dist/chunk-A7H6LX47.js +1 -0
  39. package/dist/chunk-AINRPPLH.js +1 -0
  40. package/dist/chunk-BC52J4LA.js +1 -0
  41. package/dist/chunk-BCXGB4HP.js +1 -0
  42. package/dist/chunk-BGX36NPE.js +1 -0
  43. package/dist/chunk-BPKG6RZ7.js +1 -0
  44. package/dist/chunk-BREHZNTL.js +1 -0
  45. package/dist/chunk-BZ6BGGZS.js +1 -0
  46. package/dist/chunk-CAPYNIGK.js +1 -0
  47. package/dist/chunk-CCFIINBA.js +1 -0
  48. package/dist/chunk-CMIEZQL4.js +1 -0
  49. package/dist/chunk-DVUXUIPV.js +1 -0
  50. package/dist/chunk-DY6FVAGA.js +1 -0
  51. package/dist/chunk-DZITM5AG.js +1 -0
  52. package/dist/chunk-DZKSXSJF.js +1 -0
  53. package/dist/chunk-EAARMPCW.js +1 -0
  54. package/dist/chunk-EVT7MGAC.js +1 -0
  55. package/dist/chunk-FOLHTMSC.js +1 -0
  56. package/dist/chunk-GCYUCIDN.js +1 -0
  57. package/dist/chunk-GIOV6JW7.js +1 -0
  58. package/dist/chunk-HCK6IUB3.js +1 -0
  59. package/dist/chunk-HR5MKCP2.js +1 -0
  60. package/dist/chunk-I26FHSI6.js +1 -0
  61. package/dist/chunk-I4O2FIDT.js +1 -0
  62. package/dist/chunk-IGVRLGLM.js +1 -0
  63. package/dist/chunk-IHPLT2ZT.js +1 -0
  64. package/dist/chunk-IOCJIWCV.js +1 -0
  65. package/dist/chunk-JXDX2DKF.js +1 -0
  66. package/dist/chunk-KBFSJ5WE.js +1 -0
  67. package/dist/chunk-KM75CC6Q.js +1 -0
  68. package/dist/chunk-KZDDFG4O.js +1 -0
  69. package/dist/chunk-LJNT3PJP.js +1 -0
  70. package/dist/chunk-LR6UMA5V.js +1 -0
  71. package/dist/chunk-M6RPOLKS.js +1 -0
  72. package/dist/chunk-MC6PLWRZ.js +1 -0
  73. package/dist/chunk-MGGKZGLG.js +1 -0
  74. package/dist/chunk-N3RYJ7RE.js +1 -0
  75. package/dist/chunk-NEMX7QGG.js +1 -0
  76. package/dist/chunk-NI364WV7.js +1 -0
  77. package/dist/chunk-O2QZ73GA.js +1 -0
  78. package/dist/chunk-O776WL7O.js +1 -0
  79. package/dist/chunk-OTFNINUY.js +1 -0
  80. package/dist/chunk-PQAVMK3T.js +1 -0
  81. package/dist/chunk-PZ3ZZ5H5.js +1 -0
  82. package/dist/chunk-PZ4L2EEG.js +1 -0
  83. package/dist/chunk-PZUPZBTN.js +1 -0
  84. package/dist/chunk-QBA757AU.js +1 -0
  85. package/dist/chunk-QFIGPOFW.js +1 -0
  86. package/dist/chunk-QMEKQTUT.js +1 -0
  87. package/dist/chunk-QVWT67WA.js +1 -0
  88. package/dist/chunk-RDXQAZBA.js +1 -0
  89. package/dist/chunk-RE5Z5RNK.js +1 -0
  90. package/dist/chunk-RL4VY2AL.js +1 -0
  91. package/dist/chunk-RQGTBHJW.js +1 -0
  92. package/dist/chunk-RQZCGXUZ.js +1 -0
  93. package/dist/chunk-S5UCI27C.js +1 -0
  94. package/dist/chunk-SEOASDO4.js +1 -0
  95. package/dist/chunk-SU4MEZ5P.js +1 -0
  96. package/dist/chunk-T55DELVL.js +1 -0
  97. package/dist/chunk-TKIEPC6F.js +1 -0
  98. package/dist/chunk-TLXFGGWH.js +1 -0
  99. package/dist/chunk-UBUKCRZ3.js +1 -0
  100. package/dist/chunk-V6NQ547U.js +1 -0
  101. package/dist/chunk-VA3ZWV7C.js +1 -0
  102. package/dist/chunk-VIP3FH2O.js +1 -0
  103. package/dist/chunk-VTQ4RWEG.js +1 -0
  104. package/dist/chunk-WUHTSLG4.js +1 -0
  105. package/dist/chunk-X22SISGM.js +1 -0
  106. package/dist/chunk-XKJXT2PN.js +1 -0
  107. package/dist/chunk-XQMKH4R4.js +1 -0
  108. package/dist/chunk-YGH7S5ZF.js +1 -0
  109. package/dist/chunk-ZE46ADXS.js +1 -0
  110. package/dist/chunk-ZI3FEUX3.js +1 -0
  111. package/dist/class/class.codec.d.ts +0 -7
  112. package/dist/class/class.codec.js +1 -18
  113. package/dist/class/class.parser.js +1 -17
  114. package/dist/class/class.schema.d.ts +2 -1
  115. package/dist/class/class.schema.js +1 -15
  116. package/dist/class/class.slug.d.ts +0 -11
  117. package/dist/class/class.slug.js +1 -8
  118. package/dist/class/class.standard-array.d.ts +0 -7
  119. package/dist/class/class.standard-array.js +1 -20
  120. package/dist/class/class.types.d.ts +0 -20
  121. package/dist/condition/condition.codec.d.ts +0 -6
  122. package/dist/condition/condition.parser.d.ts +0 -10
  123. package/dist/condition/condition.parser.js +1 -7
  124. package/dist/condition/condition.schema.d.ts +0 -16
  125. package/dist/condition/condition.types.d.ts +0 -3
  126. package/dist/data-srd/index.generated.js +1 -146
  127. package/dist/dnd/amount-text.d.ts +4 -27
  128. package/dist/dnd/amount-text.js +1 -13
  129. package/dist/dnd/constants.d.ts +0 -18
  130. package/dist/dnd/constants.js +1 -42
  131. package/dist/dnd/formula-tags.d.ts +0 -2
  132. package/dist/dnd/formula-tags.js +1 -119
  133. package/dist/dnd/math.d.ts +0 -26
  134. package/dist/dnd/math.js +1 -45
  135. package/dist/dnd/prose-tags.d.ts +1 -15
  136. package/dist/dnd/prose-tags.js +1 -18
  137. package/dist/dnd/resource-die.d.ts +0 -4
  138. package/dist/dnd/resource-die.js +1 -17
  139. package/dist/dnd/resource-formula.d.ts +0 -43
  140. package/dist/dnd/resource-formula.js +1 -14
  141. package/dist/dnd/resource-words.d.ts +0 -2
  142. package/dist/dnd/resource-words.js +1 -30
  143. package/dist/dnd/srd-tag-converter.d.ts +0 -21
  144. package/dist/dnd/srd-tag-converter.js +1 -12
  145. package/dist/dnd/tag-grammar.js +1 -12
  146. package/dist/dnd/warn-once.js +1 -8
  147. package/dist/encounter/encounter.ai-schema.js +1 -8
  148. package/dist/entities/base-item-resolver.d.ts +0 -26
  149. package/dist/entities/base-item-resolver.js +1 -11
  150. package/dist/entities/registry-revision.d.ts +10 -0
  151. package/dist/entities/registry-revision.js +1 -0
  152. package/dist/entities/slug.d.ts +1 -31
  153. package/dist/entities/slug.js +1 -12
  154. package/dist/entities/wikilink-display.d.ts +0 -2
  155. package/dist/entities/wikilink-display.js +1 -10
  156. package/dist/feat/feat.category-codes.d.ts +1 -26
  157. package/dist/feat/feat.category-codes.js +1 -14
  158. package/dist/feat/feat.codec.d.ts +0 -6
  159. package/dist/feat/feat.codec.js +1 -12
  160. package/dist/feat/feat.parser.js +1 -11
  161. package/dist/feat/feat.schema.d.ts +31 -1
  162. package/dist/feat/feat.schema.js +1 -10
  163. package/dist/feat/feat.types.d.ts +0 -6
  164. package/dist/index.js +45 -138113
  165. package/dist/inline-tag-parser.js +1 -6
  166. package/dist/item/item.actions-map.d.ts +4 -63
  167. package/dist/item/item.actions-map.js +1 -10
  168. package/dist/item/item.ai-schema.js +1 -6
  169. package/dist/item/item.attunement.d.ts +0 -14
  170. package/dist/item/item.attunement.js +1 -6
  171. package/dist/item/item.bonuses.js +1 -10
  172. package/dist/item/item.codec.js +1 -9
  173. package/dist/item/item.conditions.d.ts +0 -7
  174. package/dist/item/item.conditions.js +1 -11
  175. package/dist/item/item.conditions.types.d.ts +0 -2
  176. package/dist/item/item.cost.js +1 -29
  177. package/dist/item/item.enrichment.js +1 -9
  178. package/dist/item/item.icon.d.ts +0 -8
  179. package/dist/item/item.icon.js +1 -211
  180. package/dist/item/item.parser.js +1 -8
  181. package/dist/item/item.schema.d.ts +2 -0
  182. package/dist/item/item.schema.js +1 -11
  183. package/dist/item/item.types.d.ts +2 -28
  184. package/dist/monster/monster.ai-schema.js +1 -6
  185. package/dist/monster/monster.codec.d.ts +0 -10
  186. package/dist/monster/monster.enrichment.js +1 -19
  187. package/dist/monster/monster.format.d.ts +0 -69
  188. package/dist/monster/monster.format.js +1 -78
  189. package/dist/monster/monster.parser.d.ts +0 -4
  190. package/dist/monster/monster.parser.js +1 -15
  191. package/dist/monster/monster.resolve.d.ts +0 -4
  192. package/dist/monster/monster.schema.d.ts +0 -9
  193. package/dist/monster/monster.schema.js +1 -34
  194. package/dist/monster/monster.types.d.ts +0 -3
  195. package/dist/monster/monster.types.js +1 -1
  196. package/dist/optional-feature/optional-feature.codec.d.ts +0 -11
  197. package/dist/optional-feature/optional-feature.codec.js +1 -13
  198. package/dist/optional-feature/optional-feature.parser.js +1 -12
  199. package/dist/optional-feature/optional-feature.schema.d.ts +30 -1
  200. package/dist/optional-feature/optional-feature.schema.js +1 -15
  201. package/dist/pack.d.ts +0 -9
  202. package/dist/pc/conditions.constants.js +1 -6
  203. package/dist/pc/decision-recognizer.js +1 -8
  204. package/dist/pc/pc.additional-spells.d.ts +4 -14
  205. package/dist/pc/pc.additional-spells.js +1 -23
  206. package/dist/pc/pc.amount-bindings.d.ts +4 -20
  207. package/dist/pc/pc.amount-bindings.js +1 -23
  208. package/dist/pc/pc.asi-flatten.d.ts +0 -59
  209. package/dist/pc/pc.asi-flatten.js +1 -16
  210. package/dist/pc/pc.conditions.d.ts +1 -0
  211. package/dist/pc/pc.conditions.js +1 -6
  212. package/dist/pc/pc.containment.d.ts +0 -5
  213. package/dist/pc/pc.containment.js +1 -24
  214. package/dist/pc/pc.decision-engine.d.ts +4 -141
  215. package/dist/pc/pc.decision-engine.js +1 -52
  216. package/dist/pc/pc.defense-normalize.d.ts +0 -10
  217. package/dist/pc/pc.defense-normalize.js +1 -6
  218. package/dist/pc/pc.entry-overrides.d.ts +0 -58
  219. package/dist/pc/pc.entry-overrides.js +1 -40
  220. package/dist/pc/pc.equipment.d.ts +2 -22
  221. package/dist/pc/pc.equipment.js +1 -33
  222. package/dist/pc/pc.feature-effects.d.ts +23 -275
  223. package/dist/pc/pc.feature-effects.js +1 -26
  224. package/dist/pc/pc.formula-context.js +1 -11
  225. package/dist/pc/pc.infusions.d.ts +0 -65
  226. package/dist/pc/pc.infusions.js +1 -64
  227. package/dist/pc/pc.item-effects.d.ts +18 -0
  228. package/dist/pc/pc.member-choices.d.ts +18 -49
  229. package/dist/pc/pc.member-choices.js +1 -32
  230. package/dist/pc/pc.parser.js +1 -58
  231. package/dist/pc/pc.pools.d.ts +7 -10
  232. package/dist/pc/pc.pools.js +1 -26
  233. package/dist/pc/pc.proficiencies.d.ts +7 -33
  234. package/dist/pc/pc.proficiencies.js +1 -107
  235. package/dist/pc/pc.proficiency-grants.d.ts +0 -26
  236. package/dist/pc/pc.proficiency-normalize.d.ts +4 -25
  237. package/dist/pc/pc.proficiency-normalize.js +1 -12
  238. package/dist/pc/pc.proficiency-query.d.ts +0 -13
  239. package/dist/pc/pc.proficiency-query.js +1 -27
  240. package/dist/pc/pc.recalc.d.ts +7 -131
  241. package/dist/pc/pc.recalc.js +1 -946
  242. package/dist/pc/pc.resolver.d.ts +0 -104
  243. package/dist/pc/pc.resolver.js +1 -59
  244. package/dist/pc/pc.resource-seed.d.ts +0 -8
  245. package/dist/pc/pc.resource-seed.js +1 -42
  246. package/dist/pc/pc.resources.d.ts +1 -59
  247. package/dist/pc/pc.resources.js +1 -23
  248. package/dist/pc/pc.rest.d.ts +1 -20
  249. package/dist/pc/pc.rest.js +1 -230
  250. package/dist/pc/pc.schema.d.ts +19 -2
  251. package/dist/pc/pc.schema.js +1 -9
  252. package/dist/pc/pc.slotting.d.ts +0 -29
  253. package/dist/pc/pc.slotting.js +1 -28
  254. package/dist/pc/pc.speeds.d.ts +19 -0
  255. package/dist/pc/pc.spell-scope.d.ts +6 -0
  256. package/dist/pc/pc.spellcasting.d.ts +0 -70
  257. package/dist/pc/pc.spellcasting.js +1 -28
  258. package/dist/pc/pc.table-column.d.ts +0 -22
  259. package/dist/pc/pc.table-column.js +1 -18
  260. package/dist/pc/pc.tool-picks.d.ts +0 -27
  261. package/dist/pc/pc.tool-picks.js +1 -18
  262. package/dist/pc/pc.types.d.ts +85 -344
  263. package/dist/pc/pc.weapon-grant.d.ts +0 -6
  264. package/dist/pc/pool-layout.d.ts +0 -39
  265. package/dist/pc/pool-layout.js +1 -18
  266. package/dist/pc/resource-equivalents.d.ts +2 -40
  267. package/dist/pc/roll-scope.js +1 -8
  268. package/dist/pc/roll-tag-labels.d.ts +0 -32
  269. package/dist/pc/roll-tag-labels.js +1 -17
  270. package/dist/pc/spell-source.d.ts +0 -11
  271. package/dist/pc/spell-source.js +1 -8
  272. package/dist/race/race.codec.d.ts +0 -6
  273. package/dist/race/race.codec.js +1 -15
  274. package/dist/race/race.parser.js +1 -14
  275. package/dist/race/race.schema.d.ts +0 -8
  276. package/dist/race/race.schema.js +1 -14
  277. package/dist/race/race.structural.d.ts +0 -6
  278. package/dist/race/race.structural.js +1 -6
  279. package/dist/race/race.types.d.ts +0 -8
  280. package/dist/schemas/attack-schema.d.ts +5 -0
  281. package/dist/schemas/caster-type-schema.d.ts +1 -6
  282. package/dist/schemas/caster-type-schema.js +1 -6
  283. package/dist/schemas/choice-schema.js +1 -7
  284. package/dist/schemas/duration-schema.d.ts +0 -2
  285. package/dist/schemas/duration-schema.js +1 -6
  286. package/dist/schemas/entity-extras-schema.d.ts +0 -30
  287. package/dist/schemas/entity-extras-schema.js +1 -10
  288. package/dist/schemas/equipment-grant-schema.d.ts +0 -2
  289. package/dist/schemas/equipment-grant-schema.js +1 -12
  290. package/dist/schemas/feature-alias.d.ts +0 -27
  291. package/dist/schemas/feature-effect-schema.d.ts +30 -1
  292. package/dist/schemas/feature-effect-schema.js +1 -6
  293. package/dist/schemas/feature-schema.d.ts +0 -6
  294. package/dist/schemas/feature-schema.js +1 -12
  295. package/dist/schemas/resource-schema.d.ts +1 -34
  296. package/dist/schemas/resource-schema.js +1 -12
  297. package/dist/schemas/selection-pool-schema.js +1 -10
  298. package/dist/spell/casting-time.d.ts +0 -15
  299. package/dist/spell/casting-time.js +1 -6
  300. package/dist/spell/spell.access.d.ts +0 -6
  301. package/dist/spell/spell.access.js +1 -45
  302. package/dist/spell/spell.ai-schema.js +1 -6
  303. package/dist/spell/spell.codec.js +1 -9
  304. package/dist/spell/spell.enrichment.js +1 -9
  305. package/dist/spell/spell.filter.d.ts +0 -5
  306. package/dist/spell/spell.filter.js +1 -75
  307. package/dist/spell/spell.parser.d.ts +0 -31
  308. package/dist/spell/spell.parser.js +1 -16
  309. package/dist/spell/spell.scaling.d.ts +0 -46
  310. package/dist/spell/spell.scaling.js +1 -79
  311. package/dist/spell/spell.schema.js +1 -7
  312. package/dist/spell/spell.types.d.ts +0 -7
  313. package/dist/srd/retired-items.d.ts +0 -4
  314. package/dist/srd/retired-items.js +1 -11
  315. package/dist/srd-store.d.ts +0 -33
  316. package/dist/subclass/subclass.codec.d.ts +0 -8
  317. package/dist/subclass/subclass.codec.js +1 -17
  318. package/dist/subclass/subclass.parser.js +1 -16
  319. package/dist/subclass/subclass.schema.d.ts +2 -1
  320. package/dist/subclass/subclass.schema.js +1 -14
  321. package/dist/subclass/subclass.types.d.ts +0 -3
  322. package/dist/types/attack.d.ts +2 -0
  323. package/dist/types/casting-option.d.ts +0 -4
  324. package/dist/types/choice.d.ts +1 -72
  325. package/dist/types/choice.js +1 -24
  326. package/dist/types/edition.d.ts +0 -3
  327. package/dist/types/equipment-grant.d.ts +1 -27
  328. package/dist/types/equipment-grant.js +1 -12
  329. package/dist/types/feature-effect.d.ts +14 -14
  330. package/dist/types/feature.d.ts +0 -22
  331. package/dist/types/optional-feature.types.d.ts +1 -31
  332. package/dist/types/resource.d.ts +1 -21
  333. package/dist/types/selection-pool.d.ts +0 -24
  334. package/dist/weapon/weapon-mastery.d.ts +0 -1
  335. package/dist/weapon/weapon.classify.d.ts +0 -11
  336. package/dist/weapon/weapon.classify.js +1 -7
  337. package/dist/weapon/weapon.codec.d.ts +0 -9
  338. package/dist/weapon/weapon.codec.js +1 -9
  339. package/dist/weapon/weapon.parser.js +1 -8
  340. package/dist/weapon/weapon.schema.js +1 -7
  341. package/dist/weapon/weapon.types.d.ts +0 -3
  342. package/package.json +3 -3
  343. package/src/data-srd/ATTRIBUTION.md +1 -1
  344. package/dist/chunk-2FRUSVZS.js +0 -489
  345. package/dist/chunk-2JSQE3DD.js +0 -206
  346. package/dist/chunk-2LULMQTF.js +0 -14
  347. package/dist/chunk-2UDSN6VW.js +0 -18
  348. package/dist/chunk-3LWMFYKS.js +0 -57
  349. package/dist/chunk-3MGQFFNE.js +0 -110
  350. package/dist/chunk-3TM34RSJ.js +0 -23
  351. package/dist/chunk-3VZZDKRA.js +0 -1014
  352. package/dist/chunk-4U55VNC7.js +0 -22
  353. package/dist/chunk-5GKJAUMX.js +0 -59
  354. package/dist/chunk-5MXFW4O3.js +0 -71
  355. package/dist/chunk-656QCX4U.js +0 -22
  356. package/dist/chunk-6EI737IO.js +0 -19
  357. package/dist/chunk-6GNXYAYP.js +0 -25
  358. package/dist/chunk-6PXTNCBP.js +0 -133
  359. package/dist/chunk-6X2NV665.js +0 -33
  360. package/dist/chunk-7ATNGKBS.js +0 -178
  361. package/dist/chunk-7Q2VPKCD.js +0 -181
  362. package/dist/chunk-7QN7XSAK.js +0 -19
  363. package/dist/chunk-A54HHCWW.js +0 -67
  364. package/dist/chunk-AZRGFUSR.js +0 -18
  365. package/dist/chunk-B3DP42OM.js +0 -55
  366. package/dist/chunk-CJYCVNW2.js +0 -7
  367. package/dist/chunk-CM5CWO4K.js +0 -735
  368. package/dist/chunk-DEEHHLAP.js +0 -271
  369. package/dist/chunk-DOXSFYLH.js +0 -158
  370. package/dist/chunk-DPUJDOKV.js +0 -365
  371. package/dist/chunk-EJP263OP.js +0 -186
  372. package/dist/chunk-EVMUJYUD.js +0 -195
  373. package/dist/chunk-EYX4JMAU.js +0 -101
  374. package/dist/chunk-FANQVQ3D.js +0 -89
  375. package/dist/chunk-FC4IGH5Y.js +0 -18
  376. package/dist/chunk-G6MHJDVT.js +0 -41
  377. package/dist/chunk-G6PBI2BU.js +0 -18
  378. package/dist/chunk-H5PTKYXL.js +0 -101
  379. package/dist/chunk-HHBD4SQ6.js +0 -24
  380. package/dist/chunk-HS6FIOLP.js +0 -52
  381. package/dist/chunk-HTYMW5CH.js +0 -228
  382. package/dist/chunk-IHE6KVC3.js +0 -13
  383. package/dist/chunk-IN4M4X7P.js +0 -34
  384. package/dist/chunk-IUAAXXNO.js +0 -58
  385. package/dist/chunk-JCMUVZIK.js +0 -133
  386. package/dist/chunk-JSM6JFZR.js +0 -709
  387. package/dist/chunk-K5NJBTE2.js +0 -18
  388. package/dist/chunk-KR6JF3BF.js +0 -14
  389. package/dist/chunk-KSTV7J2U.js +0 -112
  390. package/dist/chunk-KU3YLF6D.js +0 -106
  391. package/dist/chunk-LBEXLN6I.js +0 -91
  392. package/dist/chunk-LF5AGJA4.js +0 -81
  393. package/dist/chunk-LHZXYFBU.js +0 -94
  394. package/dist/chunk-LSLSG67V.js +0 -31
  395. package/dist/chunk-LVQLWRCU.js +0 -15
  396. package/dist/chunk-MBX25B6D.js +0 -18
  397. package/dist/chunk-MYY2C5MB.js +0 -233
  398. package/dist/chunk-OFCSP6MT.js +0 -23
  399. package/dist/chunk-ONTGZR5T.js +0 -1806
  400. package/dist/chunk-OOSRUJBI.js +0 -19
  401. package/dist/chunk-PDJSUH24.js +0 -110
  402. package/dist/chunk-PKX6TGRE.js +0 -93
  403. package/dist/chunk-PQZ4LM4Z.js +0 -19
  404. package/dist/chunk-PTXBIDG7.js +0 -63
  405. package/dist/chunk-PVCEA4HZ.js +0 -6
  406. package/dist/chunk-PXVNAY7T.js +0 -84
  407. package/dist/chunk-QH36K2PU.js +0 -158
  408. package/dist/chunk-QS5L5YTJ.js +0 -24
  409. package/dist/chunk-QYZV2MQA.js +0 -97
  410. package/dist/chunk-QZSWN2KT.js +0 -18
  411. package/dist/chunk-RLGQ5PZZ.js +0 -16
  412. package/dist/chunk-RYLXAYIQ.js +0 -18
  413. package/dist/chunk-S3YUXDSC.js +0 -278
  414. package/dist/chunk-S7REMWW4.js +0 -21
  415. package/dist/chunk-T6QIF5XR.js +0 -348
  416. package/dist/chunk-TOM66P2P.js +0 -38
  417. package/dist/chunk-TULQ4FFX.js +0 -353
  418. package/dist/chunk-UA5KS2PL.js +0 -26
  419. package/dist/chunk-UUBJCNQU.js +0 -187
  420. package/dist/chunk-UZXG6QSY.js +0 -58
  421. package/dist/chunk-VPYBK2MG.js +0 -18
  422. package/dist/chunk-VRV3NNTA.js +0 -161
  423. package/dist/chunk-VTTA2ALZ.js +0 -16
  424. package/dist/chunk-W6GC6OKK.js +0 -16
  425. package/dist/chunk-WELIKLZF.js +0 -256
  426. package/dist/chunk-WSVMLNTO.js +0 -31
  427. package/dist/chunk-WYGD2UGN.js +0 -14
  428. package/dist/chunk-XCFC7LGF.js +0 -122
  429. package/dist/chunk-XJ2F2WO6.js +0 -8
  430. package/dist/chunk-Y5VVP73C.js +0 -23
  431. package/dist/chunk-YBLDE5CG.js +0 -42
  432. package/dist/chunk-YD2VAHA6.js +0 -159
  433. package/dist/chunk-YDGMBMYI.js +0 -25
  434. package/dist/chunk-YHYTW5QA.js +0 -20
  435. package/dist/chunk-YKL6SHRJ.js +0 -23
  436. package/dist/chunk-ZCTUYGNV.js +0 -26
  437. package/dist/chunk-ZDAEGJH4.js +0 -102
  438. package/dist/chunk-ZJXSXVFP.js +0 -58
  439. package/dist/chunk-ZUQW5VBZ.js +0 -89
@@ -1,353 +0,0 @@
1
- import {
2
- normalizeRollScope
3
- } from "./chunk-TOM66P2P.js";
4
- import {
5
- toProfSlug
6
- } from "./chunk-RLGQ5PZZ.js";
7
- import {
8
- warnOnce
9
- } from "./chunk-LVQLWRCU.js";
10
- import {
11
- bareEntitySlug
12
- } from "./chunk-ZCTUYGNV.js";
13
- import {
14
- normalizeAbility
15
- } from "./chunk-WELIKLZF.js";
16
-
17
- // src/pc/pc.feature-effects.ts
18
- function emptyFeatureEffectTotals() {
19
- return {
20
- initiative_bonus: 0,
21
- initiative_terms: [],
22
- skill_bonus_terms: [],
23
- save_bonus_terms: [],
24
- half_proficiency_terms: [],
25
- hp_per_level_bonus: 0,
26
- hp_per_level_terms: [],
27
- speed_walk_bonus: 0,
28
- speed_walk_terms: [],
29
- speed_walk_set: 0,
30
- attunement_set: 0,
31
- ability_bonus: {},
32
- senses: { darkvision: 0, blindsight: 0, tremorsense: 0, truesight: 0 },
33
- ac_terms: [],
34
- resistances: [],
35
- immunities: [],
36
- vulnerabilities: [],
37
- condition_immunities: [],
38
- proficiencies: { skills: [], skillExpertise: [], tools: [], languages: [], saves: [], armor: [], weapons: [] },
39
- weaponAbilities: [],
40
- rollModifiers: [],
41
- saveOutcomes: [],
42
- critRange: 20,
43
- extraAttack: 0,
44
- attackNotes: [],
45
- damageBonuses: []
46
- };
47
- }
48
- function pushUnique(list, value) {
49
- const key = value.trim().toLowerCase();
50
- if (!key) return;
51
- if (!list.some((v) => v.trim().toLowerCase() === key)) list.push(value.trim());
52
- }
53
- function pushDefenseGrant(list, value, source, condition) {
54
- const key = value.trim().toLowerCase();
55
- if (!key) return;
56
- const existing = list.find((g) => g.value.trim().toLowerCase() === key);
57
- if (existing) {
58
- if (!existing.sources.includes(source)) existing.sources.push(source);
59
- if (!existing.condition && condition) existing.condition = condition;
60
- return;
61
- }
62
- list.push({ value: value.trim(), sources: [source], ...condition ? { condition } : {} });
63
- }
64
- function foldsNow(rf, activeBuffs) {
65
- if (rf.feature.activatable !== true) return true;
66
- const id = rf.feature.id;
67
- return !!id && activeBuffs.has(id);
68
- }
69
- function assembleEffectFeatures(resolved) {
70
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
71
- const activeBuffs = new Set((_b = (_a = resolved.state) == null ? void 0 : _a.active_buffs) != null ? _b : []);
72
- const featureIds = new Set(((_c = resolved.features) != null ? _c : []).map((f) => f.feature.id).filter((id) => !!id));
73
- const aliases = [];
74
- for (const pool of (_d = resolved.pools) != null ? _d : []) {
75
- for (const entry of [...(_e = pool.selected) != null ? _e : [], ...(_f = pool.grants) != null ? _f : []]) {
76
- if (activeBuffs.has(entry.slug)) continue;
77
- const bare = bareEntitySlug(entry.slug);
78
- for (const stored of activeBuffs) {
79
- if (featureIds.has(stored)) continue;
80
- if (bareEntitySlug(stored) === bare) {
81
- aliases.push(entry.slug);
82
- break;
83
- }
84
- }
85
- }
86
- }
87
- for (const a of aliases) activeBuffs.add(a);
88
- const buffFeatures = [];
89
- const pushBoon = (item, pool) => {
90
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
91
- const e = item.entity;
92
- if (!e || item.itemBound === true || ((_b2 = (_a2 = e.effects) == null ? void 0 : _a2.length) != null ? _b2 : 0) === 0) return;
93
- buffFeatures.push({
94
- feature: { id: item.slug, name: e.name, activatable: (_c2 = e.activatable) != null ? _c2 : false, effects: e.effects },
95
- // source is inert for the fold; attribute to the pool's owning class
96
- // (never a hardcoded class) so the generic engine carries no homebrew name.
97
- source: { kind: "class", slug: (_g2 = (_f2 = (_e2 = (_d2 = resolved.classes) == null ? void 0 : _d2[pool.classIndex]) == null ? void 0 : _e2.entity) == null ? void 0 : _f2.slug) != null ? _g2 : pool.id, level: pool.anchorLevel }
98
- });
99
- };
100
- for (const pool of (_g = resolved.pools) != null ? _g : []) {
101
- for (const sel of (_h = pool.selected) != null ? _h : []) pushBoon(sel, pool);
102
- for (const g of (_i = pool.grants) != null ? _i : []) pushBoon(g, pool);
103
- }
104
- return { features: [...(_j = resolved.features) != null ? _j : [], ...buffFeatures], activeBuffs };
105
- }
106
- function foldsOnSelf(eff) {
107
- if (eff.subject === void 0 || eff.subject === "self") return true;
108
- warnOnce(eff.subject, `archivist: unrecognised effect subject "${eff.subject}" (only "self" folds)`);
109
- return false;
110
- }
111
- function selfEffectsOf(f) {
112
- var _a;
113
- return ((_a = f.effects) != null ? _a : []).filter(foldsOnSelf);
114
- }
115
- function computeFeatureEffects(features, opts) {
116
- var _a, _b, _c;
117
- const out = emptyFeatureEffectTotals();
118
- for (const rf of features) {
119
- if (!foldsNow(rf, (_a = opts == null ? void 0 : opts.activeBuffs) != null ? _a : /* @__PURE__ */ new Set())) continue;
120
- const level = (_b = opts == null ? void 0 : opts.levelFor) == null ? void 0 : _b.call(opts, rf.source);
121
- for (const eff of selfEffectsOf(rf.feature)) {
122
- applyEffect(out, columnScaledRider(eff, rf, level, opts == null ? void 0 : opts.tableDiceFor), (_c = rf.feature.name) != null ? _c : "Feature", level, rf.source);
123
- }
124
- }
125
- return out;
126
- }
127
- function classifyProficiencyEffect(eff) {
128
- if (eff.kind !== "proficiency") return null;
129
- const raw = eff.value;
130
- const expertise = eff.expertise === true;
131
- switch (eff.proficiency_type) {
132
- case "skill":
133
- return { bucket: "skills", value: toProfSlug(raw), raw, expertise };
134
- case "tool":
135
- return { bucket: "tools", value: toProfSlug(raw), raw, expertise };
136
- case "language":
137
- return { bucket: "languages", value: toProfSlug(raw), raw, expertise };
138
- case "armor":
139
- return { bucket: "armor", value: raw.toLowerCase(), raw, expertise };
140
- case "weapon":
141
- return { bucket: "weapons", value: raw.toLowerCase(), raw, expertise };
142
- default: {
143
- const ab = normalizeAbility(raw);
144
- return ab ? { bucket: "saves", value: ab, raw, expertise } : null;
145
- }
146
- }
147
- }
148
- function collectProficiencyEffectGrants(features, activeBuffs) {
149
- const out = {
150
- skills: [],
151
- tools: [],
152
- languages: [],
153
- saves: [],
154
- armor: [],
155
- weapons: []
156
- };
157
- for (const rf of features) {
158
- if (!foldsNow(rf, activeBuffs)) continue;
159
- for (const eff of selfEffectsOf(rf.feature)) {
160
- const c = classifyProficiencyEffect(eff);
161
- if (!c) continue;
162
- out[c.bucket].push({
163
- value: c.value,
164
- raw: c.raw,
165
- sourceKind: rf.source.kind,
166
- sourceSlug: rf.source.slug,
167
- ...c.expertise ? { expertise: true } : {}
168
- });
169
- }
170
- }
171
- return out;
172
- }
173
- function scaled(base, key, scalesAt, level) {
174
- if (level === void 0 || !(scalesAt == null ? void 0 : scalesAt.length)) return base;
175
- let best = base;
176
- let bestLevel = -1;
177
- for (const step of scalesAt) {
178
- if (step.level > level || step.level <= bestLevel) continue;
179
- const v = step[key];
180
- if (typeof v !== "number") continue;
181
- best = v;
182
- bestLevel = step.level;
183
- }
184
- return best;
185
- }
186
- function columnScaledRider(eff, rf, level, tableDiceFor) {
187
- if (eff.kind !== "damage-bonus" || level === void 0 || !tableDiceFor) return eff;
188
- const src = rf.source;
189
- const column = rf.feature.name;
190
- if (src.kind !== "class" && src.kind !== "subclass" || !column) return eff;
191
- const atGain = tableDiceFor(src, column, src.level);
192
- if (!atGain || atGain.toLowerCase() !== eff.amount.trim().toLowerCase()) return eff;
193
- const now = tableDiceFor(src, column, level);
194
- return now ? { ...eff, amount: now } : eff;
195
- }
196
- function riderScope(appliesTo) {
197
- if (appliesTo === void 0 || appliesTo === "all" || appliesTo === "spell") return void 0;
198
- const words = Array.isArray(appliesTo) ? appliesTo : [appliesTo];
199
- return words.includes("weapon") ? void 0 : [...words];
200
- }
201
- function applyEffect(out, eff, label, level, owner) {
202
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
203
- switch (eff.kind) {
204
- case "initiative-bonus":
205
- out.initiative_bonus += eff.value;
206
- out.initiative_terms.push({ label, value: eff.value });
207
- break;
208
- case "skill-bonus":
209
- out.skill_bonus_terms.push({
210
- skills: eff.skills.map(toProfSlug),
211
- ability: eff.ability,
212
- minimum: (_a = eff.minimum) != null ? _a : 0,
213
- label
214
- });
215
- break;
216
- case "save-bonus":
217
- out.save_bonus_terms.push({
218
- saves: [...(_b = eff.saves) != null ? _b : []],
219
- ability: eff.ability,
220
- minimum: (_c = eff.minimum) != null ? _c : 0,
221
- ...eff.inactive_while ? { inactiveWhile: eff.inactive_while } : {},
222
- label
223
- });
224
- break;
225
- case "half-proficiency":
226
- out.half_proficiency_terms.push({
227
- skills: ((_d = eff.skills) != null ? _d : []).map(toProfSlug),
228
- round: (_e = eff.round) != null ? _e : "down",
229
- label
230
- });
231
- break;
232
- case "hp-per-level-bonus":
233
- out.hp_per_level_bonus += eff.value;
234
- out.hp_per_level_terms.push({ label, value: eff.value });
235
- break;
236
- case "speed-bonus": {
237
- const value = scaled(eff.value, "value", eff.scales_at, level);
238
- if (eff.mode === "walk") {
239
- if (eff.set) out.speed_walk_set = Math.max(out.speed_walk_set, value);
240
- else {
241
- out.speed_walk_bonus += value;
242
- out.speed_walk_terms.push({ label, value });
243
- }
244
- }
245
- break;
246
- }
247
- case "attunement-limit": {
248
- out.attunement_set = Math.max(out.attunement_set, scaled(eff.value, "value", eff.scales_at, level));
249
- break;
250
- }
251
- case "sense":
252
- out.senses[eff.type] = Math.max(out.senses[eff.type], eff.range);
253
- break;
254
- case "resistance":
255
- pushDefenseGrant(out.resistances, eff.damage_type, label, eff.condition);
256
- break;
257
- case "immunity":
258
- pushDefenseGrant(out.immunities, eff.damage_type, label, eff.condition);
259
- break;
260
- case "vulnerability":
261
- pushDefenseGrant(out.vulnerabilities, eff.damage_type, label, eff.condition);
262
- break;
263
- case "immune-condition":
264
- if (!eff.while) pushDefenseGrant(out.condition_immunities, eff.condition, label);
265
- break;
266
- case "proficiency": {
267
- const c = classifyProficiencyEffect(eff);
268
- if (!c) break;
269
- if (c.bucket === "saves") {
270
- pushUnique(out.proficiencies.saves, c.value);
271
- } else {
272
- pushUnique(out.proficiencies[c.bucket], c.value);
273
- }
274
- if (c.expertise && c.bucket === "skills") pushUnique(out.proficiencies.skillExpertise, c.value);
275
- break;
276
- }
277
- case "ac-bonus":
278
- out.ac_terms.push({
279
- value: eff.value,
280
- requires_armor: eff.requires_armor === true,
281
- label,
282
- condition: eff.condition
283
- });
284
- break;
285
- case "weapon-ability": {
286
- if (eff.ability !== "spellcasting") {
287
- const w = eff.weapons;
288
- const weaponSlugs = !w || w === "chosen" ? void 0 : Array.isArray(w) ? w.map(bareEntitySlug) : [bareEntitySlug(w)];
289
- out.weaponAbilities.push({ ability: eff.ability, weaponSlugs });
290
- }
291
- break;
292
- }
293
- case "roll-modifier": {
294
- const rolls = eff.roll === "any" ? ["ability-check", "saving-throw", "attack"] : [eff.roll];
295
- const scopes = (_f = normalizeRollScope(eff.scope, rolls[0])) != null ? _f : [eff.scope];
296
- for (const roll of rolls) for (const scope of scopes)
297
- out.rollModifiers.push({ mode: eff.mode, roll, scope, condition: eff.condition, label });
298
- break;
299
- }
300
- case "save-outcome":
301
- out.saveOutcomes.push({
302
- ability: eff.ability === "any" ? void 0 : eff.ability,
303
- on_success: eff.on_success,
304
- on_failure: eff.on_failure,
305
- appliesTo: (_g = eff.applies_to) != null ? _g : void 0,
306
- condition: eff.condition,
307
- label
308
- });
309
- break;
310
- case "crit-range":
311
- if (((_h = eff.applies_to) != null ? _h : "weapon") !== "spell") out.critRange = Math.min(out.critRange, eff.min_roll);
312
- break;
313
- case "extra-attack":
314
- out.extraAttack = Math.max(out.extraAttack, scaled(eff.count, "count", eff.scales_at, level));
315
- break;
316
- case "reroll-damage":
317
- out.attackNotes.push(`Reroll ${eff.max_reroll}s${eff.once_per_die ? " (once/die)" : ""}`);
318
- break;
319
- case "attack-rule":
320
- if (eff.flag === "no-ranged-in-melee-disadvantage") out.attackNotes.push("No disadvantage firing in melee");
321
- break;
322
- case "damage-bonus":
323
- if (((_i = eff.applies_to) != null ? _i : "weapon") !== "spell") {
324
- const scope = riderScope(eff.applies_to);
325
- out.damageBonuses.push({
326
- amount: eff.amount,
327
- damage_type: eff.damage_type,
328
- source: label,
329
- ...eff.condition ? { condition: eff.condition } : {},
330
- ...scope ? { scope } : {},
331
- ...owner ? { owner } : {}
332
- });
333
- }
334
- break;
335
- case "ability-score-increase":
336
- if (eff.abilities === "chosen") break;
337
- for (const ab of eff.abilities) out.ability_bonus[ab] = ((_j = out.ability_bonus[ab]) != null ? _j : 0) + eff.amount;
338
- break;
339
- default:
340
- break;
341
- }
342
- }
343
-
344
- export {
345
- emptyFeatureEffectTotals,
346
- foldsNow,
347
- assembleEffectFeatures,
348
- foldsOnSelf,
349
- selfEffectsOf,
350
- computeFeatureEffects,
351
- classifyProficiencyEffect,
352
- collectProficiencyEffectGrants
353
- };
@@ -1,26 +0,0 @@
1
- // src/schemas/entity-extras-schema.ts
2
- import { z } from "zod";
3
- var imageField = z.union([z.string().min(1), z.array(z.string().min(1))]).optional();
4
- var additionalSpellsEntrySchema = z.object({
5
- name: z.string().min(1).optional(),
6
- ability: z.union([z.string().min(1), z.object({ choose: z.array(z.string().min(1)) })]).optional(),
7
- known: z.unknown().optional(),
8
- innate: z.unknown().optional(),
9
- prepared: z.unknown().optional(),
10
- expanded: z.unknown().optional(),
11
- resourceName: z.string().min(1).optional()
12
- });
13
- var progressionSchema = z.object({
14
- name: z.string().min(1),
15
- progression: z.union([z.record(z.string(), z.number()), z.array(z.number())]),
16
- feature_type: z.array(z.string().min(1)).optional(),
17
- featureType: z.array(z.string().min(1)).optional(),
18
- category: z.array(z.string().min(1)).optional(),
19
- required: z.record(z.string(), z.array(z.string())).optional()
20
- });
21
-
22
- export {
23
- imageField,
24
- additionalSpellsEntrySchema,
25
- progressionSchema
26
- };
@@ -1,187 +0,0 @@
1
- import {
2
- poolGrantSchema,
3
- selectionPoolSchema,
4
- tabDeclSchema
5
- } from "./chunk-G6MHJDVT.js";
6
- import {
7
- casterTypeEnum
8
- } from "./chunk-CJYCVNW2.js";
9
- import {
10
- featureSchema
11
- } from "./chunk-YD2VAHA6.js";
12
- import {
13
- resourceSchema
14
- } from "./chunk-ZJXSXVFP.js";
15
- import {
16
- startingEquipmentEntrySchema,
17
- startingGoldSchema
18
- } from "./chunk-IN4M4X7P.js";
19
- import {
20
- choiceSchema
21
- } from "./chunk-5MXFW4O3.js";
22
- import {
23
- additionalSpellsEntrySchema,
24
- imageField,
25
- progressionSchema
26
- } from "./chunk-UA5KS2PL.js";
27
-
28
- // src/class/class.schema.ts
29
- import { z } from "zod";
30
- var abilityEnum = z.enum(["str", "dex", "con", "int", "wis", "cha"]);
31
- var skillEnum = z.enum([
32
- "acrobatics",
33
- "animal-handling",
34
- "arcana",
35
- "athletics",
36
- "deception",
37
- "history",
38
- "insight",
39
- "intimidation",
40
- "investigation",
41
- "medicine",
42
- "nature",
43
- "perception",
44
- "performance",
45
- "persuasion",
46
- "religion",
47
- "sleight-of-hand",
48
- "stealth",
49
- "survival"
50
- ]);
51
- var armorCategoryEnum = z.enum(["light", "medium", "heavy", "shield"]);
52
- var weaponCategoryEnum = z.enum(["simple", "martial"]);
53
- var hitDieEnum = z.enum(["d6", "d8", "d10", "d12"]);
54
- var editionEnum = z.enum(["2014", "2024"]);
55
- var weaponProficiencySchema = z.object({
56
- fixed: z.array(z.string()).optional(),
57
- categories: z.array(weaponCategoryEnum).optional(),
58
- conditional: z.array(z.object({
59
- category: weaponCategoryEnum,
60
- where_property: z.array(z.string()).nonempty()
61
- })).optional()
62
- }).refine(
63
- (w) => {
64
- var _a, _b, _c, _d, _e, _f;
65
- return ((_b = (_a = w.fixed) == null ? void 0 : _a.length) != null ? _b : 0) + ((_d = (_c = w.categories) == null ? void 0 : _c.length) != null ? _d : 0) + ((_f = (_e = w.conditional) == null ? void 0 : _e.length) != null ? _f : 0) > 0;
66
- },
67
- { message: "weapon proficiency must declare at least one of fixed/categories/conditional" }
68
- );
69
- var toolProficiencySchema = z.object({
70
- fixed: z.array(z.string()).optional(),
71
- choice: z.object({
72
- count: z.number().int().positive(),
73
- from: z.array(z.string()).nonempty()
74
- }).optional()
75
- }).refine((t) => {
76
- var _a, _b;
77
- return ((_b = (_a = t.fixed) == null ? void 0 : _a.length) != null ? _b : 0) > 0 || t.choice !== void 0;
78
- }, {
79
- message: "tool proficiency must declare fixed or choice"
80
- });
81
- var spellcastingSchema = z.object({
82
- caster_type: casterTypeEnum,
83
- ability: abilityEnum,
84
- preparation: z.enum(["known", "prepared"]),
85
- spell_list: z.string().min(1)
86
- });
87
- var weaponMasterySchema = z.object({
88
- // §2.7's ONE deliberate relaxation, and the phase's only non-additive edit. Measured: `starting_count`
89
- // has ZERO read sites in either repo, all 24 SRD class records are `weapon_mastery: null`, and the
90
- // converter population is zero too (26 of 28 class docs null; both object carriers DO carry the count).
91
- // It exists so the converter can re-emit a countless mastery object later. R4-G5 did NOT make it read: §6 takes
92
- // the count from the class TABLE COLUMN instead (`COUNT_COLUMNS` in `pc.table-column.ts`), because the column
93
- // is the truth on BOTH corpora, and `count.column` on the choice itself is booked to the G7 converter handoff.
94
- // `starting_count` therefore still has ZERO read sites.
95
- // A THREE-declaration edit (finding 11): here, `class.types.ts`, and the generator's COPIED
96
- // `interface WeaponMasteryConfig` in tools/srd-canonical/merger-rules/class-merge.ts.
97
- starting_count: z.number().int().nonnegative().optional(),
98
- scaling: z.record(z.string(), z.number().int().nonnegative()).optional()
99
- });
100
- var classTableRowSchema = z.object({
101
- prof_bonus: z.number().int().positive(),
102
- columns: z.record(z.string(), z.union([z.string(), z.number()])).optional(),
103
- feature_ids: z.array(z.string())
104
- });
105
- var classEntitySchema = z.object({
106
- slug: z.string().min(1),
107
- name: z.string().min(1),
108
- edition: editionEnum,
109
- source: z.string().min(1),
110
- description: z.string(),
111
- hit_die: hitDieEnum,
112
- primary_abilities: z.array(abilityEnum).nonempty(),
113
- // D2b-A (A-1): the class's recommended Standard Array (SRD 5.2 "Standard Array by Class"); absent on 2014 classes.
114
- standard_array: z.strictObject({
115
- str: z.number().int(),
116
- dex: z.number().int(),
117
- con: z.number().int(),
118
- int: z.number().int(),
119
- wis: z.number().int(),
120
- cha: z.number().int()
121
- }).optional(),
122
- saving_throws: z.array(abilityEnum).length(2),
123
- proficiencies: z.object({
124
- armor: z.array(armorCategoryEnum),
125
- weapons: weaponProficiencySchema,
126
- tools: toolProficiencySchema.optional()
127
- }),
128
- skill_choices: z.object({
129
- count: z.number().int().positive(),
130
- from: z.array(skillEnum).nonempty()
131
- }),
132
- // Zod strips unknown keys by default, so without this declaration an authored
133
- // `choices:` block is silently deleted by `parseClass`. Same spelling as
134
- // `raceEntitySchema` / `backgroundEntitySchema`.
135
- choices: z.array(choiceSchema).optional(),
136
- starting_equipment: z.array(startingEquipmentEntrySchema),
137
- starting_gold: startingGoldSchema.optional(),
138
- spellcasting: spellcastingSchema.nullable(),
139
- subclass_level: z.number().int().positive(),
140
- subclass_feature_name: z.string().min(1),
141
- weapon_mastery: weaponMasterySchema.nullable(),
142
- epic_boon_level: z.number().int().positive().nullable(),
143
- table: z.record(z.string(), classTableRowSchema),
144
- features_by_level: z.record(z.string(), z.array(featureSchema)),
145
- resources: z.array(resourceSchema),
146
- selection_pools: z.array(selectionPoolSchema).optional(),
147
- pool_grants: z.array(poolGrantSchema).optional(),
148
- tabs: z.array(tabDeclSchema).optional(),
149
- rendering_hint: z.string().optional(),
150
- // 28
151
- has_fluff: z.boolean().optional(),
152
- // 28
153
- has_fluff_images: z.boolean().optional(),
154
- // 27
155
- table_col_labels: z.array(z.string().min(1)).optional(),
156
- // 28
157
- starting_equipment_additional_from_background: z.boolean().optional(),
158
- // 28
159
- multiclassing: z.unknown().optional(),
160
- // FOUR arities measured incl. {} ×3; free-form 5etools keys
161
- // ("thieves' tools", requirements.or[].{dex,str}) — Q1 ruling
162
- cantrip_progression: z.array(z.number()).optional(),
163
- // 15
164
- prepared_spells: z.string().min(1).optional(),
165
- // formula string "<$level$> / 2 + <$int_mod$>"
166
- prepared_spells_change: z.string().min(1).optional(),
167
- // "restLong"
168
- prepared_spells_progression: z.array(z.number()).optional(),
169
- spells_known_progression: z.array(z.number()).optional(),
170
- spells_known_progression_fixed: z.array(z.number()).optional(),
171
- spells_known_progression_fixed_allow_lower_level: z.boolean().optional(),
172
- // ⚠️ BOOLEAN (finding 1)
173
- spells_known_progression_fixed_by_level: z.record(z.string(), z.record(z.string(), z.number())).optional(),
174
- // ⚠️ two-deep record (finding 1)
175
- feat_progression: z.array(progressionSchema).optional(),
176
- // 13
177
- optionalfeature_progression: z.array(progressionSchema).optional(),
178
- // 9 carriers; the ARRAY
179
- // progression arm rides 4 of them
180
- additional_spells: z.array(additionalSpellsEntrySchema).optional(),
181
- // 7
182
- image: imageField
183
- });
184
-
185
- export {
186
- classEntitySchema
187
- };
@@ -1,58 +0,0 @@
1
- import {
2
- armorEntitySchema
3
- } from "./chunk-HS6FIOLP.js";
4
-
5
- // src/armor/armor.parser.ts
6
- import { parseYaml } from "@archivist-gg/core";
7
- var KNOWN_KEYS = /* @__PURE__ */ new Set([
8
- "name",
9
- "slug",
10
- "category",
11
- "ac",
12
- "strength_requirement",
13
- "stealth_disadvantage",
14
- "weight",
15
- "cost",
16
- "rarity",
17
- "source",
18
- "page",
19
- "edition",
20
- "entries",
21
- "raw",
22
- // Root extras declared on armorEntitySchema (spec §5). The schema declaring them is NOT
23
- // enough: this set is the second, independent gate — a key missing here is copied into
24
- // `raw` as well, so the two lists must move together.
25
- "rendering_hint",
26
- "icon",
27
- "has_fluff",
28
- "has_fluff_images",
29
- "image",
30
- // The alias is a KNOWN key so it is never copied into `raw` alongside the mapped
31
- // `strength_requirement` — that duplicate is the census row this fix empties.
32
- "strength_required"
33
- ]);
34
- function parseArmor(source) {
35
- var _a;
36
- const raw = parseYaml(source, ["name", "slug", "category", "ac"]);
37
- if (!raw.success) return raw;
38
- if (raw.data.strength_requirement === void 0 && typeof raw.data.strength_required === "number") {
39
- raw.data.strength_requirement = raw.data.strength_required;
40
- }
41
- const result = armorEntitySchema.safeParse(raw.data);
42
- if (!result.success) {
43
- return { success: false, error: `armor schema validation failed: ${result.error.message}` };
44
- }
45
- const entity = result.data;
46
- const extras = {};
47
- for (const [k, v] of Object.entries(raw.data)) {
48
- if (!KNOWN_KEYS.has(k)) extras[k] = v;
49
- }
50
- if (Object.keys(extras).length > 0) {
51
- entity.raw = { ...(_a = entity.raw) != null ? _a : {}, ...extras };
52
- }
53
- return { success: true, data: entity };
54
- }
55
-
56
- export {
57
- parseArmor
58
- };
@@ -1,18 +0,0 @@
1
- import {
2
- parseItem
3
- } from "./chunk-EYX4JMAU.js";
4
-
5
- // src/item/item.codec.ts
6
- import yaml from "js-yaml";
7
- var itemCodec = {
8
- parse(doc) {
9
- return parseItem(doc.body);
10
- },
11
- serialize(item) {
12
- return yaml.dump(item, { lineWidth: -1, sortKeys: false });
13
- }
14
- };
15
-
16
- export {
17
- itemCodec
18
- };