@archivist-gg/dnd5e 0.3.19 → 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 (440) 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 +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 +22 -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 -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 +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 +21 -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 +0 -24
  205. package/dist/pc/pc.additional-spells.js +1 -26
  206. package/dist/pc/pc.amount-bindings.d.ts +0 -25
  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 +0 -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 +0 -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 +22 -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 +18 -0
  228. package/dist/pc/pc.member-choices.d.ts +3 -66
  229. package/dist/pc/pc.member-choices.js +1 -39
  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 -27
  233. package/dist/pc/pc.proficiencies.d.ts +0 -40
  234. package/dist/pc/pc.proficiencies.js +1 -156
  235. package/dist/pc/pc.proficiency-grants.d.ts +0 -26
  236. package/dist/pc/pc.proficiency-normalize.d.ts +0 -35
  237. package/dist/pc/pc.proficiency-normalize.js +1 -18
  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 -1042
  242. package/dist/pc/pc.resolver.d.ts +0 -107
  243. package/dist/pc/pc.resolver.js +1 -60
  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 -231
  250. package/dist/pc/pc.schema.d.ts +0 -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 +0 -16
  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 +54 -374
  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 +21 -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 +4 -22
  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-2LULMQTF.js +0 -14
  346. package/dist/chunk-3LWMFYKS.js +0 -57
  347. package/dist/chunk-3SFGWFVQ.js +0 -19
  348. package/dist/chunk-3SIUAFDQ.js +0 -18
  349. package/dist/chunk-3TM34RSJ.js +0 -23
  350. package/dist/chunk-4J6DS3EJ.js +0 -30
  351. package/dist/chunk-4U55VNC7.js +0 -22
  352. package/dist/chunk-5GKJAUMX.js +0 -59
  353. package/dist/chunk-5JXFJ5AU.js +0 -26
  354. package/dist/chunk-64VNLMSG.js +0 -375
  355. package/dist/chunk-656QCX4U.js +0 -22
  356. package/dist/chunk-6GNXYAYP.js +0 -25
  357. package/dist/chunk-6PXTNCBP.js +0 -133
  358. package/dist/chunk-6X2NV665.js +0 -33
  359. package/dist/chunk-7Q2VPKCD.js +0 -181
  360. package/dist/chunk-7XJHI5H5.js +0 -709
  361. package/dist/chunk-A54HHCWW.js +0 -67
  362. package/dist/chunk-B2QHP6UF.js +0 -159
  363. package/dist/chunk-B3DP42OM.js +0 -55
  364. package/dist/chunk-BJGOSM76.js +0 -18
  365. package/dist/chunk-BJWSOQUC.js +0 -133
  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-DPUJDOKV.js +0 -365
  370. package/dist/chunk-EJD47JHL.js +0 -1838
  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-FC4IGH5Y.js +0 -18
  375. package/dist/chunk-FJYBLXV7.js +0 -89
  376. package/dist/chunk-FMUD3LDV.js +0 -19
  377. package/dist/chunk-FMYWORTP.js +0 -93
  378. package/dist/chunk-FVXLP7P3.js +0 -18
  379. package/dist/chunk-G6MHJDVT.js +0 -41
  380. package/dist/chunk-GVWEFECG.js +0 -18
  381. package/dist/chunk-HHBD4SQ6.js +0 -24
  382. package/dist/chunk-HS6FIOLP.js +0 -52
  383. package/dist/chunk-HY2SRSVM.js +0 -23
  384. package/dist/chunk-IHE6KVC3.js +0 -13
  385. package/dist/chunk-IN4M4X7P.js +0 -34
  386. package/dist/chunk-IUAAXXNO.js +0 -58
  387. package/dist/chunk-JXWNXIIZ.js +0 -219
  388. package/dist/chunk-K5NJBTE2.js +0 -18
  389. package/dist/chunk-KR6JF3BF.js +0 -14
  390. package/dist/chunk-KSTV7J2U.js +0 -112
  391. package/dist/chunk-KU3YLF6D.js +0 -106
  392. package/dist/chunk-LBEXLN6I.js +0 -91
  393. package/dist/chunk-LHZXYFBU.js +0 -94
  394. package/dist/chunk-LICYHPI3.js +0 -237
  395. package/dist/chunk-LNT64X7C.js +0 -81
  396. package/dist/chunk-LSLSG67V.js +0 -31
  397. package/dist/chunk-LVQLWRCU.js +0 -15
  398. package/dist/chunk-MYY2C5MB.js +0 -233
  399. package/dist/chunk-NKZMQV2C.js +0 -19
  400. package/dist/chunk-NTU2DXNG.js +0 -355
  401. package/dist/chunk-NXUY5XQN.js +0 -1062
  402. package/dist/chunk-NZO7M5GV.js +0 -18
  403. package/dist/chunk-OOL4KMG2.js +0 -71
  404. package/dist/chunk-OOSRUJBI.js +0 -19
  405. package/dist/chunk-PDJSUH24.js +0 -110
  406. package/dist/chunk-PTXBIDG7.js +0 -63
  407. package/dist/chunk-PVCEA4HZ.js +0 -6
  408. package/dist/chunk-QA3YCOML.js +0 -101
  409. package/dist/chunk-QFWQKS3M.js +0 -110
  410. package/dist/chunk-QS5L5YTJ.js +0 -24
  411. package/dist/chunk-QYZV2MQA.js +0 -97
  412. package/dist/chunk-RD2MID3M.js +0 -292
  413. package/dist/chunk-S3YUXDSC.js +0 -278
  414. package/dist/chunk-S7REMWW4.js +0 -21
  415. package/dist/chunk-TOM66P2P.js +0 -38
  416. package/dist/chunk-TRBGC4ZG.js +0 -112
  417. package/dist/chunk-UA5KS2PL.js +0 -26
  418. package/dist/chunk-UJCK5IW4.js +0 -187
  419. package/dist/chunk-UNYR5GLI.js +0 -23
  420. package/dist/chunk-UZXG6QSY.js +0 -58
  421. package/dist/chunk-VN5DLURA.js +0 -158
  422. package/dist/chunk-VP5TIXDK.js +0 -178
  423. package/dist/chunk-VPYBK2MG.js +0 -18
  424. package/dist/chunk-VTTA2ALZ.js +0 -16
  425. package/dist/chunk-W6GC6OKK.js +0 -16
  426. package/dist/chunk-WELIKLZF.js +0 -256
  427. package/dist/chunk-WOHX7YTH.js +0 -165
  428. package/dist/chunk-WSVMLNTO.js +0 -31
  429. package/dist/chunk-WYGD2UGN.js +0 -14
  430. package/dist/chunk-XCFC7LGF.js +0 -122
  431. package/dist/chunk-XJ2F2WO6.js +0 -8
  432. package/dist/chunk-XTEFPUSN.js +0 -23
  433. package/dist/chunk-YBLDE5CG.js +0 -42
  434. package/dist/chunk-YDGMBMYI.js +0 -25
  435. package/dist/chunk-YHYTW5QA.js +0 -20
  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-ZOWKWMD2.js +0 -18
  440. package/dist/chunk-ZUQW5VBZ.js +0 -89
@@ -1,6 +1 @@
1
- import {
2
- parseInlineTag
3
- } from "./chunk-3TM34RSJ.js";
4
- export {
5
- parseInlineTag
6
- };
1
+ import{parseInlineTag}from"./chunk-BREHZNTL.js";export{parseInlineTag};
@@ -9,74 +9,15 @@ export interface ItemAction {
9
9
  amount: string;
10
10
  reset: "dawn" | "short" | "long" | "special";
11
11
  };
12
- /** Consumed on use (T17 rider C fold, user ruling 2026-09-24): using one spends the entry's QUANTITY, never a
13
- * charge, so the item carries no `max_charges` or `recovery` and the sheet shows its quantity only. Read through
14
- * `isConsumedOnUse` (`pc/pc.entry-overrides.ts`), which also answers by the entity's own type. */
15
12
  consumed?: true;
16
13
  }
17
- /** What `resolveItemAction` hands the Actions items row: its cost and range, nothing else. The curated charges and
18
- * recovery are NOT on it: the charge pair is `effectiveItemCharges` and the rule `effectiveItemRecovery`
19
- * (`pc/pc.entry-overrides.ts`), so no reader can take the curated max over a stored pair. */
20
14
  export type ResolvedItemAction = Pick<ItemAction, "cost" | "range">;
21
- /**
22
- * Curated map of canonical SRD chargeable / activated items.
23
- * Slugs match the SRD compendium slug format. Augmenter reads this map
24
- * and stamps `actions: ItemAction` onto the augmented entity bundle.
25
- */
26
15
  export declare const ITEM_ACTIONS: Record<string, ItemAction>;
27
- /**
28
- * Look up an ItemAction by slug, accepting either a bare name slug
29
- * (`wand-of-fireballs`) or a compendium-prefixed slug
30
- * (`srd-5e_wand-of-fireballs`, `srd-2024_wand-of-fireballs`,
31
- * `homebrew_wand-of-fireballs`).
32
- *
33
- * Type-namespaced slugs follow the shape `<prefix>_<entity_type>_<name-slug>`
34
- * (all kebab-case; slugify never emits `_`), so a slug splits on `_` into
35
- * exactly 3 parts and the bare name is `parts.slice(2).join("_")`. This is
36
- * arity-robust: it also recovers the bare name from a legacy 2-part
37
- * `<prefix>_<name>` slug and an already-bare name. `ITEM_ACTIONS` is keyed by
38
- * bare name.
39
- *
40
- * Returns `undefined` if no map entry matches. Does not crash on slugs
41
- * without an underscore — those are treated as already-bare.
42
- */
43
16
  export declare function findItemAction(slug: string): ItemAction | undefined;
44
- /**
45
- * Resolve the ItemAction for an equipped entry.
46
- * Priority: per-instance override > the entry view's `action` > curated map >
47
- * the type default (`itemType==="potion"`: bonus-action; `itemType==="scroll"`:
48
- * its spell's cost, else action) > null.
49
- *
50
- * `itemType` is the entity's `data.type` (from the registry, statically
51
- * `unknown`); per the 2024 SRD, drinking/administering a potion is a Bonus
52
- * Action, so an uncurated `type==="potion"` item still surfaces (curated oils
53
- * mis-typed `"potion"` are pinned to "action" so this default cannot mislabel
54
- * them). A spell scroll's use is its cast, so an uncurated `type==="scroll"` item
55
- * costs what its spell's casting time costs: `opts.spellCost`, which the caller
56
- * that holds the registry resolves (`scrollSpellCost`, pc/pc.entry-overrides.ts),
57
- * else Action (no spell set or resolved, or a minute or hour cast). It keys on the
58
- * type, never on a `scroll_level` marker alone, which every Enspelled weapon and
59
- * armour also carries. Returns null when no source supplies a cost (an uncurated
60
- * item that is neither a potion nor a scroll, with no override).
61
- *
62
- * Accepts both bare and compendium-prefixed slugs (see `findItemAction`).
63
- *
64
- * `opts.weaponLike`: the entry is a weapon or an item whose `base_item` is a
65
- * weapon, so its `overrides.action` belongs to its ATTACK row (pc.equipment.ts)
66
- * and is ignored here, as is its `overrides.range`, which no row reads (the
67
- * attack row's range is the weapon's own, and `customizableOverrideKeys` offers
68
- * no Range for it); only a curated activation (e.g. Sun Blade's) still
69
- * resolves, and an uncurated weapon-like item with only an override resolves
70
- * null. Omitted, the override wins as before.
71
- *
72
- * `opts.view` (ART-a, spec §5.4, Gate 1 I4): the entry's view. Its RULE
73
- * entity's `action` (an infusion overlay's, e.g. Mind Sharpener's reaction)
74
- * comes before the curated map, which is keyed by the base's slug and knows
75
- * nothing of the infusion.
76
- *
77
- * `opts.spellCost`: a spell scroll's spell's cost (see above); read only for an
78
- * item typed `scroll`.
79
- */
17
+ export declare function isReadOnceItem(slug: string): boolean;
18
+ export declare function isActivatedSpeedItem(slug: string, item?: {
19
+ speed_on_use?: boolean;
20
+ } | null): boolean;
80
21
  export declare function resolveItemAction(slug: string, entry: EquipmentEntry, itemType?: unknown, opts?: {
81
22
  weaponLike?: boolean;
82
23
  view?: EntryView | null;
@@ -1,10 +1 @@
1
- import {
2
- ITEM_ACTIONS,
3
- findItemAction,
4
- resolveItemAction
5
- } from "../chunk-ZUQW5VBZ.js";
6
- export {
7
- ITEM_ACTIONS,
8
- findItemAction,
9
- resolveItemAction
10
- };
1
+ import{ITEM_ACTIONS,findItemAction,isActivatedSpeedItem,isReadOnceItem,resolveItemAction}from"../chunk-DVUXUIPV.js";export{ITEM_ACTIONS,findItemAction,isActivatedSpeedItem,isReadOnceItem,resolveItemAction};
@@ -1,6 +1 @@
1
- import {
2
- itemInputSchema
3
- } from "../chunk-QS5L5YTJ.js";
4
- export {
5
- itemInputSchema
6
- };
1
+ import{itemInputSchema}from"../chunk-SU4MEZ5P.js";export{itemInputSchema};
@@ -1,18 +1,4 @@
1
1
  import type { ArmorEntity } from "../armor/armor.types.js";
2
2
  import type { WeaponEntity } from "../weapon/weapon.types.js";
3
3
  import type { ItemEntity } from "../item/item.types.js";
4
- /**
5
- * `entity.attunement` can be:
6
- * - undefined / false / "" → not required
7
- * - true → required, no restriction
8
- * - "by a wizard" → required, with text restriction
9
- * - { required: true, restriction? } → required (structured)
10
- * - { required: false } → not required (structured)
11
- *
12
- * This predicate normalizes all five shapes into a single boolean.
13
- *
14
- * Accepts any equipped entity. Only items model `attunement`; armor and
15
- * weapons never require attunement in this domain, so they short-circuit to
16
- * `false` via the property-presence narrow below.
17
- */
18
4
  export declare function requiresAttunement(entity: ArmorEntity | WeaponEntity | ItemEntity | null): boolean;
@@ -1,6 +1 @@
1
- import {
2
- requiresAttunement
3
- } from "../chunk-IHE6KVC3.js";
4
- export {
5
- requiresAttunement
6
- };
1
+ import{requiresAttunement}from"../chunk-YGH7S5ZF.js";export{requiresAttunement};
@@ -1,10 +1 @@
1
- import {
2
- readNumericBonus
3
- } from "../chunk-HHBD4SQ6.js";
4
- import "../chunk-A54HHCWW.js";
5
- import "../chunk-LHZXYFBU.js";
6
- import "../chunk-CM5CWO4K.js";
7
- import "../chunk-ZCTUYGNV.js";
8
- export {
9
- readNumericBonus
10
- };
1
+ import{readNumericBonus}from"../chunk-NEMX7QGG.js";import"../chunk-56JK6VCL.js";import"../chunk-4IAMSRHD.js";import"../chunk-PZ4L2EEG.js";import"../chunk-63YJPWTM.js";export{readNumericBonus};
@@ -1,9 +1 @@
1
- import {
2
- itemCodec
3
- } from "../chunk-VPYBK2MG.js";
4
- import "../chunk-EYX4JMAU.js";
5
- import "../chunk-S3YUXDSC.js";
6
- import "../chunk-UA5KS2PL.js";
7
- export {
8
- itemCodec
9
- };
1
+ import{itemCodec}from"../chunk-XQMKH4R4.js";import"../chunk-7LPKI27J.js";import"../chunk-RL4VY2AL.js";import"../chunk-I26FHSI6.js";export{itemCodec};
@@ -1,10 +1,3 @@
1
1
  import type { Condition, ConditionContext, ConditionOutcome } from "./item.conditions.types.js";
2
2
  export declare function evaluateCondition(cond: Condition, ctx: ConditionContext): ConditionOutcome;
3
- /**
4
- * AND-combine a list of conditions.
5
- * - Empty list -> "true" (always-applies; matches flat-number semantics).
6
- * - Any "false" -> "false" (engine certainty short-circuits informational).
7
- * - Else any "informational" -> "informational".
8
- * - Else "true".
9
- */
10
3
  export declare function evaluateConditions(conds: Condition[], ctx: ConditionContext): ConditionOutcome;
@@ -1,11 +1 @@
1
- import {
2
- evaluateCondition,
3
- evaluateConditions
4
- } from "../chunk-A54HHCWW.js";
5
- import "../chunk-LHZXYFBU.js";
6
- import "../chunk-CM5CWO4K.js";
7
- import "../chunk-ZCTUYGNV.js";
8
- export {
9
- evaluateCondition,
10
- evaluateConditions
11
- };
1
+ import{evaluateCondition,evaluateConditions}from"../chunk-56JK6VCL.js";import"../chunk-4IAMSRHD.js";import"../chunk-PZ4L2EEG.js";import"../chunk-63YJPWTM.js";export{evaluateCondition,evaluateConditions};
@@ -16,8 +16,6 @@ export interface ConditionContext {
16
16
  classList: ClassEntry[];
17
17
  race: string | null;
18
18
  subclasses: string[];
19
- /** H234 H2: lets `wielding_two_handed` read a MAGIC main-hand weapon through its `base_item`. Optional: every test literal
20
- * stays valid, and without it only the entity's own properties are read. */
21
19
  registry?: EntityRegistry;
22
20
  }
23
21
  export type BonusReadResult = {
@@ -1,29 +1 @@
1
- // src/item/item.cost.ts
2
- var GP_DECIMAL = /^\d+(\.\d+)?$/;
3
- function costToCopper(cost) {
4
- let gp;
5
- if (typeof cost === "number") gp = cost;
6
- else if (typeof cost === "string" && GP_DECIMAL.test(cost)) gp = Number.parseFloat(cost);
7
- else return 0;
8
- if (!Number.isFinite(gp) || gp < 0) return 0;
9
- return Math.round(gp * 100);
10
- }
11
- var group = (n) => String(n).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
12
- function formatCopper(cp) {
13
- const c = Math.max(0, Math.round(cp));
14
- if (c === 0) return "0 gp";
15
- const gp = Math.floor(c / 100);
16
- const rest = c % 100;
17
- const restText = rest === 0 ? "" : rest % 10 === 0 ? `${rest / 10} sp` : `${rest} cp`;
18
- if (gp === 0) return restText;
19
- return rest === 0 ? `${group(gp)} gp` : `${group(gp)} gp ${restText}`;
20
- }
21
- function formatItemCost(cost) {
22
- const cp = costToCopper(cost);
23
- return cp > 0 ? formatCopper(cp) : cost;
24
- }
25
- export {
26
- costToCopper,
27
- formatCopper,
28
- formatItemCost
29
- };
1
+ var GP_DECIMAL=/^\d+(\.\d+)?$/;function costToCopper(cost){let gp;if(typeof cost==="number")gp=cost;else if(typeof cost==="string"&&GP_DECIMAL.test(cost))gp=Number.parseFloat(cost);else return 0;if(!Number.isFinite(gp)||gp<0)return 0;return Math.round(gp*100)}var group=n=>String(n).replace(/\B(?=(\d{3})+(?!\d))/g,",");function formatCopper(cp){const c=Math.max(0,Math.round(cp));if(c===0)return"0 gp";const gp=Math.floor(c/100);const rest=c%100;const restText=rest===0?"":rest%10===0?`${rest/10} sp`:`${rest} cp`;if(gp===0)return restText;return rest===0?`${group(gp)} gp`:`${group(gp)} gp ${restText}`}function formatItemCost(cost){const cp=costToCopper(cost);return cp>0?formatCopper(cp):cost}export{costToCopper,formatCopper,formatItemCost};
@@ -1,9 +1 @@
1
- import {
2
- enrichItem
3
- } from "../chunk-6GNXYAYP.js";
4
- import "../chunk-DEEHHLAP.js";
5
- import "../chunk-PDJSUH24.js";
6
- import "../chunk-WELIKLZF.js";
7
- export {
8
- enrichItem
9
- };
1
+ import{enrichItem}from"../chunk-ZI3FEUX3.js";import"../chunk-MGGKZGLG.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{enrichItem};
@@ -1,15 +1,7 @@
1
- /**
2
- * The icon key of an item, weapon or armor entity (inventory arc I3). The key is DATA: an entity's own `icon`
3
- * wins; otherwise these rules read the entity's own fields (the tattoo flag, the weapon's base, the armor's
4
- * category, the item's type and focus kind, the approved coverage words of its name). A renderer maps a key to
5
- * its drawing and each GENERIC_ICON key to a neutral glyph of its own. Every game word lives here, never in the
6
- * renderer (memo rendering-policy-from-schema-not-renderer).
7
- */
8
1
  export declare const GENERIC_ICON: {
9
2
  readonly weapon: "generic:weapon";
10
3
  readonly armor: "generic:armor";
11
4
  readonly item: "generic:item";
12
5
  };
13
- /** Every non-generic key the rules can return; the renderer's icon set must hold each one. */
14
6
  export declare const ITEM_ICON_KEYS: readonly string[];
15
7
  export declare function itemIconKey(entity: unknown, entityType: string | null): string;
@@ -1,211 +1 @@
1
- // src/item/item.icon.ts
2
- var GENERIC_ICON = { weapon: "generic:weapon", armor: "generic:armor", item: "generic:item" };
3
- var WEAPON_KEYS = /* @__PURE__ */ new Set([
4
- "club",
5
- "dagger",
6
- "greatclub",
7
- "handaxe",
8
- "javelin",
9
- "light-hammer",
10
- "mace",
11
- "quarterstaff",
12
- "sickle",
13
- "spear",
14
- "light-crossbow",
15
- "dart",
16
- "shortbow",
17
- "sling",
18
- "battleaxe",
19
- "flail",
20
- "glaive",
21
- "greataxe",
22
- "greatsword",
23
- "halberd",
24
- "lance",
25
- "longsword",
26
- "maul",
27
- "morningstar",
28
- "pike",
29
- "rapier",
30
- "scimitar",
31
- "shortsword",
32
- "trident",
33
- "war-pick",
34
- "warhammer",
35
- "whip",
36
- "blowgun",
37
- "hand-crossbow",
38
- "heavy-crossbow",
39
- "longbow",
40
- "net"
41
- ]);
42
- var WEAPON_ALIAS = {
43
- "crossbow-hand": "hand-crossbow",
44
- "crossbow-light": "light-crossbow",
45
- "crossbow-heavy": "heavy-crossbow"
46
- };
47
- var ARMOR_CATEGORY_KEY = {
48
- light: "light-armor",
49
- medium: "medium-armor",
50
- heavy: "heavy-armor",
51
- shield: "shield"
52
- };
53
- var ARMOR_BASE_CATEGORY = {
54
- padded: "light",
55
- leather: "light",
56
- "studded-leather": "light",
57
- hide: "medium",
58
- "chain-shirt": "medium",
59
- "scale-mail": "medium",
60
- breastplate: "medium",
61
- "half-plate": "medium",
62
- "ring-mail": "heavy",
63
- "chain-mail": "heavy",
64
- splint: "heavy",
65
- plate: "heavy",
66
- shield: "shield"
67
- };
68
- var TYPE_DIRECT = {
69
- ring: "ring",
70
- potion: "potion",
71
- scroll: "scroll",
72
- wand: "wand",
73
- staff: "staff",
74
- rod: "rod",
75
- shield: "shield"
76
- };
77
- var NAME_WORDS = [
78
- ["backpack", ["backpack", "haversack"]],
79
- ["pouch", ["pouch", "coin purse"]],
80
- ["quiver", ["quiver", "bolt case"]],
81
- ["chest", ["chest"]],
82
- ["barrel", ["barrel", "basket", "bucket"]],
83
- ["pot", ["pot", "jug"]],
84
- ["sack", ["sack", "bag"]],
85
- ["amulet", ["amulet", "necklace", "periapt"]],
86
- ["cloak", ["cloak", "robe", "robes"]],
87
- ["boots", ["boots", "slippers"]],
88
- ["gloves", ["gloves", "gauntlets", "bracers"]],
89
- ["belt", ["belt", "girdle"]],
90
- ["circlet", ["circlet", "headband", "diadem"]],
91
- ["crown", ["crown"]],
92
- ["helmet", ["helm", "helmet"]],
93
- ["rations", ["rations"]],
94
- ["waterskin", ["waterskin"]],
95
- ["instrument", ["instrument", "instruments"]],
96
- ["dice", ["dice", "dice set", "gaming set"]],
97
- ["gem", ["gem", "gems"]],
98
- ["hourglass", ["hourglass"]],
99
- ["flask", ["flask", "vial", "bottle", "oil", "holy water", "acid"]],
100
- ["torch", ["torch"]],
101
- ["lantern", ["lantern", "lamp"]],
102
- ["candle", ["candle", "tinderbox"]],
103
- ["rope", ["rope", "chain"]],
104
- ["crowbar", ["crowbar"]],
105
- ["manacles", ["manacles"]],
106
- ["mirror", ["mirror"]],
107
- ["spyglass", ["spyglass"]],
108
- ["compass", ["compass"]],
109
- ["map", ["map"]],
110
- ["spellbook", ["spellbook"]],
111
- ["book", ["book", "journal"]],
112
- ["quill", ["ink", "ink pen", "paper"]],
113
- ["bedroll", ["bedroll", "blanket"]],
114
- ["tent", ["tent"]],
115
- ["holy-symbol", ["holy symbol", "reliquary"]],
116
- ["healer-kit", ["healer's kit"]],
117
- ["herbs", ["herbalism kit", "herbs"]],
118
- ["key", ["thieves' tools", "key", "lock"]],
119
- ["tools", ["artisan's tools", "hammer", "smith's tools"]],
120
- ["cards", ["playing cards", "playing card set"]],
121
- ["coins", ["coin", "coins", "trade bar", "trade bars"]],
122
- ["stone", ["stone", "stones"]],
123
- ["wand", ["wand"]],
124
- ["rod", ["rod"]],
125
- ["staff", ["staff"]],
126
- ["ring", ["ring"]],
127
- ["net", ["net"]]
128
- ];
129
- var FOCUS_KEY = { holy: "holy-symbol", arcane: "wondrous", druid: "herbs" };
130
- var TYPE_FALLBACK = {
131
- instrument: "instrument",
132
- "artisan's tools": "tools",
133
- tool: "tools",
134
- tools: "tools",
135
- "gaming set": "dice",
136
- ammunition: "quiver",
137
- food: "rations",
138
- wondrous: "wondrous"
139
- };
140
- var AMMUNITION_NAME = /\b(?:ammunition|arrows?|bolts?|bullets?|needles?)\b/i;
141
- var TATTOO_NAME = /\btattoo\b/i;
142
- var escapeRe = (w) => w.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
143
- var NAME_RULES = NAME_WORDS.map(
144
- ([key, words]) => [key, new RegExp(`\\b(?:${words.map(escapeRe).join("|")})\\b`, "i")]
145
- );
146
- var ITEM_ICON_KEYS = [.../* @__PURE__ */ new Set([
147
- "tattoo",
148
- "quiver",
149
- ...WEAPON_KEYS,
150
- ...Object.values(ARMOR_CATEGORY_KEY),
151
- ...Object.values(TYPE_DIRECT),
152
- ...NAME_WORDS.map(([k]) => k),
153
- ...Object.values(FOCUS_KEY),
154
- ...Object.values(TYPE_FALLBACK)
155
- ])].sort();
156
- var text = (v) => typeof v === "string" ? v : "";
157
- function canon(raw) {
158
- var _a;
159
- let s = raw.toLowerCase().replace(/\s*\([^)]*\)/g, " ").trim();
160
- const comma = /^([^,]+),\s*(.+)$/.exec(s);
161
- if (comma) s = `${comma[2]} ${comma[1]}`;
162
- s = s.replace(/[\s-]+armou?r$/, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
163
- return (_a = WEAPON_ALIAS[s]) != null ? _a : s;
164
- }
165
- var weaponKey = (raw) => {
166
- const k = canon(raw);
167
- return WEAPON_KEYS.has(k) ? k : void 0;
168
- };
169
- var armorKey = (raw) => {
170
- const cat = ARMOR_BASE_CATEGORY[canon(raw)];
171
- return cat ? ARMOR_CATEGORY_KEY[cat] : void 0;
172
- };
173
- function baseName(link) {
174
- const raw = text(link).trim();
175
- if (!raw) return "";
176
- const m = /^\[\[([^\]|]+)(?:\|[^\]]*)?\]\]$/.exec(raw);
177
- const inner = m ? m[1] : raw;
178
- return inner.includes("/") ? inner.slice(inner.lastIndexOf("/") + 1) : inner.slice(inner.lastIndexOf("_") + 1);
179
- }
180
- function itemIconKey(entity, entityType) {
181
- var _a, _b, _c, _d, _e, _f, _g, _h;
182
- const e = entity !== null && typeof entity === "object" ? entity : {};
183
- const own = text(e.icon).trim();
184
- if (own) return own;
185
- const name = text(e.name);
186
- if (e.tattoo === true || TATTOO_NAME.test(name)) return "tattoo";
187
- if (entityType === "weapon") return (_b = (_a = weaponKey(baseName(e.slug))) != null ? _a : weaponKey(name)) != null ? _b : GENERIC_ICON.weapon;
188
- if (entityType === "armor") {
189
- const cat = text(e.category).toLowerCase().replace(/\s*armou?r\s*$/, "").trim();
190
- return (_d = (_c = ARMOR_CATEGORY_KEY[cat]) != null ? _c : armorKey(name)) != null ? _d : GENERIC_ICON.armor;
191
- }
192
- const rawType = text(e.type).toLowerCase().trim();
193
- const paren = /^([^()]+?)\s*\(([^)]+)\)\s*$/.exec(rawType);
194
- const type = (paren ? paren[1] : rawType).trim().replace(/\s+item$/, "");
195
- const inner = paren ? paren[2].trim() : "";
196
- if (type === "weapon") {
197
- return (_e = weaponKey(baseName(e.base_item) || inner)) != null ? _e : AMMUNITION_NAME.test(name) ? "quiver" : GENERIC_ICON.weapon;
198
- }
199
- if (type === "armor") return (_f = armorKey(baseName(e.base_item) || inner)) != null ? _f : GENERIC_ICON.armor;
200
- const direct = TYPE_DIRECT[type];
201
- if (direct) return direct;
202
- const bare = name.replace(/\s*\([^)]*\)/g, " ").trim();
203
- for (const [key, re] of NAME_RULES) if (re.test(bare)) return key;
204
- if (type === "spellcasting focus") return (_g = FOCUS_KEY[text(e.focus).toLowerCase()]) != null ? _g : "wondrous";
205
- return (_h = TYPE_FALLBACK[type]) != null ? _h : GENERIC_ICON.item;
206
- }
207
- export {
208
- GENERIC_ICON,
209
- ITEM_ICON_KEYS,
210
- itemIconKey
211
- };
1
+ var GENERIC_ICON={weapon:"generic:weapon",armor:"generic:armor",item:"generic:item"};var WEAPON_KEYS=new Set(["club","dagger","greatclub","handaxe","javelin","light-hammer","mace","quarterstaff","sickle","spear","light-crossbow","dart","shortbow","sling","battleaxe","flail","glaive","greataxe","greatsword","halberd","lance","longsword","maul","morningstar","pike","rapier","scimitar","shortsword","trident","war-pick","warhammer","whip","blowgun","hand-crossbow","heavy-crossbow","longbow","net"]);var WEAPON_ALIAS={"crossbow-hand":"hand-crossbow","crossbow-light":"light-crossbow","crossbow-heavy":"heavy-crossbow"};var ARMOR_CATEGORY_KEY={light:"light-armor",medium:"medium-armor",heavy:"heavy-armor",shield:"shield"};var ARMOR_BASE_CATEGORY={padded:"light",leather:"light","studded-leather":"light",hide:"medium","chain-shirt":"medium","scale-mail":"medium",breastplate:"medium","half-plate":"medium","ring-mail":"heavy","chain-mail":"heavy",splint:"heavy",plate:"heavy",shield:"shield"};var TYPE_DIRECT={ring:"ring",potion:"potion",scroll:"scroll",wand:"wand",staff:"staff",rod:"rod",shield:"shield"};var NAME_WORDS=[["backpack",["backpack","haversack"]],["pouch",["pouch","coin purse"]],["quiver",["quiver","bolt case"]],["chest",["chest"]],["barrel",["barrel","basket","bucket"]],["pot",["pot","jug"]],["sack",["sack","bag"]],["amulet",["amulet","necklace","periapt"]],["cloak",["cloak","robe","robes"]],["boots",["boots","slippers"]],["gloves",["gloves","gauntlets","bracers"]],["belt",["belt","girdle"]],["circlet",["circlet","headband","diadem"]],["crown",["crown"]],["helmet",["helm","helmet"]],["rations",["rations"]],["waterskin",["waterskin"]],["instrument",["instrument","instruments"]],["dice",["dice","dice set","gaming set"]],["gem",["gem","gems"]],["hourglass",["hourglass"]],["flask",["flask","vial","bottle","oil","holy water","acid"]],["torch",["torch"]],["lantern",["lantern","lamp"]],["candle",["candle","tinderbox"]],["rope",["rope","chain"]],["crowbar",["crowbar"]],["manacles",["manacles"]],["mirror",["mirror"]],["spyglass",["spyglass"]],["compass",["compass"]],["map",["map"]],["spellbook",["spellbook"]],["book",["book","journal"]],["quill",["ink","ink pen","paper"]],["bedroll",["bedroll","blanket"]],["tent",["tent"]],["holy-symbol",["holy symbol","reliquary"]],["healer-kit",["healer's kit"]],["herbs",["herbalism kit","herbs"]],["key",["thieves' tools","key","lock"]],["tools",["artisan's tools","hammer","smith's tools"]],["cards",["playing cards","playing card set"]],["coins",["coin","coins","trade bar","trade bars"]],["stone",["stone","stones"]],["wand",["wand"]],["rod",["rod"]],["staff",["staff"]],["ring",["ring"]],["net",["net"]]];var FOCUS_KEY={holy:"holy-symbol",arcane:"wondrous",druid:"herbs"};var TYPE_FALLBACK={instrument:"instrument","artisan's tools":"tools",tool:"tools",tools:"tools","gaming set":"dice",ammunition:"quiver",food:"rations",wondrous:"wondrous"};var AMMUNITION_NAME=/\b(?:ammunition|arrows?|bolts?|bullets?|needles?)\b/i;var TATTOO_NAME=/\btattoo\b/i;var escapeRe=w=>w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var NAME_RULES=NAME_WORDS.map(([key,words])=>[key,new RegExp(`\\b(?:${words.map(escapeRe).join("|")})\\b`,"i")]);var ITEM_ICON_KEYS=[...new Set(["tattoo","quiver",...WEAPON_KEYS,...Object.values(ARMOR_CATEGORY_KEY),...Object.values(TYPE_DIRECT),...NAME_WORDS.map(([k])=>k),...Object.values(FOCUS_KEY),...Object.values(TYPE_FALLBACK)])].sort();var text=v=>typeof v==="string"?v:"";function canon(raw){var _a;let s=raw.toLowerCase().replace(/\s*\([^)]*\)/g," ").trim();const comma=/^([^,]+),\s*(.+)$/.exec(s);if(comma)s=`${comma[2]} ${comma[1]}`;s=s.replace(/[\s-]+armou?r$/,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(_a=WEAPON_ALIAS[s])!=null?_a:s}var weaponKey=raw=>{const k=canon(raw);return WEAPON_KEYS.has(k)?k:void 0};var armorKey=raw=>{const cat=ARMOR_BASE_CATEGORY[canon(raw)];return cat?ARMOR_CATEGORY_KEY[cat]:void 0};function baseName(link){const raw=text(link).trim();if(!raw)return"";const m=/^\[\[([^\]|]+)(?:\|[^\]]*)?\]\]$/.exec(raw);const inner=m?m[1]:raw;return inner.includes("/")?inner.slice(inner.lastIndexOf("/")+1):inner.slice(inner.lastIndexOf("_")+1)}function itemIconKey(entity,entityType){var _a,_b,_c,_d,_e,_f,_g,_h;const e=entity!==null&&typeof entity==="object"?entity:{};const own=text(e.icon).trim();if(own)return own;const name=text(e.name);if(e.tattoo===true||TATTOO_NAME.test(name))return"tattoo";if(entityType==="weapon")return(_b=(_a=weaponKey(baseName(e.slug)))!=null?_a:weaponKey(name))!=null?_b:GENERIC_ICON.weapon;if(entityType==="armor"){const cat=text(e.category).toLowerCase().replace(/\s*armou?r\s*$/,"").trim();return(_d=(_c=ARMOR_CATEGORY_KEY[cat])!=null?_c:armorKey(name))!=null?_d:GENERIC_ICON.armor}const rawType=text(e.type).toLowerCase().trim();const paren=/^([^()]+?)\s*\(([^)]+)\)\s*$/.exec(rawType);const type=(paren?paren[1]:rawType).trim().replace(/\s+item$/,"");const inner=paren?paren[2].trim():"";if(type==="weapon"){return(_e=weaponKey(baseName(e.base_item)||inner))!=null?_e:AMMUNITION_NAME.test(name)?"quiver":GENERIC_ICON.weapon}if(type==="armor")return(_f=armorKey(baseName(e.base_item)||inner))!=null?_f:GENERIC_ICON.armor;const direct=TYPE_DIRECT[type];if(direct)return direct;const bare=name.replace(/\s*\([^)]*\)/g," ").trim();for(const[key,re]of NAME_RULES)if(re.test(bare))return key;if(type==="spellcasting focus")return(_g=FOCUS_KEY[text(e.focus).toLowerCase()])!=null?_g:"wondrous";return(_h=TYPE_FALLBACK[type])!=null?_h:GENERIC_ICON.item}export{GENERIC_ICON,ITEM_ICON_KEYS,itemIconKey};
@@ -1,8 +1 @@
1
- import {
2
- parseItem
3
- } from "../chunk-EYX4JMAU.js";
4
- import "../chunk-S3YUXDSC.js";
5
- import "../chunk-UA5KS2PL.js";
6
- export {
7
- parseItem
8
- };
1
+ import{parseItem}from"../chunk-7LPKI27J.js";import"../chunk-RL4VY2AL.js";import"../chunk-I26FHSI6.js";export{parseItem};
@@ -254,6 +254,7 @@ export declare const itemEntitySchema: z.ZodObject<{
254
254
  multiply: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
255
255
  bonus: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
256
256
  }, z.core.$strict>>;
257
+ speed_on_use: z.ZodOptional<z.ZodBoolean>;
257
258
  rendering_hint: z.ZodOptional<z.ZodString>;
258
259
  icon: z.ZodOptional<z.ZodString>;
259
260
  has_fluff: z.ZodOptional<z.ZodBoolean>;
@@ -263,6 +264,7 @@ export declare const itemEntitySchema: z.ZodObject<{
263
264
  damage_dice: z.ZodOptional<z.ZodString>;
264
265
  damage_type: z.ZodOptional<z.ZodString>;
265
266
  properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
267
+ mastery: z.ZodOptional<z.ZodArray<z.ZodString>>;
266
268
  recharge: z.ZodOptional<z.ZodString>;
267
269
  curse: z.ZodOptional<z.ZodBoolean>;
268
270
  }, z.core.$strip>;
@@ -1,11 +1 @@
1
- import {
2
- conditionSchema,
3
- containerSchema,
4
- itemEntitySchema
5
- } from "../chunk-S3YUXDSC.js";
6
- import "../chunk-UA5KS2PL.js";
7
- export {
8
- conditionSchema,
9
- containerSchema,
10
- itemEntitySchema
11
- };
1
+ import{conditionSchema,containerSchema,itemEntitySchema}from"../chunk-RL4VY2AL.js";import"../chunk-I26FHSI6.js";export{conditionSchema,containerSchema,itemEntitySchema};
@@ -50,8 +50,6 @@ export interface ItemEntity {
50
50
  ability_scores?: {
51
51
  static?: Partial<Record<Ability, number>>;
52
52
  bonus?: Partial<Record<Ability, number | ConditionalBonus>>;
53
- /** "choose `count` of `from`, each +`amount`". `amount` is OPTIONAL — the
54
- * Kwalish Deck of Several Things carries `count` with no `amount`. */
55
53
  choose?: Array<{
56
54
  from: Ability[];
57
55
  count: number;
@@ -71,7 +69,6 @@ export interface ItemEntity {
71
69
  condition_immune?: string[];
72
70
  charges?: {
73
71
  max: number;
74
- /** Dice regained per recharge, e.g. "1d4 - 1". */
75
72
  dice?: string;
76
73
  recharge?: string;
77
74
  recharge_amount?: string;
@@ -86,11 +83,8 @@ export interface ItemEntity {
86
83
  daily?: Record<string, string[]>;
87
84
  will?: string[];
88
85
  rest?: Record<string, string[]>;
89
- /** Total uses with no recharge — item often consumed when empty. */
90
86
  limited?: Record<string, string[]>;
91
- /** Spells the document lists without a cost model. */
92
87
  other?: string[];
93
- /** Casting ability for the item's attached spells. */
94
88
  ability?: string;
95
89
  ritual?: string[];
96
90
  };
@@ -109,16 +103,11 @@ export interface ItemEntity {
109
103
  blindsight?: number;
110
104
  };
111
105
  };
112
- /** No top-level `weightless` (I2a): `capacity.weightless` is the one kept spelling. */
113
106
  container?: {
114
107
  capacity_weight?: number;
115
108
  holds_items?: boolean;
116
109
  pack_contents?: string[];
117
110
  pack_atomic?: boolean;
118
- /** Structured 5etools capacity. `item` entries are records of
119
- * "<item tag>": <count>, e.g. {"sling bullet|xphb": 20}. `item` record keys
120
- * are 5etools uids ("sling bullet|xphb") in converted data and item display
121
- * names ("Sling Bullet") in the SRD bundle (I2a). */
122
111
  capacity?: {
123
112
  weight?: number[];
124
113
  item?: Array<Record<string, number>>;
@@ -126,9 +115,6 @@ export interface ItemEntity {
126
115
  volume?: number[];
127
116
  };
128
117
  };
129
- /** Two DIFFERENT spellings, never unified: the object form
130
- * {bright_radius, dim_radius} (173 carriers) and the converter's array of
131
- * per-source entries keyed bright/dim/shape (97 entries over 81 docs). */
132
118
  light?: {
133
119
  bright_radius: number;
134
120
  dim_radius: number;
@@ -153,44 +139,32 @@ export interface ItemEntity {
153
139
  description?: string;
154
140
  entries?: unknown[];
155
141
  effects?: unknown[];
156
- /** Structured additive on-hit damage riders (e.g. Flame Tongue "+2d6 fire",
157
- * Wounding "+2d6 necrotic"). Read per-weapon in the equipment builder →
158
- * AttackRow.damageRiders. `amount` is a dice/flat string. */
159
142
  damage_riders?: Array<{
160
143
  amount: string;
161
144
  damage_type: string;
162
145
  applies_to?: "weapon" | "spell" | "all";
163
146
  condition?: string;
164
147
  }>;
165
- /** Spell-scroll casting level (e.g. 3 for a "Spell Scroll (3rd Level)"). */
166
148
  scroll_level?: number;
167
- /** Marks an item the player has not yet identified: the sheet shows the
168
- * masked_category label instead of the item's true identity. */
169
149
  unidentified?: boolean;
170
- /** Generic category label shown for an unidentified item (e.g. "potion",
171
- * "scroll", "wand") in place of its real name. */
172
150
  masked_category?: string;
173
- /** Speed overrides the item applies. `equal` maps a mode to another mode's
174
- * value (e.g. {fly: "walk"}); static/multiply/bonus are numeric, and `bonus`
175
- * is keyed "*" on its single carrier. */
176
151
  modify_speed?: {
177
152
  equal?: Record<string, string>;
178
153
  static?: Record<string, number>;
179
154
  multiply?: Record<string, number>;
180
155
  bonus?: Record<string, number>;
181
156
  };
182
- /** Carried by every converter item doc, always as "" today. */
157
+ speed_on_use?: boolean;
183
158
  rendering_hint?: string;
184
- /** The icon key (I3): a key of the renderer's icon set or a Lucide name. */
185
159
  icon?: string;
186
160
  has_fluff?: boolean;
187
161
  has_fluff_images?: boolean;
188
- /** One wikilink, or an array for >= 2 fluff images (images-ON emit). */
189
162
  image?: z.infer<typeof imageField>;
190
163
  raw?: Record<string, unknown>;
191
164
  damage_dice?: string;
192
165
  damage_type?: string;
193
166
  properties?: string[];
167
+ mastery?: string[];
194
168
  recharge?: string;
195
169
  curse?: boolean;
196
170
  value?: number;
@@ -1,6 +1 @@
1
- import {
2
- monsterInputSchema
3
- } from "../chunk-PTXBIDG7.js";
4
- export {
5
- monsterInputSchema
6
- };
1
+ import{monsterInputSchema}from"../chunk-6W253VHH.js";export{monsterInputSchema};
@@ -1,14 +1,4 @@
1
1
  import type { DocCodec } from "@archivist-gg/core";
2
2
  import type { Monster } from "./monster.types.js";
3
- /** Deprecated alias kept for the barrel re-export (`index.ts:7`) + `monster.resolve.ts:2`. */
4
3
  export type MonsterRaw = Monster;
5
- /**
6
- * Normalizing codec (0c.1a B8). `parse` delegates to `parseMonster`, which runs the legacy migrations of R4-G6 §4.1
7
- * (the `legendary` alias, scalar `ac` / `hp`, numeric-string coercion, the non-finite scrub, the null step, the
8
- * `senses` / `languages` string lift, `desc`, a malformed `recharge`), validates against `monsterSchema`, relocates
9
- * undeclared top-level keys into `raw`, and extracts Legendary-Resistance from trait text into the canonical
10
- * `legendary_resistance` field. All of it is intended and persists on save (B3); resolve-derived PB/XP are NOT added
11
- * here. `serialize` stays `yaml.dump` (the edit-save path uses obsidian's separate `editableToYaml`: that
12
- * two-serializer split is documented here; gate (d) Step 6 verifies `yaml.dump` round-trips).
13
- */
14
4
  export declare const monsterCodec: DocCodec<Monster>;