@archivist-gg/dnd5e 0.3.17 → 0.3.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/LICENSE +48 -21
  2. package/README.md +26 -48
  3. package/dist/armor/armor.codec.d.ts +0 -7
  4. package/dist/armor/armor.codec.js +1 -9
  5. package/dist/armor/armor.parser.js +1 -8
  6. package/dist/armor/armor.schema.js +1 -7
  7. package/dist/armor/armor.types.d.ts +0 -3
  8. package/dist/background/background.codec.d.ts +0 -6
  9. package/dist/background/background.codec.js +1 -12
  10. package/dist/background/background.parser.js +1 -11
  11. package/dist/background/background.schema.js +1 -12
  12. package/dist/background/background.types.d.ts +0 -5
  13. package/dist/chunk-2EOGK6R6.js +1 -0
  14. package/dist/chunk-2HRRH3WL.js +1 -0
  15. package/dist/chunk-2LCGKNVM.js +1 -0
  16. package/dist/chunk-2NUDWOFG.js +1 -0
  17. package/dist/chunk-334WLI7V.js +1 -0
  18. package/dist/chunk-3LWOVRLA.js +1 -0
  19. package/dist/chunk-3QQOATV3.js +1 -0
  20. package/dist/chunk-4E2GIWJE.js +1 -0
  21. package/dist/chunk-4GN3GYMP.js +1 -0
  22. package/dist/chunk-4IAMSRHD.js +1 -0
  23. package/dist/chunk-4JEF3CET.js +1 -0
  24. package/dist/chunk-4KVVAENP.js +1 -0
  25. package/dist/chunk-56JK6VCL.js +1 -0
  26. package/dist/chunk-5FEXHY4U.js +1 -0
  27. package/dist/chunk-63YJPWTM.js +1 -0
  28. package/dist/chunk-6ASJ3MVB.js +1 -0
  29. package/dist/chunk-6IC53O3Q.js +1 -0
  30. package/dist/chunk-6LCNV26D.js +1 -0
  31. package/dist/chunk-6W253VHH.js +1 -0
  32. package/dist/chunk-7AKJBRBD.js +1 -0
  33. package/dist/chunk-7EL3GWWJ.js +1 -0
  34. package/dist/chunk-7FPQJDFD.js +1 -0
  35. package/dist/chunk-7J5BNH2D.js +1 -0
  36. package/dist/chunk-7LPKI27J.js +1 -0
  37. package/dist/chunk-7UPYRKMF.js +1 -0
  38. package/dist/chunk-A7H6LX47.js +1 -0
  39. package/dist/chunk-AINRPPLH.js +1 -0
  40. package/dist/chunk-BC52J4LA.js +1 -0
  41. package/dist/chunk-BCXGB4HP.js +1 -0
  42. package/dist/chunk-BGX36NPE.js +1 -0
  43. package/dist/chunk-BPKG6RZ7.js +1 -0
  44. package/dist/chunk-BREHZNTL.js +1 -0
  45. package/dist/chunk-BZ6BGGZS.js +1 -0
  46. package/dist/chunk-CAPYNIGK.js +1 -0
  47. package/dist/chunk-CCFIINBA.js +1 -0
  48. package/dist/chunk-CMIEZQL4.js +1 -0
  49. package/dist/chunk-DVUXUIPV.js +1 -0
  50. package/dist/chunk-DY6FVAGA.js +1 -0
  51. package/dist/chunk-DZITM5AG.js +1 -0
  52. package/dist/chunk-DZKSXSJF.js +1 -0
  53. package/dist/chunk-EAARMPCW.js +1 -0
  54. package/dist/chunk-EVT7MGAC.js +1 -0
  55. package/dist/chunk-FOLHTMSC.js +1 -0
  56. package/dist/chunk-GCYUCIDN.js +1 -0
  57. package/dist/chunk-GIOV6JW7.js +1 -0
  58. package/dist/chunk-HCK6IUB3.js +1 -0
  59. package/dist/chunk-HR5MKCP2.js +1 -0
  60. package/dist/chunk-I26FHSI6.js +1 -0
  61. package/dist/chunk-I4O2FIDT.js +1 -0
  62. package/dist/chunk-IGVRLGLM.js +1 -0
  63. package/dist/chunk-IHPLT2ZT.js +1 -0
  64. package/dist/chunk-IOCJIWCV.js +1 -0
  65. package/dist/chunk-JXDX2DKF.js +1 -0
  66. package/dist/chunk-KBFSJ5WE.js +1 -0
  67. package/dist/chunk-KM75CC6Q.js +1 -0
  68. package/dist/chunk-KZDDFG4O.js +1 -0
  69. package/dist/chunk-LJNT3PJP.js +1 -0
  70. package/dist/chunk-LR6UMA5V.js +1 -0
  71. package/dist/chunk-M6RPOLKS.js +1 -0
  72. package/dist/chunk-MC6PLWRZ.js +1 -0
  73. package/dist/chunk-MGGKZGLG.js +1 -0
  74. package/dist/chunk-N3RYJ7RE.js +1 -0
  75. package/dist/chunk-NEMX7QGG.js +1 -0
  76. package/dist/chunk-NI364WV7.js +1 -0
  77. package/dist/chunk-O2QZ73GA.js +1 -0
  78. package/dist/chunk-O776WL7O.js +1 -0
  79. package/dist/chunk-OTFNINUY.js +1 -0
  80. package/dist/chunk-PQAVMK3T.js +1 -0
  81. package/dist/chunk-PZ3ZZ5H5.js +1 -0
  82. package/dist/chunk-PZ4L2EEG.js +1 -0
  83. package/dist/chunk-PZUPZBTN.js +1 -0
  84. package/dist/chunk-QBA757AU.js +1 -0
  85. package/dist/chunk-QFIGPOFW.js +1 -0
  86. package/dist/chunk-QMEKQTUT.js +1 -0
  87. package/dist/chunk-QVWT67WA.js +1 -0
  88. package/dist/chunk-RDXQAZBA.js +1 -0
  89. package/dist/chunk-RE5Z5RNK.js +1 -0
  90. package/dist/chunk-RL4VY2AL.js +1 -0
  91. package/dist/chunk-RQGTBHJW.js +1 -0
  92. package/dist/chunk-RQZCGXUZ.js +1 -0
  93. package/dist/chunk-S5UCI27C.js +1 -0
  94. package/dist/chunk-SEOASDO4.js +1 -0
  95. package/dist/chunk-SU4MEZ5P.js +1 -0
  96. package/dist/chunk-T55DELVL.js +1 -0
  97. package/dist/chunk-TKIEPC6F.js +1 -0
  98. package/dist/chunk-TLXFGGWH.js +1 -0
  99. package/dist/chunk-UBUKCRZ3.js +1 -0
  100. package/dist/chunk-V6NQ547U.js +1 -0
  101. package/dist/chunk-VA3ZWV7C.js +1 -0
  102. package/dist/chunk-VIP3FH2O.js +1 -0
  103. package/dist/chunk-VTQ4RWEG.js +1 -0
  104. package/dist/chunk-WUHTSLG4.js +1 -0
  105. package/dist/chunk-X22SISGM.js +1 -0
  106. package/dist/chunk-XKJXT2PN.js +1 -0
  107. package/dist/chunk-XQMKH4R4.js +1 -0
  108. package/dist/chunk-YGH7S5ZF.js +1 -0
  109. package/dist/chunk-ZE46ADXS.js +1 -0
  110. package/dist/chunk-ZI3FEUX3.js +1 -0
  111. package/dist/class/class.codec.d.ts +0 -7
  112. package/dist/class/class.codec.js +1 -18
  113. package/dist/class/class.parser.js +1 -17
  114. package/dist/class/class.schema.d.ts +2 -1
  115. package/dist/class/class.schema.js +1 -15
  116. package/dist/class/class.slug.d.ts +0 -11
  117. package/dist/class/class.slug.js +1 -8
  118. package/dist/class/class.standard-array.d.ts +0 -7
  119. package/dist/class/class.standard-array.js +1 -20
  120. package/dist/class/class.types.d.ts +0 -20
  121. package/dist/condition/condition.codec.d.ts +0 -6
  122. package/dist/condition/condition.parser.d.ts +0 -10
  123. package/dist/condition/condition.parser.js +1 -7
  124. package/dist/condition/condition.schema.d.ts +0 -16
  125. package/dist/condition/condition.types.d.ts +0 -3
  126. package/dist/data-srd/index.generated.js +1 -146
  127. package/dist/dnd/amount-text.d.ts +4 -27
  128. package/dist/dnd/amount-text.js +1 -13
  129. package/dist/dnd/constants.d.ts +0 -18
  130. package/dist/dnd/constants.js +1 -42
  131. package/dist/dnd/formula-tags.d.ts +0 -2
  132. package/dist/dnd/formula-tags.js +1 -119
  133. package/dist/dnd/math.d.ts +0 -26
  134. package/dist/dnd/math.js +1 -45
  135. package/dist/dnd/prose-tags.d.ts +1 -15
  136. package/dist/dnd/prose-tags.js +1 -18
  137. package/dist/dnd/resource-die.d.ts +0 -4
  138. package/dist/dnd/resource-die.js +1 -17
  139. package/dist/dnd/resource-formula.d.ts +0 -43
  140. package/dist/dnd/resource-formula.js +1 -14
  141. package/dist/dnd/resource-words.d.ts +0 -2
  142. package/dist/dnd/resource-words.js +1 -30
  143. package/dist/dnd/srd-tag-converter.d.ts +0 -21
  144. package/dist/dnd/srd-tag-converter.js +1 -12
  145. package/dist/dnd/tag-grammar.js +1 -12
  146. package/dist/dnd/warn-once.js +1 -8
  147. package/dist/encounter/encounter.ai-schema.js +1 -8
  148. package/dist/entities/base-item-resolver.d.ts +0 -26
  149. package/dist/entities/base-item-resolver.js +1 -11
  150. package/dist/entities/registry-revision.d.ts +10 -0
  151. package/dist/entities/registry-revision.js +1 -0
  152. package/dist/entities/slug.d.ts +1 -31
  153. package/dist/entities/slug.js +1 -12
  154. package/dist/entities/wikilink-display.d.ts +0 -2
  155. package/dist/entities/wikilink-display.js +1 -10
  156. package/dist/feat/feat.category-codes.d.ts +1 -26
  157. package/dist/feat/feat.category-codes.js +1 -14
  158. package/dist/feat/feat.codec.d.ts +0 -6
  159. package/dist/feat/feat.codec.js +1 -12
  160. package/dist/feat/feat.parser.js +1 -11
  161. package/dist/feat/feat.schema.d.ts +31 -1
  162. package/dist/feat/feat.schema.js +1 -10
  163. package/dist/feat/feat.types.d.ts +0 -6
  164. package/dist/index.js +45 -138113
  165. package/dist/inline-tag-parser.js +1 -6
  166. package/dist/item/item.actions-map.d.ts +4 -63
  167. package/dist/item/item.actions-map.js +1 -10
  168. package/dist/item/item.ai-schema.js +1 -6
  169. package/dist/item/item.attunement.d.ts +0 -14
  170. package/dist/item/item.attunement.js +1 -6
  171. package/dist/item/item.bonuses.js +1 -10
  172. package/dist/item/item.codec.js +1 -9
  173. package/dist/item/item.conditions.d.ts +0 -7
  174. package/dist/item/item.conditions.js +1 -11
  175. package/dist/item/item.conditions.types.d.ts +0 -2
  176. package/dist/item/item.cost.js +1 -29
  177. package/dist/item/item.enrichment.js +1 -9
  178. package/dist/item/item.icon.d.ts +0 -8
  179. package/dist/item/item.icon.js +1 -211
  180. package/dist/item/item.parser.js +1 -8
  181. package/dist/item/item.schema.d.ts +2 -0
  182. package/dist/item/item.schema.js +1 -11
  183. package/dist/item/item.types.d.ts +2 -28
  184. package/dist/monster/monster.ai-schema.js +1 -6
  185. package/dist/monster/monster.codec.d.ts +0 -10
  186. package/dist/monster/monster.enrichment.js +1 -19
  187. package/dist/monster/monster.format.d.ts +0 -69
  188. package/dist/monster/monster.format.js +1 -78
  189. package/dist/monster/monster.parser.d.ts +0 -4
  190. package/dist/monster/monster.parser.js +1 -15
  191. package/dist/monster/monster.resolve.d.ts +0 -4
  192. package/dist/monster/monster.schema.d.ts +0 -9
  193. package/dist/monster/monster.schema.js +1 -34
  194. package/dist/monster/monster.types.d.ts +0 -3
  195. package/dist/monster/monster.types.js +1 -1
  196. package/dist/optional-feature/optional-feature.codec.d.ts +0 -11
  197. package/dist/optional-feature/optional-feature.codec.js +1 -13
  198. package/dist/optional-feature/optional-feature.parser.js +1 -12
  199. package/dist/optional-feature/optional-feature.schema.d.ts +30 -1
  200. package/dist/optional-feature/optional-feature.schema.js +1 -15
  201. package/dist/pack.d.ts +0 -9
  202. package/dist/pc/conditions.constants.js +1 -6
  203. package/dist/pc/decision-recognizer.js +1 -8
  204. package/dist/pc/pc.additional-spells.d.ts +4 -14
  205. package/dist/pc/pc.additional-spells.js +1 -23
  206. package/dist/pc/pc.amount-bindings.d.ts +4 -20
  207. package/dist/pc/pc.amount-bindings.js +1 -23
  208. package/dist/pc/pc.asi-flatten.d.ts +0 -59
  209. package/dist/pc/pc.asi-flatten.js +1 -16
  210. package/dist/pc/pc.conditions.d.ts +1 -0
  211. package/dist/pc/pc.conditions.js +1 -6
  212. package/dist/pc/pc.containment.d.ts +0 -5
  213. package/dist/pc/pc.containment.js +1 -24
  214. package/dist/pc/pc.decision-engine.d.ts +4 -141
  215. package/dist/pc/pc.decision-engine.js +1 -52
  216. package/dist/pc/pc.defense-normalize.d.ts +0 -10
  217. package/dist/pc/pc.defense-normalize.js +1 -6
  218. package/dist/pc/pc.entry-overrides.d.ts +0 -58
  219. package/dist/pc/pc.entry-overrides.js +1 -40
  220. package/dist/pc/pc.equipment.d.ts +2 -22
  221. package/dist/pc/pc.equipment.js +1 -33
  222. package/dist/pc/pc.feature-effects.d.ts +23 -275
  223. package/dist/pc/pc.feature-effects.js +1 -26
  224. package/dist/pc/pc.formula-context.js +1 -11
  225. package/dist/pc/pc.infusions.d.ts +0 -65
  226. package/dist/pc/pc.infusions.js +1 -64
  227. package/dist/pc/pc.item-effects.d.ts +18 -0
  228. package/dist/pc/pc.member-choices.d.ts +18 -49
  229. package/dist/pc/pc.member-choices.js +1 -32
  230. package/dist/pc/pc.parser.js +1 -58
  231. package/dist/pc/pc.pools.d.ts +7 -10
  232. package/dist/pc/pc.pools.js +1 -26
  233. package/dist/pc/pc.proficiencies.d.ts +7 -33
  234. package/dist/pc/pc.proficiencies.js +1 -107
  235. package/dist/pc/pc.proficiency-grants.d.ts +0 -26
  236. package/dist/pc/pc.proficiency-normalize.d.ts +4 -25
  237. package/dist/pc/pc.proficiency-normalize.js +1 -12
  238. package/dist/pc/pc.proficiency-query.d.ts +0 -13
  239. package/dist/pc/pc.proficiency-query.js +1 -27
  240. package/dist/pc/pc.recalc.d.ts +7 -131
  241. package/dist/pc/pc.recalc.js +1 -946
  242. package/dist/pc/pc.resolver.d.ts +0 -104
  243. package/dist/pc/pc.resolver.js +1 -59
  244. package/dist/pc/pc.resource-seed.d.ts +0 -8
  245. package/dist/pc/pc.resource-seed.js +1 -42
  246. package/dist/pc/pc.resources.d.ts +1 -59
  247. package/dist/pc/pc.resources.js +1 -23
  248. package/dist/pc/pc.rest.d.ts +1 -20
  249. package/dist/pc/pc.rest.js +1 -230
  250. package/dist/pc/pc.schema.d.ts +19 -2
  251. package/dist/pc/pc.schema.js +1 -9
  252. package/dist/pc/pc.slotting.d.ts +0 -29
  253. package/dist/pc/pc.slotting.js +1 -28
  254. package/dist/pc/pc.speeds.d.ts +19 -0
  255. package/dist/pc/pc.spell-scope.d.ts +6 -0
  256. package/dist/pc/pc.spellcasting.d.ts +0 -70
  257. package/dist/pc/pc.spellcasting.js +1 -28
  258. package/dist/pc/pc.table-column.d.ts +0 -22
  259. package/dist/pc/pc.table-column.js +1 -18
  260. package/dist/pc/pc.tool-picks.d.ts +0 -27
  261. package/dist/pc/pc.tool-picks.js +1 -18
  262. package/dist/pc/pc.types.d.ts +85 -344
  263. package/dist/pc/pc.weapon-grant.d.ts +0 -6
  264. package/dist/pc/pool-layout.d.ts +0 -39
  265. package/dist/pc/pool-layout.js +1 -18
  266. package/dist/pc/resource-equivalents.d.ts +2 -40
  267. package/dist/pc/roll-scope.js +1 -8
  268. package/dist/pc/roll-tag-labels.d.ts +0 -32
  269. package/dist/pc/roll-tag-labels.js +1 -17
  270. package/dist/pc/spell-source.d.ts +0 -11
  271. package/dist/pc/spell-source.js +1 -8
  272. package/dist/race/race.codec.d.ts +0 -6
  273. package/dist/race/race.codec.js +1 -15
  274. package/dist/race/race.parser.js +1 -14
  275. package/dist/race/race.schema.d.ts +0 -8
  276. package/dist/race/race.schema.js +1 -14
  277. package/dist/race/race.structural.d.ts +0 -6
  278. package/dist/race/race.structural.js +1 -6
  279. package/dist/race/race.types.d.ts +0 -8
  280. package/dist/schemas/attack-schema.d.ts +5 -0
  281. package/dist/schemas/caster-type-schema.d.ts +1 -6
  282. package/dist/schemas/caster-type-schema.js +1 -6
  283. package/dist/schemas/choice-schema.js +1 -7
  284. package/dist/schemas/duration-schema.d.ts +0 -2
  285. package/dist/schemas/duration-schema.js +1 -6
  286. package/dist/schemas/entity-extras-schema.d.ts +0 -30
  287. package/dist/schemas/entity-extras-schema.js +1 -10
  288. package/dist/schemas/equipment-grant-schema.d.ts +0 -2
  289. package/dist/schemas/equipment-grant-schema.js +1 -12
  290. package/dist/schemas/feature-alias.d.ts +0 -27
  291. package/dist/schemas/feature-effect-schema.d.ts +30 -1
  292. package/dist/schemas/feature-effect-schema.js +1 -6
  293. package/dist/schemas/feature-schema.d.ts +0 -6
  294. package/dist/schemas/feature-schema.js +1 -12
  295. package/dist/schemas/resource-schema.d.ts +1 -34
  296. package/dist/schemas/resource-schema.js +1 -12
  297. package/dist/schemas/selection-pool-schema.js +1 -10
  298. package/dist/spell/casting-time.d.ts +0 -15
  299. package/dist/spell/casting-time.js +1 -6
  300. package/dist/spell/spell.access.d.ts +0 -6
  301. package/dist/spell/spell.access.js +1 -45
  302. package/dist/spell/spell.ai-schema.js +1 -6
  303. package/dist/spell/spell.codec.js +1 -9
  304. package/dist/spell/spell.enrichment.js +1 -9
  305. package/dist/spell/spell.filter.d.ts +0 -5
  306. package/dist/spell/spell.filter.js +1 -75
  307. package/dist/spell/spell.parser.d.ts +0 -31
  308. package/dist/spell/spell.parser.js +1 -16
  309. package/dist/spell/spell.scaling.d.ts +0 -46
  310. package/dist/spell/spell.scaling.js +1 -79
  311. package/dist/spell/spell.schema.js +1 -7
  312. package/dist/spell/spell.types.d.ts +0 -7
  313. package/dist/srd/retired-items.d.ts +0 -4
  314. package/dist/srd/retired-items.js +1 -11
  315. package/dist/srd-store.d.ts +0 -33
  316. package/dist/subclass/subclass.codec.d.ts +0 -8
  317. package/dist/subclass/subclass.codec.js +1 -17
  318. package/dist/subclass/subclass.parser.js +1 -16
  319. package/dist/subclass/subclass.schema.d.ts +2 -1
  320. package/dist/subclass/subclass.schema.js +1 -14
  321. package/dist/subclass/subclass.types.d.ts +0 -3
  322. package/dist/types/attack.d.ts +2 -0
  323. package/dist/types/casting-option.d.ts +0 -4
  324. package/dist/types/choice.d.ts +1 -72
  325. package/dist/types/choice.js +1 -24
  326. package/dist/types/edition.d.ts +0 -3
  327. package/dist/types/equipment-grant.d.ts +1 -27
  328. package/dist/types/equipment-grant.js +1 -12
  329. package/dist/types/feature-effect.d.ts +14 -14
  330. package/dist/types/feature.d.ts +0 -22
  331. package/dist/types/optional-feature.types.d.ts +1 -31
  332. package/dist/types/resource.d.ts +1 -21
  333. package/dist/types/selection-pool.d.ts +0 -24
  334. package/dist/weapon/weapon-mastery.d.ts +0 -1
  335. package/dist/weapon/weapon.classify.d.ts +0 -11
  336. package/dist/weapon/weapon.classify.js +1 -7
  337. package/dist/weapon/weapon.codec.d.ts +0 -9
  338. package/dist/weapon/weapon.codec.js +1 -9
  339. package/dist/weapon/weapon.parser.js +1 -8
  340. package/dist/weapon/weapon.schema.js +1 -7
  341. package/dist/weapon/weapon.types.d.ts +0 -3
  342. package/package.json +3 -3
  343. package/src/data-srd/ATTRIBUTION.md +1 -1
  344. package/dist/chunk-2FRUSVZS.js +0 -489
  345. package/dist/chunk-2JSQE3DD.js +0 -206
  346. package/dist/chunk-2LULMQTF.js +0 -14
  347. package/dist/chunk-2UDSN6VW.js +0 -18
  348. package/dist/chunk-3LWMFYKS.js +0 -57
  349. package/dist/chunk-3MGQFFNE.js +0 -110
  350. package/dist/chunk-3TM34RSJ.js +0 -23
  351. package/dist/chunk-3VZZDKRA.js +0 -1014
  352. package/dist/chunk-4U55VNC7.js +0 -22
  353. package/dist/chunk-5GKJAUMX.js +0 -59
  354. package/dist/chunk-5MXFW4O3.js +0 -71
  355. package/dist/chunk-656QCX4U.js +0 -22
  356. package/dist/chunk-6EI737IO.js +0 -19
  357. package/dist/chunk-6GNXYAYP.js +0 -25
  358. package/dist/chunk-6PXTNCBP.js +0 -133
  359. package/dist/chunk-6X2NV665.js +0 -33
  360. package/dist/chunk-7ATNGKBS.js +0 -178
  361. package/dist/chunk-7Q2VPKCD.js +0 -181
  362. package/dist/chunk-7QN7XSAK.js +0 -19
  363. package/dist/chunk-A54HHCWW.js +0 -67
  364. package/dist/chunk-AZRGFUSR.js +0 -18
  365. package/dist/chunk-B3DP42OM.js +0 -55
  366. package/dist/chunk-CJYCVNW2.js +0 -7
  367. package/dist/chunk-CM5CWO4K.js +0 -735
  368. package/dist/chunk-DEEHHLAP.js +0 -271
  369. package/dist/chunk-DOXSFYLH.js +0 -158
  370. package/dist/chunk-DPUJDOKV.js +0 -365
  371. package/dist/chunk-EJP263OP.js +0 -186
  372. package/dist/chunk-EVMUJYUD.js +0 -195
  373. package/dist/chunk-EYX4JMAU.js +0 -101
  374. package/dist/chunk-FANQVQ3D.js +0 -89
  375. package/dist/chunk-FC4IGH5Y.js +0 -18
  376. package/dist/chunk-G6MHJDVT.js +0 -41
  377. package/dist/chunk-G6PBI2BU.js +0 -18
  378. package/dist/chunk-H5PTKYXL.js +0 -101
  379. package/dist/chunk-HHBD4SQ6.js +0 -24
  380. package/dist/chunk-HS6FIOLP.js +0 -52
  381. package/dist/chunk-HTYMW5CH.js +0 -228
  382. package/dist/chunk-IHE6KVC3.js +0 -13
  383. package/dist/chunk-IN4M4X7P.js +0 -34
  384. package/dist/chunk-IUAAXXNO.js +0 -58
  385. package/dist/chunk-JCMUVZIK.js +0 -133
  386. package/dist/chunk-JSM6JFZR.js +0 -709
  387. package/dist/chunk-K5NJBTE2.js +0 -18
  388. package/dist/chunk-KR6JF3BF.js +0 -14
  389. package/dist/chunk-KSTV7J2U.js +0 -112
  390. package/dist/chunk-KU3YLF6D.js +0 -106
  391. package/dist/chunk-LBEXLN6I.js +0 -91
  392. package/dist/chunk-LF5AGJA4.js +0 -81
  393. package/dist/chunk-LHZXYFBU.js +0 -94
  394. package/dist/chunk-LSLSG67V.js +0 -31
  395. package/dist/chunk-LVQLWRCU.js +0 -15
  396. package/dist/chunk-MBX25B6D.js +0 -18
  397. package/dist/chunk-MYY2C5MB.js +0 -233
  398. package/dist/chunk-OFCSP6MT.js +0 -23
  399. package/dist/chunk-ONTGZR5T.js +0 -1806
  400. package/dist/chunk-OOSRUJBI.js +0 -19
  401. package/dist/chunk-PDJSUH24.js +0 -110
  402. package/dist/chunk-PKX6TGRE.js +0 -93
  403. package/dist/chunk-PQZ4LM4Z.js +0 -19
  404. package/dist/chunk-PTXBIDG7.js +0 -63
  405. package/dist/chunk-PVCEA4HZ.js +0 -6
  406. package/dist/chunk-PXVNAY7T.js +0 -84
  407. package/dist/chunk-QH36K2PU.js +0 -158
  408. package/dist/chunk-QS5L5YTJ.js +0 -24
  409. package/dist/chunk-QYZV2MQA.js +0 -97
  410. package/dist/chunk-QZSWN2KT.js +0 -18
  411. package/dist/chunk-RLGQ5PZZ.js +0 -16
  412. package/dist/chunk-RYLXAYIQ.js +0 -18
  413. package/dist/chunk-S3YUXDSC.js +0 -278
  414. package/dist/chunk-S7REMWW4.js +0 -21
  415. package/dist/chunk-T6QIF5XR.js +0 -348
  416. package/dist/chunk-TOM66P2P.js +0 -38
  417. package/dist/chunk-TULQ4FFX.js +0 -353
  418. package/dist/chunk-UA5KS2PL.js +0 -26
  419. package/dist/chunk-UUBJCNQU.js +0 -187
  420. package/dist/chunk-UZXG6QSY.js +0 -58
  421. package/dist/chunk-VPYBK2MG.js +0 -18
  422. package/dist/chunk-VRV3NNTA.js +0 -161
  423. package/dist/chunk-VTTA2ALZ.js +0 -16
  424. package/dist/chunk-W6GC6OKK.js +0 -16
  425. package/dist/chunk-WELIKLZF.js +0 -256
  426. package/dist/chunk-WSVMLNTO.js +0 -31
  427. package/dist/chunk-WYGD2UGN.js +0 -14
  428. package/dist/chunk-XCFC7LGF.js +0 -122
  429. package/dist/chunk-XJ2F2WO6.js +0 -8
  430. package/dist/chunk-Y5VVP73C.js +0 -23
  431. package/dist/chunk-YBLDE5CG.js +0 -42
  432. package/dist/chunk-YD2VAHA6.js +0 -159
  433. package/dist/chunk-YDGMBMYI.js +0 -25
  434. package/dist/chunk-YHYTW5QA.js +0 -20
  435. package/dist/chunk-YKL6SHRJ.js +0 -23
  436. package/dist/chunk-ZCTUYGNV.js +0 -26
  437. package/dist/chunk-ZDAEGJH4.js +0 -102
  438. package/dist/chunk-ZJXSXVFP.js +0 -58
  439. package/dist/chunk-ZUQW5VBZ.js +0 -89
@@ -1,271 +0,0 @@
1
- import {
2
- abilityModifier
3
- } from "./chunk-PDJSUH24.js";
4
-
5
- // src/dnd/srd-tag-converter.ts
6
- var ABILITY_KEYS = ["str", "dex", "con", "int", "wis", "cha"];
7
- var STATIC_FALLBACK_CONTEXT = {
8
- abilities: { str: 0, dex: 0, con: 0, int: 0, wis: 0, cha: 0 },
9
- profBonus: 0,
10
- actionName: "",
11
- actionCategory: "trait"
12
- };
13
- var NATURAL_MELEE_NAMES = /\b(bite|claws?|slam|gore|tail|hooves|tusks?|talons?|fist|horns?)\b/i;
14
- var FINESSE_WEAPON_NAMES = /\b(shortsword|rapier|dagger|whip|scimitar)\b/i;
15
- var RANGED_WEAPON_NAMES = /\b(bow|crossbow|sling|dart|blowgun|javelin)\b/i;
16
- var SPELL_ATTACK_PHRASES = /\bspell\s+attack\b/i;
17
- function preferredAbilitiesForAttack(actionName, desc, spellAbility) {
18
- const combined = `${actionName} ${desc}`;
19
- if (SPELL_ATTACK_PHRASES.test(combined) && spellAbility) return [spellAbility];
20
- if (RANGED_WEAPON_NAMES.test(actionName)) return ["dex"];
21
- if (FINESSE_WEAPON_NAMES.test(actionName)) return ["str", "dex"];
22
- if (NATURAL_MELEE_NAMES.test(actionName)) return ["str", "dex"];
23
- return ["str", "dex"];
24
- }
25
- function identifyAbility(damageBonus, preferred, mods) {
26
- if (damageBonus === null) return null;
27
- const candidates = ABILITY_KEYS.filter((k) => mods[k] === damageBonus);
28
- if (candidates.length === 0) return null;
29
- if (candidates.length === 1) return candidates[0];
30
- for (const p of preferred) {
31
- if (candidates.includes(p)) return p;
32
- }
33
- return [...candidates].sort()[0];
34
- }
35
- function parseDamageBonusFromHitText(desc, attackPos) {
36
- const window = desc.slice(attackPos, attackPos + 250);
37
- const damageRe = /Hit:\s*(?:\d+\s*\()?\d+d\d+(?:\s*([+-])\s*(\d+))?\s*\)?\s*\w*\s+damage/i;
38
- const m = window.match(damageRe);
39
- if (!m) return null;
40
- if (m[1] === void 0 || m[2] === void 0) return 0;
41
- return m[1] === "-" ? -Number(m[2]) : Number(m[2]);
42
- }
43
- function parseDamageBonusFor2024(desc, attackPos) {
44
- const window = desc.slice(attackPos, attackPos + 250);
45
- const damageRe = /(?:\d+\s*\()?\d+d\d+(?:\s*([+-])\s*(\d+))?\s*\)?\s*\w*\s+damage/i;
46
- const m = window.match(damageRe);
47
- if (!m) return null;
48
- if (m[1] === void 0 || m[2] === void 0) return 0;
49
- return m[1] === "-" ? -Number(m[2]) : Number(m[2]);
50
- }
51
- function convertDescToTags(desc, ctx) {
52
- try {
53
- if (!ctx.abilities) return desc;
54
- const mods = computeMods(ctx.abilities);
55
- const dcTargets = computeDcTargets(mods, ctx.profBonus);
56
- let result = desc;
57
- result = result.replace(
58
- /(Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma)\s+Saving\s+Throw:\s+DC\s+(\d+)/gi,
59
- (_match, abilityWord, n) => {
60
- const dc = Number(n);
61
- const abil = abilityWordToKey(abilityWord);
62
- if (abil && dcTargets[abil] === dc) {
63
- return `${abilityWord} Saving Throw: \`dc:${abil.toUpperCase()}\``;
64
- }
65
- return `${abilityWord} Saving Throw: \`dc:${dc}\``;
66
- }
67
- );
68
- result = result.replace(
69
- /DC (\d+)\s+(Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma)/gi,
70
- (_match, n, abilityWord) => {
71
- const dc = Number(n);
72
- const abil = abilityWordToKey(abilityWord);
73
- if (abil && dcTargets[abil] === dc) {
74
- return `\`dc:${abil.toUpperCase()}\` ${abilityWord}`;
75
- }
76
- return `\`dc:${dc}\` ${abilityWord}`;
77
- }
78
- );
79
- result = result.replace(
80
- /(Melee|Ranged|Spell)\s+Attack\s+Roll:\s+([+-])(\d+),/g,
81
- (match, kind, sign, n, offset) => {
82
- const attackBonus = sign === "-" ? -Number(n) : Number(n);
83
- const before = desc.slice(Math.max(0, offset - 200), offset);
84
- const actionMatch = before.match(/(?:^|\.\s+)([A-Z][\w\s,'-]{1,40})\./);
85
- const actionName = actionMatch ? actionMatch[1] : ctx.actionName;
86
- const damageBonus = parseDamageBonusFor2024(desc, offset + match.length);
87
- const preferred = kind.toLowerCase() === "spell" && ctx.spellAbility ? [ctx.spellAbility] : preferredAbilitiesForAttack(actionName, desc, ctx.spellAbility);
88
- const ability = identifyAbility(damageBonus, preferred, mods);
89
- const literal = attackBonus >= 0 ? `+${attackBonus}` : `${attackBonus}`;
90
- if (ability === null) {
91
- return `${kind} Attack Roll: \`atk:${literal}\`,`;
92
- }
93
- if (attackBonus === mods[ability] + ctx.profBonus) {
94
- return `${kind} Attack Roll: \`atk:${ability.toUpperCase()}+PB\`,`;
95
- }
96
- if (attackBonus === mods[ability]) {
97
- return `${kind} Attack Roll: \`atk:${ability.toUpperCase()}\`,`;
98
- }
99
- return `${kind} Attack Roll: \`atk:${literal}\`,`;
100
- }
101
- );
102
- result = result.replace(
103
- /([+-])(\d+)\s+to\s+hit/g,
104
- (_match, sign, n, attackPos) => {
105
- const attackBonus = sign === "-" ? -Number(n) : Number(n);
106
- const before = desc.slice(Math.max(0, attackPos - 200), attackPos);
107
- const actionMatch = before.match(/(?:^|\.\s+)([A-Z][\w\s,'-]{1,40})\./);
108
- const actionName = actionMatch ? actionMatch[1] : ctx.actionName;
109
- const damageBonus = parseDamageBonusFromHitText(desc, attackPos);
110
- const preferred = preferredAbilitiesForAttack(actionName, desc, ctx.spellAbility);
111
- const ability = identifyAbility(damageBonus, preferred, mods);
112
- if (ability === null) {
113
- const literal2 = attackBonus >= 0 ? `+${attackBonus}` : `${attackBonus}`;
114
- return `\`atk:${literal2}\``;
115
- }
116
- if (attackBonus === mods[ability] + ctx.profBonus) {
117
- return `\`atk:${ability.toUpperCase()}+PB\``;
118
- }
119
- if (attackBonus === mods[ability]) {
120
- return `\`atk:${ability.toUpperCase()}\``;
121
- }
122
- const literal = attackBonus >= 0 ? `+${attackBonus}` : `${attackBonus}`;
123
- return `\`atk:${literal}\``;
124
- }
125
- );
126
- result = result.replace(
127
- /(?:(\d+)\s*\()?(\d+d\d+)(?:\s*([+-])\s*(\d+))?\s*\)?(?:\s+(\w+))?\s+damage/gi,
128
- (_match, _average, dice, sign, bonusStr, typeWord) => {
129
- var _a;
130
- let inner = dice;
131
- if (bonusStr != null) {
132
- const bonus = sign === "-" ? -Number(bonusStr) : Number(bonusStr);
133
- const matchingAbilities = ABILITY_KEYS.filter((k) => mods[k] === bonus);
134
- if (matchingAbilities.length > 0) {
135
- const preferred = preferredAbilitiesForAttack(ctx.actionName, "", ctx.spellAbility);
136
- const pick = (_a = preferred.find((p) => matchingAbilities.includes(p))) != null ? _a : [...matchingAbilities].sort()[0];
137
- inner = `${dice}+${pick.toUpperCase()}`;
138
- } else {
139
- inner = `${dice}${bonus >= 0 ? "+" : ""}${bonus}`;
140
- }
141
- }
142
- const typeSuffix = typeWord ? ` ${typeWord} damage` : " damage";
143
- return `\`dmg:${inner}\`${typeSuffix}`;
144
- }
145
- );
146
- result = result.replace(
147
- /Hit:\s*(\d+)\s+(\w+)?\s*damage/gi,
148
- (_match, n, typeWord) => {
149
- const tt = typeWord ? ` ${typeWord} damage` : " damage";
150
- return `Hit: \`dmg:${n}\`${tt}`;
151
- }
152
- );
153
- result = result.replace(
154
- /(?<!`)DC (\d+)(?!\s*(?:Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma))/gi,
155
- (_match, n) => {
156
- const dc = Number(n);
157
- const candidates = ABILITY_KEYS.filter((k) => dcTargets[k] === dc);
158
- if (ctx.spellAbility && candidates.includes(ctx.spellAbility)) {
159
- return `\`dc:${ctx.spellAbility.toUpperCase()}\``;
160
- }
161
- if (candidates.length === 1) {
162
- return `\`dc:${candidates[0].toUpperCase()}\``;
163
- }
164
- if (candidates.length > 1) {
165
- const abil = disambiguateAbility(candidates, ctx, desc);
166
- return `\`dc:${abil.toUpperCase()}\``;
167
- }
168
- return `\`dc:${dc}\``;
169
- }
170
- );
171
- result = result.replace(
172
- /`[^`]*`|(?<!\w)(\d+d\d+(?:\s*[+-]\s*\d+)?)(?!\w)/g,
173
- (match, dice) => {
174
- if (dice) return `\`dice:${dice.replace(/\s+/g, "")}\``;
175
- return match;
176
- }
177
- );
178
- return result;
179
- } catch (e) {
180
- return desc;
181
- }
182
- }
183
- function computeMods(abilities) {
184
- return {
185
- str: abilityModifier(abilities.str),
186
- dex: abilityModifier(abilities.dex),
187
- con: abilityModifier(abilities.con),
188
- int: abilityModifier(abilities.int),
189
- wis: abilityModifier(abilities.wis),
190
- cha: abilityModifier(abilities.cha)
191
- };
192
- }
193
- function computeDcTargets(mods, profBonus) {
194
- return {
195
- str: 8 + profBonus + mods.str,
196
- dex: 8 + profBonus + mods.dex,
197
- con: 8 + profBonus + mods.con,
198
- int: 8 + profBonus + mods.int,
199
- wis: 8 + profBonus + mods.wis,
200
- cha: 8 + profBonus + mods.cha
201
- };
202
- }
203
- function disambiguateAbility(candidates, ctx, desc) {
204
- var _a, _b, _c, _d, _e, _f, _g, _h;
205
- if (candidates.length === 1) return candidates[0];
206
- const combined = `${desc} ${ctx.actionName}`.toLowerCase();
207
- const prefers = (abil) => candidates.includes(abil) ? abil : void 0;
208
- if (/melee\s+or\s+ranged\s+weapon\s+attack/.test(combined)) {
209
- return (_b = (_a = prefers("str")) != null ? _a : prefers("dex")) != null ? _b : candidates[0];
210
- }
211
- if (/melee\s+weapon\s+attack/.test(combined)) {
212
- return (_d = (_c = prefers("str")) != null ? _c : prefers("dex")) != null ? _d : candidates[0];
213
- }
214
- if (/ranged\s+weapon\s+attack/.test(combined)) {
215
- return (_e = prefers("dex")) != null ? _e : candidates[0];
216
- }
217
- if (/spell\s+attack/.test(combined)) {
218
- if (ctx.spellAbility && candidates.includes(ctx.spellAbility)) {
219
- return ctx.spellAbility;
220
- }
221
- return (_f = prefers("wis")) != null ? _f : candidates[0];
222
- }
223
- const rangedWords = /\b(bow|crossbow|dart|sling)\b/;
224
- const meleeWords = /\b(bite|claw|slam|tail|gore|horns?|fist|hoof|talons?)\b/;
225
- if (rangedWords.test(ctx.actionName.toLowerCase())) {
226
- return (_g = prefers("dex")) != null ? _g : candidates[0];
227
- }
228
- if (meleeWords.test(ctx.actionName.toLowerCase())) {
229
- return (_h = prefers("str")) != null ? _h : candidates[0];
230
- }
231
- return [...candidates].sort()[0];
232
- }
233
- function abilityWordToKey(word) {
234
- const lower = word.toLowerCase();
235
- switch (lower) {
236
- case "strength":
237
- return "str";
238
- case "dexterity":
239
- return "dex";
240
- case "constitution":
241
- return "con";
242
- case "intelligence":
243
- return "int";
244
- case "wisdom":
245
- return "wis";
246
- case "charisma":
247
- return "cha";
248
- }
249
- return void 0;
250
- }
251
- function detectSpellcastingAbility(traits) {
252
- if (!traits) return void 0;
253
- for (const trait of traits) {
254
- for (const entry of trait.entries) {
255
- const match = entry.match(/spellcasting ability is (intelligence|wisdom|charisma)/i);
256
- if (match) {
257
- const name = match[1].toLowerCase();
258
- if (name === "intelligence") return "int";
259
- if (name === "wisdom") return "wis";
260
- if (name === "charisma") return "cha";
261
- }
262
- }
263
- }
264
- return void 0;
265
- }
266
-
267
- export {
268
- STATIC_FALLBACK_CONTEXT,
269
- convertDescToTags,
270
- detectSpellcastingAbility
271
- };
@@ -1,158 +0,0 @@
1
- import {
2
- durationSchema
3
- } from "./chunk-WYGD2UGN.js";
4
- import {
5
- actionCostEnum,
6
- resetTriggerEnum,
7
- resourceConsumptionSchema
8
- } from "./chunk-ZJXSXVFP.js";
9
- import {
10
- choiceSchema
11
- } from "./chunk-5MXFW4O3.js";
12
- import {
13
- featureEffectSchema
14
- } from "./chunk-2JSQE3DD.js";
15
- import {
16
- additionalSpellsEntrySchema,
17
- imageField,
18
- progressionSchema
19
- } from "./chunk-UA5KS2PL.js";
20
-
21
- // src/optional-feature/optional-feature.schema.ts
22
- import { z } from "zod";
23
- var editionEnum = z.enum(["2014", "2024"]);
24
- var abilityEnum = z.enum(["str", "dex", "con", "int", "wis", "cha"]);
25
- var wikilinkRegex = /^\[\[[^[\]]+\]\]$/;
26
- var namedRefSchema = z.object({ name: z.string().min(1), source: z.string().min(1).optional(), visible_stats: z.boolean().optional() });
27
- var prerequisiteSchema = z.discriminatedUnion("kind", [
28
- z.object({ kind: z.literal("level"), min: z.number().int().positive(), class: namedRefSchema.optional(), subclass: namedRefSchema.optional() }),
29
- z.object({ kind: z.literal("spell-known"), spell: z.string().regex(wikilinkRegex) }),
30
- z.object({ kind: z.literal("pact"), pact: z.enum(["tome", "blade", "chain", "talisman"]) }),
31
- z.object({ kind: z.literal("class"), class: z.string().regex(wikilinkRegex) }),
32
- z.object({ kind: z.literal("ability"), ability: abilityEnum, min: z.number().int().positive() }),
33
- z.object({ kind: z.literal("other"), detail: z.string() }),
34
- z.object({ kind: z.literal("optionalfeature"), optionalfeature: z.string().regex(wikilinkRegex) }),
35
- z.object({ kind: z.literal("spell-choose"), choose: z.string().min(1), entry: z.string().optional(), entry_summary: z.string().optional() })
36
- ]);
37
- var usesSchema = z.object({
38
- max: z.union([z.number(), z.string()]),
39
- recharge: resetTriggerEnum,
40
- /** Partial recovery, for a pool a rest does NOT fully refill (a sanity track that regains 1 per long
41
- * rest). Same shape a feature's `resources[].recovery` uses, so `ResolvedResource.recovery` — which
42
- * has carried the field since R4-G4 — is populated identically from either side. Optional: all 35
43
- * shipped `uses` carriers omit it and parse unchanged. */
44
- recovery: z.array(z.object({
45
- id: z.string().min(1),
46
- name: z.string().min(1),
47
- amount: z.union([z.number(), z.string()]),
48
- reset: resetTriggerEnum,
49
- restores: z.enum(["uses", "spell-slots"]).optional()
50
- })).optional()
51
- });
52
- var filterSpecSchema = z.object({
53
- rarity: z.array(z.string().min(1)).min(1),
54
- types: z.array(z.string().min(1)).optional(),
55
- exclude_types: z.array(z.string().min(1)).optional(),
56
- cursed: z.literal(false).optional()
57
- }).strict();
58
- var optionCreatesSchema = z.object({
59
- item: z.string().regex(wikilinkRegex).optional(),
60
- variant: z.object({ candidates: z.array(z.string().regex(wikilinkRegex)).min(1) }).strict().optional(),
61
- filter: filterSpecSchema.optional()
62
- }).strict().refine((c) => [c.item, c.variant, c.filter].filter((a) => a !== void 0).length === 1, { message: "creates needs exactly one of item, variant, filter" });
63
- var optionRowSchema = z.object({
64
- key: z.string().regex(/^[a-z0-9][a-z0-9._-]*$/, "an option key is lower-case, with no '#' and no whitespace"),
65
- name: z.string().min(1),
66
- min_level: z.number().int().min(1).max(20),
67
- attunement: z.boolean().optional(),
68
- creates: optionCreatesSchema
69
- }).strict();
70
- var infuseItemSchema = z.object({
71
- bonuses: z.object({
72
- ac: z.number().int().optional(),
73
- weapon_attack: z.number().int().optional(),
74
- weapon_damage: z.number().int().optional(),
75
- spell_attack: z.number().int().optional(),
76
- saving_throws: z.number().int().optional(),
77
- speed: z.object({ walk: z.number().int().optional(), fly: z.number().int().optional(), swim: z.number().int().optional(), climb: z.number().int().optional() }).strict().optional()
78
- }).strict().optional(),
79
- resist: z.array(z.string().min(1)).optional(),
80
- charges: z.object({ max: z.number().int().min(1), dice: z.string().optional(), recharge: z.string().optional(), recharge_amount: z.string().optional() }).strict().optional(),
81
- action: actionCostEnum.optional(),
82
- // ART-c1 (R-3 a): the Actions row's range, as data (B-8.4 draws "Self").
83
- range: z.string().min(1).optional()
84
- }).strict();
85
- var infuseBlockSchema = z.object({
86
- targets: z.array(z.object({
87
- kind: z.enum(["armor", "shield", "weapon", "gear"]),
88
- category: z.array(z.string().min(1)).min(1).optional(),
89
- property: z.string().min(1).optional(),
90
- name_any: z.array(z.string().min(1)).min(1).optional()
91
- }).strict()).min(1),
92
- targets_label: z.string().min(1).optional(),
93
- new_object: z.string().min(1).optional(),
94
- rarity: z.string().min(1).optional(),
95
- attunement: z.object({ required: z.literal(true) }).strict().optional(),
96
- // ART-c1 (R-3 b): the damage types the choice offers (v1 U-4 draws the TCE ten); absent keeps dnd5e's canonical list.
97
- choice: z.object({ kind: z.literal("damage-type"), options: z.array(z.string().min(1)).min(1).optional() }).strict().optional(),
98
- item: infuseItemSchema.optional(),
99
- scales_at: z.array(z.object({ level: z.number().int().min(1).max(20), item: infuseItemSchema }).strict()).optional()
100
- }).strict().refine((b) => {
101
- var _a;
102
- return ((_a = b.scales_at) != null ? _a : []).every((r, i, a) => i === 0 || a[i - 1].level < r.level);
103
- }, { message: "scales_at levels ascend" });
104
- var optionalFeatureEntitySchema = z.object({
105
- slug: z.string().min(1),
106
- name: z.string().min(1),
107
- edition: editionEnum,
108
- source: z.string().min(1),
109
- feature_type: z.string().min(1),
110
- description: z.string(),
111
- prerequisites: z.array(prerequisiteSchema),
112
- available_to: z.array(z.string().regex(wikilinkRegex)),
113
- effects: z.array(featureEffectSchema),
114
- action_cost: actionCostEnum.nullable().optional(),
115
- uses: usesSchema.nullable().optional(),
116
- consumes: resourceConsumptionSchema.nullable().optional(),
117
- duration: durationSchema.nullable().optional(),
118
- passive: z.boolean().optional(),
119
- // Phase 3 activatable buffs: an activatable boon folds its effects only while
120
- // its slug is present in state.active_buffs (toggled in the PoolTab).
121
- activatable: z.boolean().optional(),
122
- rendering_hint: z.string().optional(),
123
- // the ONE root with load-bearing VALUES (88 records, G4's)
124
- /** WHERE this resource is drawn. `band` puts it in the header strip beside HP; anything else, and the
125
- * default, leaves it to the Resources tab. The tab ALWAYS lists every resource — it is the complete
126
- * inventory of what the character can spend, and a row missing from it would read as a bug — so this
127
- * key only ever ADDS a second, curated home. Opt-in on purpose: the band's whole value is being short,
128
- * which an opt-out flag would erode one new grant at a time. */
129
- surface: z.enum(["band", "tab"]).optional(),
130
- additional_spells: z.array(additionalSpellsEntrySchema).optional(),
131
- // 54
132
- is_class_feature_variant: z.boolean().optional(),
133
- // 25
134
- has_fluff_images: z.boolean().optional(),
135
- // 2
136
- feat_progression: z.array(progressionSchema).optional(),
137
- // 1
138
- optionalfeature_progression: z.array(progressionSchema).optional(),
139
- // 1
140
- image: imageField,
141
- repeatable: z.literal(true).optional(),
142
- item_choice: z.enum(["learn", "create"]).optional(),
143
- options: z.array(optionRowSchema).optional(),
144
- infuse: infuseBlockSchema.optional(),
145
- // D2b-A (design §2.2 step 1): a pool member's own choices, the vocabulary features and feats use.
146
- choices: z.array(choiceSchema).optional()
147
- }).superRefine((d, ctx) => {
148
- var _a;
149
- if (d.repeatable && (!d.options || !d.item_choice)) ctx.addIssue({ code: "custom", message: "a repeatable note needs options and item_choice" });
150
- const keys = ((_a = d.options) != null ? _a : []).map((o) => o.key);
151
- if (new Set(keys).size !== keys.length) ctx.addIssue({ code: "custom", message: "option keys are unique" });
152
- });
153
-
154
- export {
155
- optionRowSchema,
156
- infuseBlockSchema,
157
- optionalFeatureEntitySchema
158
- };