@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,41 +1 @@
1
- import {
2
- WEAPON_DEFAULT_ACTION_COST,
3
- customizableOverrideKeys,
4
- defaultActionCost,
5
- effectiveItemArmorClass,
6
- effectiveItemCharges,
7
- effectiveItemRecovery,
8
- isCastableScroll,
9
- isConsumedOnUse,
10
- isScrollEntity,
11
- isWeaponLikeEntry,
12
- itemChargesMax,
13
- scrollSpellCost
14
- } from "../chunk-NXUY5XQN.js";
15
- import "../chunk-W6GC6OKK.js";
16
- import "../chunk-B3DP42OM.js";
17
- import "../chunk-IUAAXXNO.js";
18
- import "../chunk-ZUQW5VBZ.js";
19
- import "../chunk-IHE6KVC3.js";
20
- import "../chunk-LHZXYFBU.js";
21
- import "../chunk-LVQLWRCU.js";
22
- import "../chunk-CM5CWO4K.js";
23
- import "../chunk-4J6DS3EJ.js";
24
- import "../chunk-ZCTUYGNV.js";
25
- import "../chunk-3TM34RSJ.js";
26
- import "../chunk-PDJSUH24.js";
27
- import "../chunk-WELIKLZF.js";
28
- export {
29
- WEAPON_DEFAULT_ACTION_COST,
30
- customizableOverrideKeys,
31
- defaultActionCost,
32
- effectiveItemArmorClass,
33
- effectiveItemCharges,
34
- effectiveItemRecovery,
35
- isCastableScroll,
36
- isConsumedOnUse,
37
- isScrollEntity,
38
- isWeaponLikeEntry,
39
- itemChargesMax,
40
- scrollSpellCost
41
- };
1
+ import{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,itemSpellUse,scrollSpellCost,settableSpellLevel,storedSpellNumbers,storesSpell}from"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,itemSpellUse,scrollSpellCost,settableSpellLevel,storedSpellNumbers,storesSpell};
@@ -10,33 +10,13 @@ interface ProficienciesForQuery {
10
10
  }
11
11
  export declare function emptyAppliedBonuses(): AppliedBonuses;
12
12
  export declare function computeAppliedBonuses(resolved: ResolvedCharacter, _profs: ProficienciesForQuery, registry: EntityRegistry, warnings: string[]): AppliedBonuses;
13
- /** The LIVE weapon-proficiency gate · the one the attack pipeline calls at
14
- * `computeAttacks` below. Exported for the overlay effect-slug guard
15
- * (`tests/srd-canonical/overlay-effect-slugs.test.ts`), which validates
16
- * authored `proficiency_type: weapon` values by asking this function whether
17
- * any SRD weapon comes out proficient. Note `pc.proficiency-query.ts`'s
18
- * `isProficientWithWeapon` is a near-twin with NO production callers · it
19
- * differs on the third arm (it compares only the base category, this one also
20
- * accepts the full hyphenated form), so guards wanting runtime fidelity must
21
- * use THIS one. */
13
+ export declare function pactWeaponIndexes(resolved: Pick<ResolvedCharacter, "pactWeapon" | "definition">, registry?: EntityRegistry | null): Set<number> | null;
22
14
  export declare function isWeaponSlugProficient(weapon: WeaponEntity, weaponSlug: string, profs: ProficienciesForQuery): boolean;
23
- /** The die and ability set an `unarmed-strike` effect (or its synthetic) resolved for this character (R4-G6b §5.1). */
24
15
  export interface UnarmedStrikeSpec {
25
16
  dice?: string;
26
17
  abilities?: Ability[];
27
18
  }
28
- /** The always-present Unarmed Strike row (R4-G6b §5.1): 1 + the modifier bludgeoning, 5 ft., always proficient. With a
29
- * DIE the damage string reproduces the OUTPUT of `buildAttackRow`'s `formatDice` (a closure over `dmgFlat` that cannot
30
- * be called): the flat part's `^\+0$` strip equals the whole-string `\+0$` strip for every modifier, so a die reads
31
- * `1d6-1`. With NO die the base is the number 1, and a signed suffix on a number is unevaluated arithmetic (`1-1`,
32
- * `1+3`), so the flat base prints EVALUATED and floored at 0: `String(Math.max(0, 1 + mod))` (R4-G7 T8 RIDER-10; the
33
- * user's Q-3 "1 + STR" is the formula, the evaluated number its display). The
34
- * ability is STR unless the spec lists others; the highest modifier wins and a LATER candidate wins a tie, so a
35
- * listed DEX beats STR on a tie (the shipped finesse idiom `mods.dex >= mods.str`). Called from recalc, which owns
36
- * the walk that produces `spec`; never from `computeAttacks`, so the row is present with or without a registry.
37
- * The `subLabel` is an ENGINE string, printed as it ships: the sheet humanizes a weapon's category tokens, and
38
- * this row carries no weapon, so `Unarmed` is capitalised here beside `Unarmed Strike`, `5 ft.` and `bludgeoning`
39
- * rather than in a renderer (R4-G6b live rider R-1). */
40
19
  export declare function buildUnarmedRow(mods: Record<Ability, number>, proficiencyBonus: number, spec?: UnarmedStrikeSpec): AttackRow;
20
+ export declare function buildFeatureAttackRows(resolved: Pick<ResolvedCharacter, "features">, mods: Record<Ability, number>, profs: ProficienciesForQuery, proficiencyBonus: number, weaponAbilities?: WeaponAbilityOverride[]): AttackRow[];
41
21
  export declare function computeSlotsAndAttacks(resolved: ResolvedCharacter, mods: Record<Ability, number>, profs: ProficienciesForQuery, registry: EntityRegistry, warnings: string[], proficiencyBonus: number, weaponAbilities?: WeaponAbilityOverride[], weaponMasteries?: string[], attunementFloor?: number): DerivedEquipment;
42
22
  export {};
@@ -1,34 +1 @@
1
- import {
2
- buildUnarmedRow,
3
- computeAppliedBonuses,
4
- computeSlotsAndAttacks,
5
- emptyAppliedBonuses,
6
- isWeaponSlugProficient
7
- } from "../chunk-7XJHI5H5.js";
8
- import "../chunk-3LWMFYKS.js";
9
- import "../chunk-YDGMBMYI.js";
10
- import "../chunk-EJP263OP.js";
11
- import "../chunk-5JXFJ5AU.js";
12
- import "../chunk-NXUY5XQN.js";
13
- import "../chunk-W6GC6OKK.js";
14
- import "../chunk-B3DP42OM.js";
15
- import "../chunk-IUAAXXNO.js";
16
- import "../chunk-ZUQW5VBZ.js";
17
- import "../chunk-IHE6KVC3.js";
18
- import "../chunk-HHBD4SQ6.js";
19
- import "../chunk-A54HHCWW.js";
20
- import "../chunk-LHZXYFBU.js";
21
- import "../chunk-LVQLWRCU.js";
22
- import "../chunk-CM5CWO4K.js";
23
- import "../chunk-4J6DS3EJ.js";
24
- import "../chunk-ZCTUYGNV.js";
25
- import "../chunk-3TM34RSJ.js";
26
- import "../chunk-PDJSUH24.js";
27
- import "../chunk-WELIKLZF.js";
28
- export {
29
- buildUnarmedRow,
30
- computeAppliedBonuses,
31
- computeSlotsAndAttacks,
32
- emptyAppliedBonuses,
33
- isWeaponSlugProficient
34
- };
1
+ import{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes}from"../chunk-E3MS4M3N.js";import"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import"../chunk-4E2GIWJE.js";import"../chunk-GD7WRCNH.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-J3RP5C7L.js";import"../chunk-WAUNLUFQ.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-NEMX7QGG.js";import"../chunk-56JK6VCL.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-ZVL5FXXO.js";export{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes};
@@ -1,41 +1,37 @@
1
- import type { FeatureEffect, SenseType } from "@archivist-gg/dnd5e/types/feature-effect";
1
+ import type { FeatureEffect, SenseType, SpeedGateWord, WeaponScope } from "@archivist-gg/dnd5e/types/feature-effect";
2
2
  import type { Ability } from "@archivist-gg/dnd5e";
3
- import type { DamageRider, DefenseGrant, FeatureSource, ResolvedCharacter, ResolvedFeature, RollModifierEntry, SaveOutcomeEntry, SpellDamageRider } from "./pc.types.js";
4
- /**
5
- * A melee-attack ability override from a `weapon-ability` effect. `weaponSlugs`
6
- * (bare, namespace-stripped) scopes the override to matching weapon types only;
7
- * empty/absent `weaponSlugs` = GLOBAL (applies to every melee weapon). The
8
- * `"spellcasting"` sentinel is NOT stored here — it is resolved against the
9
- * caster ability in recalc and prepended as a global.
10
- */
3
+ import type { ConditionalCrit, DamageRider, DefenseGrant, DefenseItemSource, FeatureSource, SpeedMode, ResolvedCharacter, ResolvedFeature, RollModifierEntry, SaveOutcomeEntry, SpellDamageRider } from "./pc.types.js";
11
4
  export interface WeaponAbilityOverride {
12
5
  ability: Ability;
13
6
  weaponSlugs?: string[];
7
+ pactWeapon?: true;
8
+ }
9
+ export interface SpeedEffectTerm {
10
+ mode: SpeedMode;
11
+ label: string;
12
+ value: number;
13
+ set: boolean;
14
+ condition?: string;
15
+ equalsWalk?: true;
16
+ inactiveWhile?: SpeedGateWord[];
14
17
  }
15
- /**
16
- * Aggregated passive feature effects (effects-application engine).
17
- * One pure scan over resolved.features[].feature.effects[]. Merge semantics
18
- * mirror pc.conditions mergePartial: numbers add, each sense range takes max,
19
- * lists union case-insensitively. apply-condition is action time and
20
- * intentionally not aggregated; `damage-bonus` folds into damageBonuses (additive
21
- * on-hit riders); `while`-gated immune-condition entries are skipped entirely
22
- * (conditional effects are a named deferral).
23
- */
24
18
  export interface FeatureEffectTotals {
25
19
  initiative_bonus: number;
26
20
  initiative_terms: {
27
21
  label: string;
28
22
  value: number;
29
23
  }[];
30
- /** Ability-based numeric skill bonuses, resolved against final scores in recalc. */
24
+ initiative_amount_terms: {
25
+ label: string;
26
+ amount: string;
27
+ owner?: FeatureSource;
28
+ }[];
31
29
  skill_bonus_terms: {
32
30
  skills: string[];
33
31
  ability: Ability;
34
32
  minimum: number;
35
33
  label: string;
36
34
  }[];
37
- /** SL (spec §11.2): ability-based numeric SAVE bonuses (Aura of Protection), resolved in recalc against final scores and
38
- * the character's conditions. Empty `saves` = every save; recalc keeps one term per `label`. */
39
35
  save_bonus_terms: {
40
36
  saves: Ability[];
41
37
  ability: Ability;
@@ -43,20 +39,12 @@ export interface FeatureEffectTotals {
43
39
  inactiveWhile?: "incapacitated" | "unconscious";
44
40
  label: string;
45
41
  }[];
46
- /**
47
- * Half-proficiency terms (Jack of All Trades, Remarkable Athlete). Resolved in recalc against the
48
- * proficiency bonus, and ONLY for a skill whose effective tri is "none" — that gate is the mechanic
49
- * ("a skill proficiency you lack"), so it lives at the consumer, not here. Empty `skills` = every skill.
50
- * recalc takes the MAX across terms, never the sum: "add half your Proficiency Bonus" is one grant, so two
51
- * features (or a duplicated homebrew note) must not double it.
52
- */
53
42
  half_proficiency_terms: {
54
43
  skills: string[];
55
44
  round: "down" | "up";
56
45
  label: string;
57
46
  }[];
58
47
  hp_per_level_bonus: number;
59
- /** One term per hp-per-level-bonus effect, labeled with the owning feature's name. */
60
48
  hp_per_level_terms: {
61
49
  label: string;
62
50
  value: number;
@@ -66,95 +54,22 @@ export interface FeatureEffectTotals {
66
54
  label: string;
67
55
  value: number;
68
56
  }[];
69
- /**
70
- * Absolute walk-speed FLOOR from `speed-bonus` effects with `set:true` (e.g.
71
- * a "base speed becomes 60" feature). Max across all set effects; 0 = none.
72
- * recalc applies it as Math.max(set, race + additive bonuses) so it never
73
- * lowers an already-higher speed and is independent of the additive bonus.
74
- * A `scales_at` progression resolves BEFORE the max, at the effect's own source level (R4-G7 §7.3).
75
- */
57
+ speed_terms: SpeedEffectTerm[];
58
+ ignore_armor_strength: string[];
76
59
  speed_walk_set: number;
77
- /**
78
- * Absolute attunement CAP granted by `attunement-limit` effects (the Artificer's Magic Item
79
- * Adept / Savant / Master line). Max across all grants; 0 = nothing granted it. recalc applies it
80
- * as Math.max(3, attunement_set) so a grant can never LOWER the baseline, and an explicit
81
- * `overrides.attunement_limit` on the character still wins outright — a number the player typed is
82
- * intent, not a derived value. A `scales_at` progression resolves BEFORE the max, at the effect's
83
- * own source level (R4-G7 §7.3).
84
- */
85
60
  attunement_set: number;
86
- /** Flat ability-score bumps from `ability-score-increase` effects whose `abilities` is a FIXED LIST (the three level-20
87
- * capstones). `chosen` arms are the ASI SLOT's second encoding and MUST NOT fold (the synthesized feat decision pays
88
- * them; a flat fold double-counts). No cap: `max` is declared and unread (user ruling 2026-09-03). */
89
61
  ability_bonus: Partial<Record<Ability, number>>;
90
- /** Max range per sense type granted by effects; 0 = none for that type. */
91
62
  senses: Record<SenseType, number>;
92
- /** One term per ac-bonus effect, labeled with the owning feature's name. `condition` is the
93
- * effect's situational qualifier, carried verbatim onto the ACTerm and never evaluated. */
94
63
  ac_terms: {
95
64
  value: number;
96
65
  requires_armor: boolean;
97
66
  label: string;
98
67
  condition?: string;
99
68
  }[];
100
- /**
101
- * The four defense buckets a feature effect can grant, as DefenseGrant ENTRIES (R4-G3a §3.2.1).
102
- * Deduped by value case-insensitively, first spelling wins, trimmed · exactly the contract
103
- * `pushUnique` had when these were `string[]` · but the SECOND granting feature's NAME is merged
104
- * into `sources` rather than discarded. `immunity` and `vulnerability` fold REGARDLESS of
105
- * `condition` (following `resistance`: dropping a real immunity is worse than showing it
106
- * unqualified); `immune-condition` keeps its `while` skip. Values stay in the AUTHORED spelling ·
107
- * toDefenseSlug runs in pc.recalc.ts, where composeDefenseEntries turns these into DefenseEntry.
108
- */
109
69
  resistances: DefenseGrant[];
110
70
  immunities: DefenseGrant[];
111
71
  vulnerabilities: DefenseGrant[];
112
72
  condition_immunities: DefenseGrant[];
113
- /**
114
- * skills, tools and languages are canonical slugs (toProfSlug: lowercase, U+2019
115
- * folded to ASCII, whitespace collapsed to hyphens). armor and weapons entries
116
- * are only `.toLowerCase()`d, NOT slugified, so an authored value keeps its
117
- * spaces. recalc folds armor into armor.categories ONLY; it folds every weapons
118
- * value into weapons.categories and additionally routes a non-category value
119
- * into weapons.specific. saves are canonical ability keys, and are the one
120
- * bucket a closed vocabulary genuinely guarantees: normalizeAbility returns null
121
- * for anything else and the effect is dropped.
122
- *
123
- * What is INTENDED and what is ENFORCED differ here, and the gap is silent.
124
- * INTENDED: skills/tools/languages land on ALL_SKILL_SLUGS / ALL_TOOLS /
125
- * ALL_LANGUAGES, over which toProfSlug is the identity; armor values are
126
- * CATEGORY words ("heavy"/"shield"); weapons values are a category word
127
- * ("simple"/"martial", or an entity-level "martial-melee" form) or an authored
128
- * weapon NAME. ENFORCED at runtime: nothing. feature-effect-schema's proficiency
129
- * arm is `value: z.string().min(1)`, an OPEN string, and classifyProficiencyEffect
130
- * does no membership test. The only guard is
131
- * tests/srd-canonical/overlay-effect-slugs.test.ts, and it sees OVERLAY-AUTHORED
132
- * data only · there skill/tool/language are checked against those three lists and
133
- * weapon against the live gate, while armor and saving-throw are unchecked even
134
- * there. Vault homebrew reaching this at runtime is checked by nothing.
135
- *
136
- * An off-vocabulary value does not crash and does not disappear · it becomes a
137
- * value that can never coincide with the canonical one. Measured: an authored
138
- * `{proficiency_type:"tool", value:"Playing Card Set"}` normalizes to
139
- * "playing-card-set", which is NOT in ALL_TOOLS (that list carries the 2024
140
- * spelling "playing-cards"). It still folds, and still renders as its own row
141
- * labeled "Playing Card Set", but everything keyed on the canonical slug · the
142
- * first-seen-wins dedupe in computeEffectiveProficiencies, an
143
- * `overrides.tools.remove` suppression, the builder's already-satisfied
144
- * exclusion · misses it, so the character ends up able to hold both.
145
- *
146
- * `skillExpertise` is NOT a seventh bucket · it is a SUBSET of `skills`, in the
147
- * same canonical slug form, carrying the values whose effect set
148
- * `expertise: true`. An expertise skill is pushed to BOTH, so every consumer
149
- * that only knows about proficiency keeps working and recalc's `expSet` gains
150
- * one source. SKILLS ONLY (spec §7.2): a tool or language effect carrying
151
- * `expertise: true` folds as a plain proficiency and never lands here. It is
152
- * not lost · since R4-G4 §9.2 the authored flag travels the GRANT channel
153
- * instead (`EffectProficiencyGrant.expertise` -> `ProficiencyGrant.expertise`
154
- * -> `ProficiencyEntry.expertise`), which is the channel the sheet panel and
155
- * the proficiency modal read. Routing it here as well would put a value in the
156
- * skill-expertise set that no skill key can ever match.
157
- */
158
73
  proficiencies: {
159
74
  skills: string[];
160
75
  skillExpertise: string[];
@@ -164,166 +79,41 @@ export interface FeatureEffectTotals {
164
79
  armor: string[];
165
80
  weapons: string[];
166
81
  };
167
- /**
168
- * Melee-attack ability overrides (Hexblade "Lies", MCDM Illrigger scoped
169
- * "Lies", etc.), in fold order. Each carries an optional `weaponSlugs` scope
170
- * (bare slugs) — absent/empty = GLOBAL (every melee weapon). The
171
- * `"spellcasting"` sentinel is excluded here (no caster context in the fold);
172
- * recalc resolves it and prepends the resolved global so it wins over concrete
173
- * globals. recalc threads this list into attack computation, where a
174
- * scoped-match wins over a global for the matching weapon. [] = no override.
175
- */
176
82
  weaponAbilities: WeaponAbilityOverride[];
177
- /**
178
- * Order-preserving list of structured advantage/disadvantage entries from
179
- * `roll-modifier` effects. Pass-through (no dedupe/merge); each entry is
180
- * labeled with the owning feature's name.
181
- */
182
83
  rollModifiers: RollModifierEntry[];
183
- /**
184
- * Order-preserving list of `save-outcome` entries (R4-G3a §5.3), labeled with the owning
185
- * feature's name. Pass-through (no dedupe/merge); `ability: "any"` becomes an ABSENT ability,
186
- * which the save chip reads as "every save".
187
- */
188
84
  saveOutcomes: SaveOutcomeEntry[];
189
- /**
190
- * Lowest weapon-attack crit threshold (natural roll that scores a critical
191
- * hit) granted by `crit-range` effects. Folds via Math.min from init 20, so
192
- * 20 = no expansion. spell-only (`applies_to:"spell"`) entries do NOT lower
193
- * it. recalc maps this onto each AttackRow as `critRange` only when < 20.
194
- */
195
85
  critRange: number;
196
- /**
197
- * Max EXTRA attacks per Attack action granted by `extra-attack` effects, never the total:
198
- * Non-stacking (D&D Extra Attack features don't stack): folds via Math.max
199
- * from init 0, so 0 = no extra attacks. recalc maps this onto
200
- * DerivedStats.attacksPerAction as `1 + extraAttack`.
201
- * A `scales_at` progression resolves BEFORE the max, at the effect's own source level (R4-G7 §7.3).
202
- */
86
+ conditionalCrits: ConditionalCrit[];
203
87
  extraAttack: number;
204
- /**
205
- * Order-preserving display-only captions surfaced from `reroll-damage` and
206
- * `attack-rule` effects (e.g. "Reroll 2s", "No disadvantage firing in melee").
207
- * recalc post-applies this list onto each AttackRow as `attackNotes` only when
208
- * non-empty, so untouched attack rows keep `attackNotes: undefined`.
209
- */
88
+ scopedExtraAttacks: Array<{
89
+ count: number;
90
+ scope: WeaponScope[];
91
+ }>;
210
92
  attackNotes: string[];
211
- /**
212
- * Additive on-hit damage riders from `damage-bonus` effects with
213
- * `applies_to` weapon/all (spell and all riders also go to `spellDamageBonuses`). Each is
214
- * labeled with the owning feature's name. recalc merges these onto every
215
- * weapon AttackRow's `damageRiders`.
216
- */
217
93
  damageBonuses: DamageRider[];
218
- /**
219
- * The `damage-bonus` effects with `applies_to: spell` or `all`, labeled with the owning feature's name and carrying its
220
- * `spellTargets` and `spell_scope` (found live 2026-09-28: they were dropped here, so Agonizing Blast never reached its
221
- * cantrip). recalc reads each against the character's spells (`spellsReached`, `spellsInScope`) into
222
- * `DerivedStats.spellDamageRiders`.
223
- */
224
94
  spellDamageBonuses: SpellDamageRider[];
225
95
  }
226
96
  export declare function emptyFeatureEffectTotals(): FeatureEffectTotals;
227
- /**
228
- * Optional fold inputs. `activeBuffs` is the set of currently-toggled buff
229
- * ids/slugs (from Character.state.active_buffs + selected pool boons). An
230
- * `activatable` feature's effects fold ONLY while its id is in this set; a buff
231
- * is OFF by default, so callers passing no opts see activatable features fold to
232
- * nothing (correct — a buff is off until toggled). Non-activatable features fold
233
- * unconditionally regardless of opts.
234
- *
235
- * R4-G7 §7.3: `levelFor` answers "at what level does an effect from THIS source resolve", which is the rule
236
- * `resourceLevelFor` (pc.resources.ts) already applies to a resource's own `scales_at`: the character's level
237
- * in the granting class for a `class` source, the level in the class owning the subclass for a `subclass`
238
- * source, the total level otherwise. Both production callers pass exactly that (dnd5e `pc.recalc.ts` and the
239
- * plugin's builder `abilities-step.ts`); a caller that passes none leaves every `scales_at` unresolved and
240
- * every effect at its BASE value, which is what a fixture with no character behind it should read.
241
- */
97
+ export declare function pushDefenseGrant(list: DefenseGrant[], value: string, source: string, condition?: string, item?: DefenseItemSource): void;
98
+ export declare function mergeDefenseItems(into: DefenseItemSource[], from: readonly DefenseItemSource[]): void;
242
99
  export interface FeatureEffectsOpts {
243
100
  activeBuffs?: Set<string>;
244
101
  levelFor?: (source: FeatureSource) => number;
245
- /** RG: the DICE cell (`1d6`) of column `column` in the table of the class that owns `source`, at `level`; null when that
246
- * table has no such dice cell. recalc passes it; a caller that passes none leaves every rider at its authored amount. */
247
102
  tableDiceFor?: (source: FeatureSource, column: string, level: number) => string | null;
103
+ tableCellFor?: (source: FeatureSource, column: string) => string | null;
248
104
  }
249
- /** Does this feature's effects fold right now? An activatable feature folds ONLY
250
- * while its id is in the active set; a buff is off until toggled. Shared by
251
- * computeFeatureEffects and the display-side proficiency collector so the fold
252
- * and the display can never disagree about boons (spec fence F3). */
253
105
  export declare function foldsNow(rf: ResolvedFeature, activeBuffs: Set<string>): boolean;
254
- /** The ONE assembly of everything whose effects fold: authored features plus
255
- * pool-granted and pool-selected boons, with the active-buff set.
256
- *
257
- * Returning BOTH halves is load-bearing: a caller handed only the feature list
258
- * would drop activeBuffs and computeFeatureEffects would skip every activatable
259
- * boon · exactly the display/gate divergence this helper exists to close.
260
- *
261
- * The guards defend against CAST-BUILT FIXTURES, not against the type: `features`,
262
- * `pools` and `state` are all non-optional on ResolvedCharacter, but `tests/` is
263
- * typechecked by nothing. Only fixtures that actually reach this function count,
264
- * and today that is THREE entry points: recalc, the display-side walk
265
- * (computeEffectiveProficiencies → collectProficiencyGrants), and this
266
- * function's own direct tests. All three guards are LIVE. Counts below were
267
- * measured by deleting each guard and running the suite · re-derive them the
268
- * same way rather than trusting the numbers, which drift as tests are added:
269
- * · `pools ?? []` is exercised by `emptyResolved()` in
270
- * tests/pc-recalc-feature-effects.test.ts, which omits pools and IS fed to
271
- * recalc, and by `dwarf()` in tests/pc-proficiency-effective.test.ts. This
272
- * guard predates the extraction; it was already here. Deleting it: 149 tests
273
- * red across 13 files.
274
- * · `state?.` is exercised by the "survives a cast-built fixture with no pools
275
- * and no state" case in tests/pc-feature-effects.test.ts, which calls this
276
- * function directly with `{ features: [...] } as never`, and again by
277
- * `dwarf()`. Deleting it: 11 red across 2 files.
278
- * · `features ?? []` is exercised by `dwarf()` in
279
- * tests/pc-proficiency-effective.test.ts, which omits `features` and reaches
280
- * here through the display walk. Deleting it: 7 red, all in that file.
281
- * ⚠️ This bullet used to read "NOT exercised today, and is the one kept
282
- * purely for the display-side callers". That was TRUE when written and was
283
- * falsified LATER IN THIS SAME PHASE by the tasks that wired the display
284
- * path, because nobody re-read it. A guard's own justification is the thing
285
- * most likely to go stale under you · re-run the deletion before restating
286
- * any of these three.
287
- * Do not "simplify" any of the three away. */
288
106
  export declare function assembleEffectFeatures(resolved: ResolvedCharacter): {
289
107
  features: ResolvedFeature[];
290
108
  activeBuffs: Set<string>;
291
109
  };
292
- /** Spec R4-G1a D2. Whether an effect changes the character it is written on. `subject` is absent on every SRD
293
- * effect (=== "self"); the converter emits "self" today and will emit other creatures later (Hound of Ill Omen
294
- * imposes disadvantage on a TARGET). A non-self effect never folds onto the PC: not here, not in
295
- * collectProficiencyEffectGrants, not in unarmoredACBreakdown, not in recalc's weapon-ability scan. Its FEATURE
296
- * still resolves and renders (it is not buildOnly); R4-G3a §4 gives it a row-local caption.
297
- *
298
- * R4-G3a §4.4: a subject that is neither absent nor "self" warns ONCE per distinct subject string
299
- * (`warnOnce`, keyed on the subject). The converter's vocabulary here is open, so an unexpected
300
- * spelling ("Self", "target creature") silently stops folding today; the warning names it without
301
- * changing the answer. Never a refusal: the return value is unchanged. */
302
110
  export declare function foldsOnSelf(eff: {
303
111
  subject?: string;
304
112
  }): boolean;
305
- /** The effects of a feature that fold on the character: every reader of `feature.effects` for a derived stat goes through this. */
306
113
  export declare function selfEffectsOf(f: {
307
114
  effects?: FeatureEffect[];
308
115
  }): FeatureEffect[];
309
116
  export declare function computeFeatureEffects(features: ResolvedFeature[], opts?: FeatureEffectsOpts): FeatureEffectTotals;
310
- /** The ONE interpreter of `kind: "proficiency"` effects (spec fence F3).
311
- *
312
- * Two consumers with different needs, so the return carries BOTH forms:
313
- * `applyEffect` pushes `value` (normalized) into FeatureEffectTotals, while the
314
- * display collector reads `raw` for armor/weapons · composeGrantEntries stores
315
- * the raw authored string as ProficiencyEntry.value (spec §4.8 #1) and computes
316
- * its dedupe key separately. Tools/languages read `value`.
317
- *
318
- * `saves` is discriminated because FeatureEffectTotals.proficiencies.saves is
319
- * Ability[], not string[] (fence F1). A null return means "not a proficiency
320
- * effect, or an unresolvable ability".
321
- *
322
- * `expertise` is REQUIRED and always a boolean, never absent: the authored key
323
- * is optional, so folding it here once means no consumer has to tell
324
- * `undefined` from `false`. It is reported for EVERY bucket · deciding that
325
- * only skills act on it belongs to the fold (spec §7.2), not to the
326
- * classification. */
327
117
  export type ProficiencyClassification = {
328
118
  bucket: "skills" | "tools" | "languages" | "armor" | "weapons";
329
119
  value: string;
@@ -336,56 +126,12 @@ export type ProficiencyClassification = {
336
126
  expertise: boolean;
337
127
  };
338
128
  export declare function classifyProficiencyEffect(eff: FeatureEffect): ProficiencyClassification | null;
339
- /** One proficiency an effect grants, tagged with the source it came from.
340
- *
341
- * BOTH forms are carried because the two display consumers need different ones
342
- * and, since the tool/language canonicalization landed, they no longer coincide:
343
- * armor/weapons read `raw` (composeGrantEntries stores the raw authored string
344
- * as ProficiencyEntry.value and keys its dedupe on toProfSlug separately), while
345
- * tools/languages read `value`, the canonical slug the effective-proficiency
346
- * matcher matches its vocabulary and suppressions on. Reaching for the wrong
347
- * field is silently wrong, not harmlessly identical.
348
- *
349
- * `sourceSlug` is the source's slug VERBATIM (namespace and all), because the
350
- * consumer resolves it against the resolved character's entities to get a
351
- * display name. */
352
129
  export interface EffectProficiencyGrant {
353
130
  value: string;
354
131
  raw: string;
355
132
  sourceKind: FeatureSource["kind"];
356
133
  sourceSlug: string;
357
- /**
358
- * Set (to `true`) only when the granting effect carried `expertise: true`, and
359
- * ABSENT otherwise, so a plain grant keeps the exact four-key shape the two
360
- * display consumers already read. Reported for every bucket, unlike the fold,
361
- * which routes skills only (spec §7.2). CONSUMED since R4-G4 §9.2 by
362
- * `toGrants` in pc.proficiency-grants.ts, which spreads it onto
363
- * `ProficiencyGrant` for every bucket; the tools display is the one reader
364
- * today, and it reads this rather than re-deriving it from the raw effects.
365
- */
366
134
  expertise?: boolean;
367
135
  }
368
136
  export type EffectProficiencyGrants = Record<"skills" | "tools" | "languages" | "saves" | "armor" | "weapons", EffectProficiencyGrant[]>;
369
- /** Every proficiency an effect grants, tagged with the FeatureSource it came from.
370
- *
371
- * Deliberately NOT deduped: composeGrantEntries collects distinct SOURCES per
372
- * value, so collapsing on value alone here would silently drop the second
373
- * granting entity and blank half the provenance.
374
- *
375
- * `skills` and `saves` are collected because classifyProficiencyEffect's bucket
376
- * union has SIX members and this function indexes the record by it · drop either
377
- * key and `out[c.bucket].push(...)` is a type error, and a hand-built record
378
- * missing one crashes on the first such effect. They have NO display consumer:
379
- * effect-granted skills already reach the sheet via recalc's skill union and
380
- * saves via its save set, and the Proficiencies panel has only four rows. No
381
- * test asserts either bucket, and `toGrants` in pc.proficiency-grants.ts reads
382
- * only the other four. That is deliberate, not an oversight.
383
- *
384
- * Reads the same three rules as the fold, and NOTHING else: foldsNow decides
385
- * what is active, selfEffectsOf decides whose numbers an effect changes and
386
- * classifyProficiencyEffect decides what a proficiency effect means (spec fence
387
- * F3), so the display can never disagree with the engine.
388
- *
389
- * Reads only effects that fold on self (`selfEffectsOf`), the same predicate as
390
- * the fold, so a non-self proficiency is neither granted nor displayed. */
391
137
  export declare function collectProficiencyEffectGrants(features: ResolvedFeature[], activeBuffs: Set<string>): EffectProficiencyGrants;
@@ -1,39 +1 @@
1
- import {
2
- assembleEffectFeatures,
3
- classifyProficiencyEffect,
4
- collectProficiencyEffectGrants,
5
- computeFeatureEffects,
6
- emptyFeatureEffectTotals,
7
- foldsNow,
8
- foldsOnSelf,
9
- selfEffectsOf
10
- } from "../chunk-64VNLMSG.js";
11
- import "../chunk-TOM66P2P.js";
12
- import "../chunk-KU3YLF6D.js";
13
- import "../chunk-5JXFJ5AU.js";
14
- import "../chunk-RD2MID3M.js";
15
- import "../chunk-NXUY5XQN.js";
16
- import "../chunk-W6GC6OKK.js";
17
- import "../chunk-B3DP42OM.js";
18
- import "../chunk-IUAAXXNO.js";
19
- import "../chunk-ZUQW5VBZ.js";
20
- import "../chunk-IHE6KVC3.js";
21
- import "../chunk-LHZXYFBU.js";
22
- import "../chunk-YBLDE5CG.js";
23
- import "../chunk-LVQLWRCU.js";
24
- import "../chunk-CM5CWO4K.js";
25
- import "../chunk-4J6DS3EJ.js";
26
- import "../chunk-ZCTUYGNV.js";
27
- import "../chunk-3TM34RSJ.js";
28
- import "../chunk-PDJSUH24.js";
29
- import "../chunk-WELIKLZF.js";
30
- export {
31
- assembleEffectFeatures,
32
- classifyProficiencyEffect,
33
- collectProficiencyEffectGrants,
34
- computeFeatureEffects,
35
- emptyFeatureEffectTotals,
36
- foldsNow,
37
- foldsOnSelf,
38
- selfEffectsOf
39
- };
1
+ import{assembleEffectFeatures,classifyProficiencyEffect,collectProficiencyEffectGrants,computeFeatureEffects,emptyFeatureEffectTotals,foldsNow,foldsOnSelf,mergeDefenseItems,pushDefenseGrant,selfEffectsOf}from"../chunk-GD7WRCNH.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-WAUNLUFQ.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{assembleEffectFeatures,classifyProficiencyEffect,collectProficiencyEffectGrants,computeFeatureEffects,emptyFeatureEffectTotals,foldsNow,foldsOnSelf,mergeDefenseItems,pushDefenseGrant,selfEffectsOf};
@@ -1,11 +1 @@
1
- // src/pc/pc.formula-context.ts
2
- function buildFormulaContext(resolved, derived, registry) {
3
- return {
4
- abilities: resolved.definition.abilities,
5
- proficiencyBonus: derived.proficiencyBonus,
6
- compendium: registry
7
- };
8
- }
9
- export {
10
- buildFormulaContext
11
- };
1
+ function buildFormulaContext(resolved,derived,registry){return{abilities:resolved.definition.abilities,proficiencyBonus:derived.proficiencyBonus,compendium:registry}}export{buildFormulaContext};