@archivist-gg/dnd5e 0.3.19 → 0.3.26

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 (441) 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-2NUDWOFG.js +1 -0
  16. package/dist/chunk-3LWOVRLA.js +1 -0
  17. package/dist/chunk-3QQOATV3.js +1 -0
  18. package/dist/chunk-4E2GIWJE.js +1 -0
  19. package/dist/chunk-4GN3GYMP.js +1 -0
  20. package/dist/chunk-4IAMSRHD.js +1 -0
  21. package/dist/chunk-4JEF3CET.js +1 -0
  22. package/dist/chunk-4KVVAENP.js +1 -0
  23. package/dist/chunk-4SYAKWY4.js +1 -0
  24. package/dist/chunk-56JK6VCL.js +1 -0
  25. package/dist/chunk-5XDCM6YK.js +1 -0
  26. package/dist/chunk-63YJPWTM.js +1 -0
  27. package/dist/chunk-6R46KYGU.js +1 -0
  28. package/dist/chunk-6W253VHH.js +1 -0
  29. package/dist/chunk-72PRMZRD.js +1 -0
  30. package/dist/chunk-757KM22B.js +1 -0
  31. package/dist/chunk-7EL3GWWJ.js +1 -0
  32. package/dist/chunk-7FPQJDFD.js +1 -0
  33. package/dist/chunk-AINRPPLH.js +1 -0
  34. package/dist/chunk-BC52J4LA.js +1 -0
  35. package/dist/chunk-BCXGB4HP.js +1 -0
  36. package/dist/chunk-BREHZNTL.js +1 -0
  37. package/dist/chunk-BZ6BGGZS.js +1 -0
  38. package/dist/chunk-CAPYNIGK.js +1 -0
  39. package/dist/chunk-CCAVZANF.js +1 -0
  40. package/dist/chunk-CCFIINBA.js +1 -0
  41. package/dist/chunk-CEHL7PPC.js +1 -0
  42. package/dist/chunk-CMIEZQL4.js +1 -0
  43. package/dist/chunk-CNMHADNV.js +1 -0
  44. package/dist/chunk-CSTAQQGX.js +1 -0
  45. package/dist/chunk-DTB7YBMZ.js +1 -0
  46. package/dist/chunk-DVUXUIPV.js +1 -0
  47. package/dist/chunk-DZITM5AG.js +1 -0
  48. package/dist/chunk-E3MS4M3N.js +1 -0
  49. package/dist/chunk-E7KFJLDR.js +1 -0
  50. package/dist/chunk-EAARMPCW.js +1 -0
  51. package/dist/chunk-EPA24PVZ.js +1 -0
  52. package/dist/chunk-ETDMOGFO.js +1 -0
  53. package/dist/chunk-EVT7MGAC.js +1 -0
  54. package/dist/chunk-FOLHTMSC.js +1 -0
  55. package/dist/chunk-GCYUCIDN.js +1 -0
  56. package/dist/chunk-GD7WRCNH.js +1 -0
  57. package/dist/chunk-GGQDQSIF.js +1 -0
  58. package/dist/chunk-GIQLIBC7.js +1 -0
  59. package/dist/chunk-HX7WBOKR.js +1 -0
  60. package/dist/chunk-I26FHSI6.js +1 -0
  61. package/dist/chunk-IHPLT2ZT.js +1 -0
  62. package/dist/chunk-J3RP5C7L.js +1 -0
  63. package/dist/chunk-J5GL6FLP.js +1 -0
  64. package/dist/chunk-JXDX2DKF.js +1 -0
  65. package/dist/chunk-KEXSF3CH.js +1 -0
  66. package/dist/chunk-KM75CC6Q.js +1 -0
  67. package/dist/chunk-L2DXF7YS.js +1 -0
  68. package/dist/chunk-LHH5XSEA.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-MGGKZGLG.js +1 -0
  73. package/dist/chunk-NEMX7QGG.js +1 -0
  74. package/dist/chunk-NIWLD33X.js +1 -0
  75. package/dist/chunk-NU2Z7MTS.js +1 -0
  76. package/dist/chunk-NYPH7RQN.js +1 -0
  77. package/dist/chunk-NYTR6NJS.js +1 -0
  78. package/dist/chunk-O2QZ73GA.js +1 -0
  79. package/dist/chunk-O776WL7O.js +1 -0
  80. package/dist/chunk-ONCXJMJM.js +1 -0
  81. package/dist/chunk-OTRH62HY.js +1 -0
  82. package/dist/chunk-PFQPP77Q.js +1 -0
  83. package/dist/chunk-PKIMOVQG.js +1 -0
  84. package/dist/chunk-PZ3ZZ5H5.js +1 -0
  85. package/dist/chunk-PZ4L2EEG.js +1 -0
  86. package/dist/chunk-QMEKQTUT.js +1 -0
  87. package/dist/chunk-QVWT67WA.js +1 -0
  88. package/dist/chunk-RE5Z5RNK.js +1 -0
  89. package/dist/chunk-RHIEOYDX.js +1 -0
  90. package/dist/chunk-RQZCGXUZ.js +1 -0
  91. package/dist/chunk-S5UCI27C.js +1 -0
  92. package/dist/chunk-SEOASDO4.js +1 -0
  93. package/dist/chunk-SFK57JAA.js +1 -0
  94. package/dist/chunk-SU4MEZ5P.js +1 -0
  95. package/dist/chunk-T55DELVL.js +1 -0
  96. package/dist/chunk-TKIEPC6F.js +1 -0
  97. package/dist/chunk-UBUKCRZ3.js +1 -0
  98. package/dist/chunk-VA3ZWV7C.js +1 -0
  99. package/dist/chunk-VIP3FH2O.js +1 -0
  100. package/dist/chunk-VTQ4RWEG.js +1 -0
  101. package/dist/chunk-VVJXZZ4Z.js +1 -0
  102. package/dist/chunk-WAUNLUFQ.js +1 -0
  103. package/dist/chunk-X22SISGM.js +1 -0
  104. package/dist/chunk-XKJXT2PN.js +1 -0
  105. package/dist/chunk-XPF53K54.js +1 -0
  106. package/dist/chunk-YGH7S5ZF.js +1 -0
  107. package/dist/chunk-ZE46ADXS.js +1 -0
  108. package/dist/chunk-ZI3FEUX3.js +1 -0
  109. package/dist/chunk-ZS5BMNXC.js +1 -0
  110. package/dist/chunk-ZVL5FXXO.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 +4 -3
  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 +3 -30
  128. package/dist/dnd/amount-text.js +1 -15
  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 +0 -15
  151. package/dist/entities/registry-revision.js +1 -10
  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 +46 -4
  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 -141495
  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 +5 -0
  182. package/dist/item/item.schema.js +1 -11
  183. package/dist/item/item.types.d.ts +5 -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 +44 -3
  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 +0 -24
  205. package/dist/pc/pc.additional-spells.js +1 -26
  206. package/dist/pc/pc.amount-bindings.d.ts +3 -28
  207. package/dist/pc/pc.amount-bindings.js +1 -28
  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 +6 -145
  215. package/dist/pc/pc.decision-engine.js +1 -55
  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 +19 -58
  219. package/dist/pc/pc.entry-overrides.js +1 -41
  220. package/dist/pc/pc.equipment.d.ts +2 -22
  221. package/dist/pc/pc.equipment.js +1 -34
  222. package/dist/pc/pc.feature-effects.d.ts +27 -281
  223. package/dist/pc/pc.feature-effects.js +1 -39
  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 -65
  227. package/dist/pc/pc.item-effects.d.ts +19 -0
  228. package/dist/pc/pc.item-effects.js +1 -0
  229. package/dist/pc/pc.member-choices.d.ts +3 -66
  230. package/dist/pc/pc.member-choices.js +1 -39
  231. package/dist/pc/pc.parser.js +1 -58
  232. package/dist/pc/pc.pools.d.ts +7 -10
  233. package/dist/pc/pc.pools.js +1 -27
  234. package/dist/pc/pc.proficiencies.d.ts +0 -40
  235. package/dist/pc/pc.proficiencies.js +1 -156
  236. package/dist/pc/pc.proficiency-grants.d.ts +3 -27
  237. package/dist/pc/pc.proficiency-normalize.d.ts +0 -35
  238. package/dist/pc/pc.proficiency-normalize.js +1 -18
  239. package/dist/pc/pc.proficiency-query.d.ts +0 -13
  240. package/dist/pc/pc.proficiency-query.js +1 -27
  241. package/dist/pc/pc.recalc.d.ts +8 -131
  242. package/dist/pc/pc.recalc.js +1 -1042
  243. package/dist/pc/pc.resolver.d.ts +9 -107
  244. package/dist/pc/pc.resolver.js +1 -60
  245. package/dist/pc/pc.resource-seed.d.ts +0 -8
  246. package/dist/pc/pc.resource-seed.js +1 -42
  247. package/dist/pc/pc.resources.d.ts +1 -59
  248. package/dist/pc/pc.resources.js +1 -23
  249. package/dist/pc/pc.rest.d.ts +1 -20
  250. package/dist/pc/pc.rest.js +1 -231
  251. package/dist/pc/pc.schema.d.ts +20 -2
  252. package/dist/pc/pc.schema.js +1 -9
  253. package/dist/pc/pc.slotting.d.ts +0 -29
  254. package/dist/pc/pc.slotting.js +1 -28
  255. package/dist/pc/pc.speeds.d.ts +36 -0
  256. package/dist/pc/pc.spell-scope.d.ts +0 -16
  257. package/dist/pc/pc.spellcasting.d.ts +0 -70
  258. package/dist/pc/pc.spellcasting.js +1 -28
  259. package/dist/pc/pc.table-column.d.ts +3 -22
  260. package/dist/pc/pc.table-column.js +1 -18
  261. package/dist/pc/pc.tool-picks.d.ts +0 -27
  262. package/dist/pc/pc.tool-picks.js +1 -18
  263. package/dist/pc/pc.types.d.ts +59 -374
  264. package/dist/pc/pc.weapon-grant.d.ts +0 -6
  265. package/dist/pc/pool-layout.d.ts +0 -39
  266. package/dist/pc/pool-layout.js +1 -18
  267. package/dist/pc/resource-equivalents.d.ts +2 -40
  268. package/dist/pc/roll-scope.js +1 -8
  269. package/dist/pc/roll-tag-labels.d.ts +0 -32
  270. package/dist/pc/roll-tag-labels.js +1 -17
  271. package/dist/pc/spell-source.d.ts +0 -11
  272. package/dist/pc/spell-source.js +1 -8
  273. package/dist/race/race.codec.d.ts +0 -6
  274. package/dist/race/race.codec.js +1 -15
  275. package/dist/race/race.parser.js +1 -14
  276. package/dist/race/race.schema.d.ts +0 -8
  277. package/dist/race/race.schema.js +1 -14
  278. package/dist/race/race.structural.d.ts +0 -6
  279. package/dist/race/race.structural.js +1 -6
  280. package/dist/race/race.types.d.ts +0 -8
  281. package/dist/schemas/attack-schema.d.ts +5 -0
  282. package/dist/schemas/caster-type-schema.d.ts +1 -6
  283. package/dist/schemas/caster-type-schema.js +1 -6
  284. package/dist/schemas/choice-schema.js +1 -7
  285. package/dist/schemas/duration-schema.d.ts +0 -2
  286. package/dist/schemas/duration-schema.js +1 -6
  287. package/dist/schemas/entity-extras-schema.d.ts +0 -30
  288. package/dist/schemas/entity-extras-schema.js +1 -10
  289. package/dist/schemas/equipment-grant-schema.d.ts +0 -2
  290. package/dist/schemas/equipment-grant-schema.js +1 -12
  291. package/dist/schemas/feature-alias.d.ts +0 -27
  292. package/dist/schemas/feature-effect-schema.d.ts +44 -3
  293. package/dist/schemas/feature-effect-schema.js +1 -6
  294. package/dist/schemas/feature-schema.d.ts +0 -6
  295. package/dist/schemas/feature-schema.js +1 -12
  296. package/dist/schemas/resource-schema.d.ts +1 -34
  297. package/dist/schemas/resource-schema.js +1 -12
  298. package/dist/schemas/selection-pool-schema.js +1 -10
  299. package/dist/spell/casting-time.d.ts +0 -15
  300. package/dist/spell/casting-time.js +1 -6
  301. package/dist/spell/spell.access.d.ts +0 -6
  302. package/dist/spell/spell.access.js +1 -45
  303. package/dist/spell/spell.ai-schema.js +1 -6
  304. package/dist/spell/spell.codec.js +1 -9
  305. package/dist/spell/spell.enrichment.js +1 -9
  306. package/dist/spell/spell.filter.d.ts +0 -5
  307. package/dist/spell/spell.filter.js +1 -75
  308. package/dist/spell/spell.parser.d.ts +0 -31
  309. package/dist/spell/spell.parser.js +1 -16
  310. package/dist/spell/spell.scaling.d.ts +0 -46
  311. package/dist/spell/spell.scaling.js +1 -79
  312. package/dist/spell/spell.schema.js +1 -7
  313. package/dist/spell/spell.types.d.ts +0 -7
  314. package/dist/srd/retired-items.d.ts +0 -4
  315. package/dist/srd/retired-items.js +1 -11
  316. package/dist/srd-store.d.ts +0 -33
  317. package/dist/subclass/subclass.codec.d.ts +0 -8
  318. package/dist/subclass/subclass.codec.js +1 -17
  319. package/dist/subclass/subclass.parser.js +1 -16
  320. package/dist/subclass/subclass.schema.d.ts +2 -1
  321. package/dist/subclass/subclass.schema.js +1 -14
  322. package/dist/subclass/subclass.types.d.ts +0 -3
  323. package/dist/types/attack.d.ts +2 -0
  324. package/dist/types/casting-option.d.ts +0 -4
  325. package/dist/types/choice.d.ts +1 -72
  326. package/dist/types/choice.js +1 -24
  327. package/dist/types/edition.d.ts +0 -3
  328. package/dist/types/equipment-grant.d.ts +1 -27
  329. package/dist/types/equipment-grant.js +1 -12
  330. package/dist/types/feature-effect.d.ts +11 -23
  331. package/dist/types/feature.d.ts +0 -22
  332. package/dist/types/optional-feature.types.d.ts +1 -31
  333. package/dist/types/resource.d.ts +1 -21
  334. package/dist/types/selection-pool.d.ts +0 -24
  335. package/dist/weapon/weapon-mastery.d.ts +0 -1
  336. package/dist/weapon/weapon.classify.d.ts +0 -11
  337. package/dist/weapon/weapon.classify.js +1 -7
  338. package/dist/weapon/weapon.codec.d.ts +0 -9
  339. package/dist/weapon/weapon.codec.js +1 -9
  340. package/dist/weapon/weapon.parser.js +1 -8
  341. package/dist/weapon/weapon.schema.js +1 -7
  342. package/dist/weapon/weapon.types.d.ts +0 -3
  343. package/package.json +3 -3
  344. package/src/data-srd/ATTRIBUTION.md +1 -1
  345. package/dist/chunk-2FRUSVZS.js +0 -489
  346. package/dist/chunk-2LULMQTF.js +0 -14
  347. package/dist/chunk-3LWMFYKS.js +0 -57
  348. package/dist/chunk-3SFGWFVQ.js +0 -19
  349. package/dist/chunk-3SIUAFDQ.js +0 -18
  350. package/dist/chunk-3TM34RSJ.js +0 -23
  351. package/dist/chunk-4J6DS3EJ.js +0 -30
  352. package/dist/chunk-4U55VNC7.js +0 -22
  353. package/dist/chunk-5GKJAUMX.js +0 -59
  354. package/dist/chunk-5JXFJ5AU.js +0 -26
  355. package/dist/chunk-64VNLMSG.js +0 -375
  356. package/dist/chunk-656QCX4U.js +0 -22
  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-7Q2VPKCD.js +0 -181
  361. package/dist/chunk-7XJHI5H5.js +0 -709
  362. package/dist/chunk-A54HHCWW.js +0 -67
  363. package/dist/chunk-B2QHP6UF.js +0 -159
  364. package/dist/chunk-B3DP42OM.js +0 -55
  365. package/dist/chunk-BJGOSM76.js +0 -18
  366. package/dist/chunk-BJWSOQUC.js +0 -133
  367. package/dist/chunk-CJYCVNW2.js +0 -7
  368. package/dist/chunk-CM5CWO4K.js +0 -735
  369. package/dist/chunk-DEEHHLAP.js +0 -271
  370. package/dist/chunk-DPUJDOKV.js +0 -365
  371. package/dist/chunk-EJD47JHL.js +0 -1838
  372. package/dist/chunk-EJP263OP.js +0 -186
  373. package/dist/chunk-EVMUJYUD.js +0 -195
  374. package/dist/chunk-EYX4JMAU.js +0 -101
  375. package/dist/chunk-FC4IGH5Y.js +0 -18
  376. package/dist/chunk-FJYBLXV7.js +0 -89
  377. package/dist/chunk-FMUD3LDV.js +0 -19
  378. package/dist/chunk-FMYWORTP.js +0 -93
  379. package/dist/chunk-FVXLP7P3.js +0 -18
  380. package/dist/chunk-G6MHJDVT.js +0 -41
  381. package/dist/chunk-GVWEFECG.js +0 -18
  382. package/dist/chunk-HHBD4SQ6.js +0 -24
  383. package/dist/chunk-HS6FIOLP.js +0 -52
  384. package/dist/chunk-HY2SRSVM.js +0 -23
  385. package/dist/chunk-IHE6KVC3.js +0 -13
  386. package/dist/chunk-IN4M4X7P.js +0 -34
  387. package/dist/chunk-IUAAXXNO.js +0 -58
  388. package/dist/chunk-JXWNXIIZ.js +0 -219
  389. package/dist/chunk-K5NJBTE2.js +0 -18
  390. package/dist/chunk-KR6JF3BF.js +0 -14
  391. package/dist/chunk-KSTV7J2U.js +0 -112
  392. package/dist/chunk-KU3YLF6D.js +0 -106
  393. package/dist/chunk-LBEXLN6I.js +0 -91
  394. package/dist/chunk-LHZXYFBU.js +0 -94
  395. package/dist/chunk-LICYHPI3.js +0 -237
  396. package/dist/chunk-LNT64X7C.js +0 -81
  397. package/dist/chunk-LSLSG67V.js +0 -31
  398. package/dist/chunk-LVQLWRCU.js +0 -15
  399. package/dist/chunk-MYY2C5MB.js +0 -233
  400. package/dist/chunk-NKZMQV2C.js +0 -19
  401. package/dist/chunk-NTU2DXNG.js +0 -355
  402. package/dist/chunk-NXUY5XQN.js +0 -1062
  403. package/dist/chunk-NZO7M5GV.js +0 -18
  404. package/dist/chunk-OOL4KMG2.js +0 -71
  405. package/dist/chunk-OOSRUJBI.js +0 -19
  406. package/dist/chunk-PDJSUH24.js +0 -110
  407. package/dist/chunk-PTXBIDG7.js +0 -63
  408. package/dist/chunk-PVCEA4HZ.js +0 -6
  409. package/dist/chunk-QA3YCOML.js +0 -101
  410. package/dist/chunk-QFWQKS3M.js +0 -110
  411. package/dist/chunk-QS5L5YTJ.js +0 -24
  412. package/dist/chunk-QYZV2MQA.js +0 -97
  413. package/dist/chunk-RD2MID3M.js +0 -292
  414. package/dist/chunk-S3YUXDSC.js +0 -278
  415. package/dist/chunk-S7REMWW4.js +0 -21
  416. package/dist/chunk-TOM66P2P.js +0 -38
  417. package/dist/chunk-TRBGC4ZG.js +0 -112
  418. package/dist/chunk-UA5KS2PL.js +0 -26
  419. package/dist/chunk-UJCK5IW4.js +0 -187
  420. package/dist/chunk-UNYR5GLI.js +0 -23
  421. package/dist/chunk-UZXG6QSY.js +0 -58
  422. package/dist/chunk-VN5DLURA.js +0 -158
  423. package/dist/chunk-VP5TIXDK.js +0 -178
  424. package/dist/chunk-VPYBK2MG.js +0 -18
  425. package/dist/chunk-VTTA2ALZ.js +0 -16
  426. package/dist/chunk-W6GC6OKK.js +0 -16
  427. package/dist/chunk-WELIKLZF.js +0 -256
  428. package/dist/chunk-WOHX7YTH.js +0 -165
  429. package/dist/chunk-WSVMLNTO.js +0 -31
  430. package/dist/chunk-WYGD2UGN.js +0 -14
  431. package/dist/chunk-XCFC7LGF.js +0 -122
  432. package/dist/chunk-XJ2F2WO6.js +0 -8
  433. package/dist/chunk-XTEFPUSN.js +0 -23
  434. package/dist/chunk-YBLDE5CG.js +0 -42
  435. package/dist/chunk-YDGMBMYI.js +0 -25
  436. package/dist/chunk-YHYTW5QA.js +0 -20
  437. package/dist/chunk-ZCTUYGNV.js +0 -26
  438. package/dist/chunk-ZDAEGJH4.js +0 -102
  439. package/dist/chunk-ZJXSXVFP.js +0 -58
  440. package/dist/chunk-ZOWKWMD2.js +0 -18
  441. package/dist/chunk-ZUQW5VBZ.js +0 -89
@@ -1,18 +0,0 @@
1
- import {
2
- parseSubclass
3
- } from "./chunk-UNYR5GLI.js";
4
-
5
- // src/subclass/subclass.codec.ts
6
- import yaml from "js-yaml";
7
- var subclassCodec = {
8
- parse(doc) {
9
- return parseSubclass(doc.body);
10
- },
11
- serialize(entity) {
12
- return yaml.dump(entity, { lineWidth: -1, sortKeys: false });
13
- }
14
- };
15
-
16
- export {
17
- subclassCodec
18
- };
@@ -1,71 +0,0 @@
1
- import {
2
- featureEffectSchema
3
- } from "./chunk-JXWNXIIZ.js";
4
-
5
- // src/schemas/choice-schema.ts
6
- import { z } from "zod";
7
- var abilityEnum = z.enum(["str", "dex", "con", "int", "wis", "cha"]);
8
- var entityFilterSchema = z.object({
9
- feature_type: z.string().min(1).optional(),
10
- category: z.string().min(1).optional(),
11
- parent_class: z.literal("self").optional(),
12
- available_to: z.literal("self").optional(),
13
- weapon_category: z.enum(["simple", "martial"]).optional(),
14
- armor_category: z.enum(["light", "medium", "heavy", "shield"]).optional(),
15
- item_type: z.array(z.string().min(1)).nonempty().optional(),
16
- mundane: z.boolean().optional(),
17
- list: z.string().min(1).optional(),
18
- level: z.number().int().min(0).max(9).optional(),
19
- edition: z.string().min(1).optional(),
20
- // D2b-A (design §2.2 step 1): Pact of the Tome's "level 1 ritual spells".
21
- ritual: z.boolean().optional()
22
- }).strict();
23
- var inlineOptionSchema = z.lazy(() => z.object({
24
- value: z.string().min(1),
25
- label: z.string().min(1),
26
- description: z.string().optional(),
27
- effects: z.array(featureEffectSchema).optional(),
28
- choices: z.array(choiceSchema).optional()
29
- }).strict());
30
- var choiceSchema = z.lazy(() => z.discriminatedUnion("kind", [
31
- z.object({
32
- kind: z.literal("select-inline"),
33
- id: z.string().min(1),
34
- label: z.string().optional(),
35
- count: z.number().int().positive().optional(),
36
- options: z.array(inlineOptionSchema).nonempty()
37
- }).strict(),
38
- z.object({
39
- kind: z.literal("select-entity"),
40
- id: z.string().min(1),
41
- label: z.string().optional(),
42
- count: z.number().int().positive().optional(),
43
- entity_type: z.string().min(1),
44
- from: z.array(z.string().min(1)).nonempty().optional(),
45
- where: entityFilterSchema.optional(),
46
- // D2b-A: a pick that names a target (a blast's cantrip), never a grant.
47
- target: z.literal(true).optional()
48
- }).strict(),
49
- z.object({
50
- kind: z.literal("select-proficiency"),
51
- id: z.string().min(1),
52
- label: z.string().optional(),
53
- count: z.number().int().positive(),
54
- domain: z.enum(["skill", "tool", "language", "save"]),
55
- from: z.array(z.string().min(1)).nonempty().optional(),
56
- from_proficient: z.boolean().optional(),
57
- expertise: z.boolean().optional()
58
- }).strict(),
59
- z.object({
60
- kind: z.literal("ability-points"),
61
- id: z.string().min(1),
62
- label: z.string().optional(),
63
- points: z.number().int().positive(),
64
- max_per: z.number().int().positive(),
65
- pool: z.array(abilityEnum).nonempty().optional()
66
- }).strict()
67
- ]));
68
-
69
- export {
70
- choiceSchema
71
- };
@@ -1,19 +0,0 @@
1
- import {
2
- parseSpell
3
- } from "./chunk-7Q2VPKCD.js";
4
-
5
- // src/spell/spell.codec.ts
6
- import yaml from "js-yaml";
7
- var spellCodec = {
8
- parse(doc) {
9
- return parseSpell(doc.body);
10
- },
11
- serialize(spell) {
12
- const { material: _material, ...doc } = spell;
13
- return yaml.dump(doc, { lineWidth: -1, sortKeys: false });
14
- }
15
- };
16
-
17
- export {
18
- spellCodec
19
- };
@@ -1,110 +0,0 @@
1
- import {
2
- ABILITY_KEYS,
3
- CR_PROFICIENCY,
4
- CR_XP,
5
- DAMAGE_TYPES,
6
- SIZE_HIT_DICE
7
- } from "./chunk-WELIKLZF.js";
8
-
9
- // src/dnd/math.ts
10
- function abilityModifier(score) {
11
- return Math.floor((score - 10) / 2);
12
- }
13
- function formatModifier(mod) {
14
- return mod >= 0 ? `+${mod}` : `${mod}`;
15
- }
16
- function proficiencyBonusFromCR(cr) {
17
- var _a;
18
- return (_a = CR_PROFICIENCY[cr]) != null ? _a : 2;
19
- }
20
- function proficiencyFromLevel(level) {
21
- if (level < 5) return 2;
22
- if (level < 9) return 3;
23
- if (level < 13) return 4;
24
- if (level < 17) return 5;
25
- return 6;
26
- }
27
- function crToXP(cr) {
28
- var _a;
29
- return (_a = CR_XP[cr]) != null ? _a : 0;
30
- }
31
- function hitDiceSizeFromCreatureSize(size) {
32
- var _a;
33
- return (_a = SIZE_HIT_DICE[size.toLowerCase()]) != null ? _a : 8;
34
- }
35
- function hpFromHitDice(hitDiceCount, hitDiceSize, conMod) {
36
- const avg = Math.floor(hitDiceCount * (hitDiceSize + 1) / 2 + hitDiceCount * conMod);
37
- return Math.max(1, avg);
38
- }
39
- function parseHitDiceFormula(formula) {
40
- const match = formula.match(/^(\d+)d(\d+)/i);
41
- if (!match) return null;
42
- return { count: parseInt(match[1], 10), size: parseInt(match[2], 10) };
43
- }
44
- function savingThrow(abilityScore, isProficient, profBonus) {
45
- return abilityModifier(abilityScore) + (isProficient ? profBonus : 0);
46
- }
47
- function skillBonus(abilityScore, proficiency, profBonus) {
48
- const mod = abilityModifier(abilityScore);
49
- if (proficiency === "expertise") return mod + profBonus * 2;
50
- if (proficiency === "proficient") return mod + profBonus;
51
- return mod;
52
- }
53
- function passive(abilityScore, proficiency, profBonus) {
54
- return 10 + skillBonus(abilityScore, proficiency, profBonus);
55
- }
56
- function passivePerception(wisScore, perceptionProf, profBonus) {
57
- return passive(wisScore, perceptionProf, profBonus);
58
- }
59
- function attackBonus(abilityScore, profBonus) {
60
- return abilityModifier(abilityScore) + profBonus;
61
- }
62
- function saveDC(abilityScore, profBonus) {
63
- return 8 + profBonus + abilityModifier(abilityScore);
64
- }
65
- function abilityNameToKey(name) {
66
- const lower = name.toLowerCase();
67
- if (ABILITY_KEYS.includes(lower)) {
68
- return lower;
69
- }
70
- return null;
71
- }
72
- var CANONICAL_DAMAGE_TYPES = new Set(DAMAGE_TYPES.map((t) => t.toLowerCase()));
73
- function isCanonicalDamageType(type) {
74
- return CANONICAL_DAMAGE_TYPES.has(type.trim().toLowerCase());
75
- }
76
- var CHOSEN_DAMAGE_TYPE = "chosen";
77
- var CHOSEN_DAMAGE_TYPE_NOTE = "damage type of your choice";
78
- function isChosenDamageType(type) {
79
- return type !== void 0 && type.trim().toLowerCase() === CHOSEN_DAMAGE_TYPE;
80
- }
81
- function isRenderableDamageText(text) {
82
- var _a;
83
- const m = /^(?:\d*d\d+(?:\s*[+-]\s*\d+)?|[+-]?\d+)(?:\s+(.*))?$/i.exec(text.trim());
84
- if (!m) return false;
85
- const type = ((_a = m[1]) != null ? _a : "").trim();
86
- return type === "" || isCanonicalDamageType(type);
87
- }
88
-
89
- export {
90
- abilityModifier,
91
- formatModifier,
92
- proficiencyBonusFromCR,
93
- proficiencyFromLevel,
94
- crToXP,
95
- hitDiceSizeFromCreatureSize,
96
- hpFromHitDice,
97
- parseHitDiceFormula,
98
- savingThrow,
99
- skillBonus,
100
- passive,
101
- passivePerception,
102
- attackBonus,
103
- saveDC,
104
- abilityNameToKey,
105
- isCanonicalDamageType,
106
- CHOSEN_DAMAGE_TYPE,
107
- CHOSEN_DAMAGE_TYPE_NOTE,
108
- isChosenDamageType,
109
- isRenderableDamageText
110
- };
@@ -1,63 +0,0 @@
1
- // src/monster/monster.ai-schema.ts
2
- import { z } from "zod";
3
- var abilitiesSchema = z.object({
4
- str: z.number().min(1).max(30),
5
- dex: z.number().min(1).max(30),
6
- con: z.number().min(1).max(30),
7
- int: z.number().min(1).max(30),
8
- wis: z.number().min(1).max(30),
9
- cha: z.number().min(1).max(30)
10
- });
11
- var acSchema = z.object({
12
- ac: z.number(),
13
- from: z.array(z.string()).optional(),
14
- condition: z.string().optional()
15
- });
16
- var hpSchema = z.object({
17
- average: z.number(),
18
- formula: z.string()
19
- });
20
- var speedSchema = z.object({
21
- walk: z.number().optional(),
22
- fly: z.number().optional(),
23
- swim: z.number().optional(),
24
- climb: z.number().optional(),
25
- burrow: z.number().optional()
26
- });
27
- var featureSchema = z.object({
28
- name: z.string(),
29
- entries: z.array(z.string().describe(
30
- "Inline tag forms: `atk:ABILITY` for non-proficient attacks (ability mod alone), `atk:ABILITY+PB` for proficient attacks (ability mod + proficiency), `atk:+N` for literal attack bonuses, `dmg:DICE+ABILITY` for damage rolls (PB never added to damage), `dc:ABILITY` for save DCs (proficiency always included implicitly)."
31
- ))
32
- });
33
- var monsterInputSchema = z.object({
34
- name: z.string().describe("Monster name"),
35
- size: z.enum(["Tiny", "Small", "Medium", "Large", "Huge", "Gargantuan"]),
36
- type: z.string().describe("Creature type (e.g., aberration, beast, dragon)"),
37
- subtype: z.string().optional(),
38
- alignment: z.string(),
39
- cr: z.string().describe('Challenge rating (e.g., "0", "1/8", "1/4", "1/2", "1" through "30")'),
40
- abilities: abilitiesSchema,
41
- ac: z.array(acSchema),
42
- hp: hpSchema,
43
- speed: speedSchema,
44
- saves: z.record(z.string(), z.number()).optional(),
45
- skills: z.record(z.string(), z.number()).optional(),
46
- damage_vulnerabilities: z.array(z.string()).optional(),
47
- damage_resistances: z.array(z.string()).optional(),
48
- damage_immunities: z.array(z.string()).optional(),
49
- condition_immunities: z.array(z.string()).optional(),
50
- senses: z.array(z.string()).optional(),
51
- passive_perception: z.number().optional(),
52
- languages: z.array(z.string()).optional(),
53
- traits: z.array(featureSchema).optional(),
54
- actions: z.array(featureSchema).optional(),
55
- reactions: z.array(featureSchema).optional(),
56
- legendary_actions: z.array(featureSchema).optional(),
57
- legendary_action_uses: z.number().optional(),
58
- legendary_resistance: z.number().optional()
59
- });
60
-
61
- export {
62
- monsterInputSchema
63
- };
@@ -1,6 +0,0 @@
1
- // src/race/race.structural.ts
2
- var RACE_STRUCTURAL_PSEUDO = /* @__PURE__ */ new Set(["size", "speed", "darkvision"]);
3
-
4
- export {
5
- RACE_STRUCTURAL_PSEUDO
6
- };
@@ -1,101 +0,0 @@
1
- import {
2
- ALL_TOOLS,
3
- ARTISANS_TOOLS,
4
- GAMING_SETS,
5
- MUSICAL_INSTRUMENTS
6
- } from "./chunk-KU3YLF6D.js";
7
- import {
8
- toProfSlug
9
- } from "./chunk-5JXFJ5AU.js";
10
-
11
- // src/pc/pc.tool-picks.ts
12
- var TOOL_CATEGORIES = {
13
- "musical-instrument": { pool: MUSICAL_INSTRUMENTS, itemType: "instrument", label: "a musical instrument" },
14
- "artisan's-tools": { pool: ARTISANS_TOOLS, itemType: "artisan's tools", label: "artisan's tools" },
15
- "gaming-set": { pool: GAMING_SETS, itemType: "gaming set", label: "a gaming set" }
16
- };
17
- function categoryWords(token) {
18
- return token.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase().replace(/['’ʼ]/g, "").split(/[\s_-]+/).filter(Boolean).map((w) => w.length > 3 && w.endsWith("s") && !w.endsWith("ss") ? w.slice(0, -1) : w);
19
- }
20
- var CATEGORY_BY_WORDS = /* @__PURE__ */ new Map([
21
- ["musical instrument", "musical-instrument"],
22
- ["artisan tool", "artisan's-tools"],
23
- ["gaming set", "gaming-set"]
24
- ]);
25
- function toolCategoriesOf(token) {
26
- const parts = [[]];
27
- for (const w of categoryWords(token)) {
28
- if (w === "or") parts.push([]);
29
- else parts[parts.length - 1].push(w);
30
- }
31
- const out = [];
32
- for (const p of parts) {
33
- const c = CATEGORY_BY_WORDS.get(p.filter((w) => w !== "any" && w !== "one").join(" "));
34
- if (!c) return void 0;
35
- if (!out.includes(c)) out.push(c);
36
- }
37
- return out;
38
- }
39
- function expandToolPool(from) {
40
- const out = [];
41
- const seen = /* @__PURE__ */ new Set();
42
- const add = (v) => {
43
- const k = toProfSlug(v);
44
- if (seen.has(k)) return;
45
- seen.add(k);
46
- out.push(v);
47
- };
48
- for (const v of from) {
49
- const cats = toolCategoriesOf(v);
50
- if (cats) for (const c of cats) for (const t of TOOL_CATEGORIES[c].pool) add(t);
51
- else add(v);
52
- }
53
- return out;
54
- }
55
- var EMPTY = { decisions: [], grants: [] };
56
- var poolOf = (from) => Array.isArray(from) ? from.filter((v) => typeof v === "string" && v.length > 0) : typeof from === "string" && from.length > 0 ? [from] : [];
57
- var countOf = (count) => {
58
- const n = Number(count != null ? count : 1);
59
- return Number.isFinite(n) && n > 0 ? Math.floor(n) : 1;
60
- };
61
- var KNOWN_TOOLS = new Set(ALL_TOOLS.map(toProfSlug));
62
- var namesToolsOutright = (from) => from.every((v) => !toolCategoriesOf(v) && KNOWN_TOOLS.has(toProfSlug(v)));
63
- var authorsToolPick = (choices) => Array.isArray(choices) && choices.some((c) => !!c && typeof c === "object" && c.kind === "select-proficiency" && c.domain === "tool");
64
- function toolPick(count, from, id, allowDecision) {
65
- const authored = poolOf(from);
66
- const pool = expandToolPool(authored);
67
- const n = countOf(count);
68
- if (pool.length === 0) return EMPTY;
69
- if (n >= pool.length && namesToolsOutright(authored)) return { decisions: [], grants: pool };
70
- if (!allowDecision) return EMPTY;
71
- return { decisions: [{ kind: "select-proficiency", id, count: n, domain: "tool", from: pool }], grants: [] };
72
- }
73
- function classToolPicks(entity) {
74
- var _a;
75
- const tools = (_a = entity == null ? void 0 : entity.proficiencies) == null ? void 0 : _a.tools;
76
- const choice = tools == null ? void 0 : tools.choice;
77
- if (!choice || typeof choice !== "object") return EMPTY;
78
- return toolPick(choice.count, choice.from, "tool", !authorsToolPick(entity == null ? void 0 : entity.choices));
79
- }
80
- function backgroundToolPicks(bg) {
81
- const entries = Array.isArray(bg == null ? void 0 : bg.tool_proficiencies) ? bg.tool_proficiencies : [];
82
- const allowDecision = !authorsToolPick(bg == null ? void 0 : bg.choices);
83
- const out = { decisions: [], grants: [] };
84
- for (const e of entries) {
85
- if (!e || typeof e !== "object" || e.kind !== "choice") continue;
86
- const id = out.decisions.length === 0 ? "tool" : `tool-${out.decisions.length + 1}`;
87
- const r = toolPick(e.count, e.from, id, allowDecision);
88
- out.decisions.push(...r.decisions);
89
- out.grants.push(...r.grants);
90
- }
91
- return out;
92
- }
93
-
94
- export {
95
- TOOL_CATEGORIES,
96
- categoryWords,
97
- toolCategoriesOf,
98
- expandToolPool,
99
- classToolPicks,
100
- backgroundToolPicks
101
- };
@@ -1,110 +0,0 @@
1
- import {
2
- startingEquipmentEntrySchema
3
- } from "./chunk-IN4M4X7P.js";
4
- import {
5
- choiceSchema
6
- } from "./chunk-OOL4KMG2.js";
7
- import {
8
- additionalSpellsEntrySchema,
9
- imageField
10
- } from "./chunk-UA5KS2PL.js";
11
-
12
- // src/background/background.schema.ts
13
- import { z } from "zod";
14
- var abilityEnum = z.enum(["str", "dex", "con", "int", "wis", "cha"]);
15
- var editionEnum = z.enum(["2014", "2024"]);
16
- var skillEnum = z.enum([
17
- "acrobatics",
18
- "animal-handling",
19
- "arcana",
20
- "athletics",
21
- "deception",
22
- "history",
23
- "insight",
24
- "intimidation",
25
- "investigation",
26
- "medicine",
27
- "nature",
28
- "perception",
29
- "performance",
30
- "persuasion",
31
- "religion",
32
- "sleight-of-hand",
33
- "stealth",
34
- "survival"
35
- ]);
36
- var wikilinkRegex = /^\[\[[^[\]]+\]\]$/;
37
- var toolProfSchema = z.discriminatedUnion("kind", [
38
- z.object({ kind: z.literal("fixed"), items: z.array(z.string()).nonempty() }),
39
- z.object({
40
- kind: z.literal("choice"),
41
- count: z.number().int().positive(),
42
- from: z.array(z.string()).nonempty()
43
- })
44
- ]);
45
- var langProfSchema = z.discriminatedUnion("kind", [
46
- z.object({ kind: z.literal("fixed"), languages: z.array(z.string()).nonempty() }),
47
- z.object({
48
- kind: z.literal("choice"),
49
- count: z.number().int().positive(),
50
- from: z.union([z.string(), z.array(z.string())])
51
- })
52
- ]);
53
- var suggestedCharSchema = z.object({
54
- personality_traits: z.record(z.string(), z.string()).optional(),
55
- ideals: z.record(z.string(), z.object({
56
- name: z.string().optional(),
57
- desc: z.string(),
58
- alignment: z.string().optional()
59
- })).optional(),
60
- bonds: z.record(z.string(), z.string()).optional(),
61
- flaws: z.record(z.string(), z.string()).optional()
62
- });
63
- var backgroundEntitySchema = z.object({
64
- slug: z.string().min(1),
65
- name: z.string().min(1),
66
- edition: editionEnum,
67
- source: z.string().min(1),
68
- description: z.string(),
69
- skill_proficiencies: z.array(skillEnum),
70
- tool_proficiencies: z.array(toolProfSchema),
71
- language_proficiencies: z.array(langProfSchema),
72
- equipment: z.array(startingEquipmentEntrySchema),
73
- feature: z.object({
74
- name: z.string().min(1),
75
- description: z.string().min(1)
76
- }),
77
- ability_score_increases: z.object({
78
- pool: z.array(abilityEnum).length(3)
79
- }).nullable(),
80
- origin_feat: z.string().regex(wikilinkRegex).nullable(),
81
- suggested_characteristics: suggestedCharSchema.nullable(),
82
- choices: z.array(choiceSchema).optional(),
83
- rendering_hint: z.string().optional(),
84
- // 175
85
- has_fluff_images: z.boolean().optional(),
86
- // 87
87
- tables: z.array(z.object({
88
- // 88 tables / 67 docs; key-sets EXACT (finding 6)
89
- name: z.string().min(1),
90
- dice: z.string().min(1),
91
- rows: z.array(z.object({ roll: z.string(), text: z.string() }))
92
- })).optional(),
93
- additional_spells: z.array(additionalSpellsEntrySchema).optional(),
94
- // 15
95
- prerequisites: z.array(z.object({
96
- // 4 docs; kind CLOSED AT THE EMITTER
97
- kind: z.literal("campaign"),
98
- slug: z.string().min(1)
99
- // (background-mapper.ts pushes
100
- })).optional(),
101
- // {kind:"campaign", slug} literally — finding 24)
102
- // The one-arm union STAYS (§2.6 adjudication): it is closed by CONSTRUCTION at the converter's
103
- // only push site, and a future kind turns into a visible census REFUSAL — the correct loud failure.
104
- image: imageField
105
- });
106
-
107
- export {
108
- langProfSchema,
109
- backgroundEntitySchema
110
- };
@@ -1,24 +0,0 @@
1
- // src/item/item.ai-schema.ts
2
- import { z } from "zod";
3
- var itemInputSchema = z.object({
4
- name: z.string().describe("Item name"),
5
- type: z.enum(["weapon", "armor", "potion", "ring", "rod", "scroll", "staff", "wand", "wondrous item", "shield"]),
6
- rarity: z.enum(["common", "uncommon", "rare", "very rare", "legendary", "artifact"]),
7
- entries: z.array(z.string()).optional().describe(
8
- "Item description and properties. Use inline formula tags for attack rolls, damage, and save DCs: `atk:ABILITY` for attack bonus, `damage:DICE+ABILITY` for damage (e.g. `damage:2d6`), `dc:ABILITY` for save DCs. Valid abilities: STR, DEX, CON, INT, WIS, CHA."
9
- ),
10
- weight: z.number().optional(),
11
- value: z.number().optional(),
12
- attunement: z.union([z.boolean(), z.string()]).optional(),
13
- properties: z.array(z.string()).optional(),
14
- damage: z.string().optional(),
15
- damage_type: z.string().optional(),
16
- ac: z.number().optional(),
17
- charges: z.number().optional(),
18
- recharge: z.string().optional(),
19
- curse: z.boolean().optional()
20
- });
21
-
22
- export {
23
- itemInputSchema
24
- };
@@ -1,97 +0,0 @@
1
- // src/dnd/tag-grammar.ts
2
- var TAG_TYPE_ALIASES = {
3
- atk: "atk",
4
- attack: "atk",
5
- dmg: "dmg",
6
- damage: "dmg",
7
- dc: "dc",
8
- dice: "dice"
9
- };
10
- function normalizeTagType(input) {
11
- var _a;
12
- const lower = input.toLowerCase().trim();
13
- return (_a = TAG_TYPE_ALIASES[lower]) != null ? _a : null;
14
- }
15
- var ABILITY_RE = /^(str|dex|con|int|wis|cha)$/i;
16
- var PB_RE = /^pb$/i;
17
- var DICE_RE = /^(\d+)d(\d+)$/;
18
- var LITERAL_RE = /^([+-]?\d+)$/;
19
- var SLUG_RE = /^\[\[([^[\]]+)\]\]$/;
20
- function parseTagTerms(content) {
21
- const out = {
22
- pbTerm: false,
23
- literalTerms: [],
24
- diceTerms: [],
25
- slugTerms: []
26
- };
27
- const trimmed = content.trim();
28
- if (trimmed.length === 0) return { error: "empty content" };
29
- const tokens = [];
30
- let i = 0;
31
- const advancePastTerm = (start) => {
32
- let j = start;
33
- while (j < trimmed.length && trimmed[j] !== "+" && trimmed[j] !== "-") {
34
- if (trimmed[j] === "[" && trimmed[j + 1] === "[") {
35
- const close = trimmed.indexOf("]]", j + 2);
36
- if (close === -1) return trimmed.length;
37
- j = close + 2;
38
- continue;
39
- }
40
- j++;
41
- }
42
- return j;
43
- };
44
- while (i < trimmed.length) {
45
- if (trimmed[i] === "+" || trimmed[i] === "-") {
46
- const j = advancePastTerm(i + 1);
47
- tokens.push(trimmed.slice(i, j));
48
- i = j;
49
- } else {
50
- const j = advancePastTerm(i);
51
- tokens.push(trimmed.slice(i, j));
52
- i = j;
53
- }
54
- }
55
- for (let raw of tokens) {
56
- raw = raw.trim();
57
- if (raw.length === 0) return { error: "empty term" };
58
- let signed = raw;
59
- let body = raw;
60
- if (raw[0] === "+" || raw[0] === "-") {
61
- body = raw.slice(1).trim();
62
- } else {
63
- signed = "+" + raw;
64
- }
65
- if (DICE_RE.test(body)) {
66
- const m = body.match(DICE_RE);
67
- out.diceTerms.push({ count: Number.parseInt(m[1], 10), sides: Number.parseInt(m[2], 10) });
68
- continue;
69
- }
70
- if (ABILITY_RE.test(body)) {
71
- if (out.abilityTerm) return { error: `multiple ability terms (${out.abilityTerm}, ${body.toLowerCase()})` };
72
- out.abilityTerm = body.toLowerCase();
73
- continue;
74
- }
75
- if (PB_RE.test(body)) {
76
- if (out.pbTerm) return { error: "duplicate PB term" };
77
- out.pbTerm = true;
78
- continue;
79
- }
80
- const slugMatch = body.match(SLUG_RE);
81
- if (slugMatch) {
82
- out.slugTerms.push(slugMatch[1]);
83
- continue;
84
- }
85
- if (LITERAL_RE.test(signed)) {
86
- out.literalTerms.push(Number.parseInt(signed, 10));
87
- continue;
88
- }
89
- return { error: `unrecognized term: ${raw}` };
90
- }
91
- return out;
92
- }
93
-
94
- export {
95
- normalizeTagType,
96
- parseTagTerms
97
- };