@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,355 +0,0 @@
1
- import {
2
- CONDITION_SLUGS
3
- } from "./chunk-S7REMWW4.js";
4
-
5
- // src/pc/pc.schema.ts
6
- import { z } from "zod";
7
- var conditionSlugEnum = z.enum(CONDITION_SLUGS);
8
- var abilityEnum = z.enum(["str", "dex", "con", "int", "wis", "cha"]);
9
- var skillEnum = z.enum([
10
- "acrobatics",
11
- "animal-handling",
12
- "arcana",
13
- "athletics",
14
- "deception",
15
- "history",
16
- "insight",
17
- "intimidation",
18
- "investigation",
19
- "medicine",
20
- "nature",
21
- "perception",
22
- "performance",
23
- "persuasion",
24
- "religion",
25
- "sleight-of-hand",
26
- "stealth",
27
- "survival"
28
- ]);
29
- var proficiencyTri = z.enum(["none", "proficient", "expertise"]);
30
- var slotEnum = z.enum(["mainhand", "offhand", "armor", "shield"]);
31
- var equipmentEntryOverridesSchema = z.object({
32
- name: z.string().optional(),
33
- bonus: z.number().int().optional(),
34
- damage_bonus: z.number().int().optional(),
35
- extra_damage: z.string().optional(),
36
- ac_bonus: z.number().int().optional(),
37
- action: z.enum(["action", "bonus-action", "reaction", "free", "special"]).optional(),
38
- range: z.string().optional(),
39
- // Per-instance defense arrays. The EquipmentEntryOverrides type declares
40
- // these and pc.equipment reads them into defenses, but the strict schema
41
- // used to omit them, so a file carrying one failed the WHOLE parse. Admitted
42
- // here so a per-instance resist/immune/vulnerable/condition_immune loads.
43
- resist: z.array(z.string()).optional(),
44
- immune: z.array(z.string()).optional(),
45
- vulnerable: z.array(z.string()).optional(),
46
- condition_immune: z.array(z.string()).optional(),
47
- // Scroll authoring: a per-instance spell payload (e.g. a Spell Scroll's spell)
48
- // plus the ability that governs its save DC / attack when cast from the scroll.
49
- spell: z.string().optional(),
50
- spell_ability: abilityEnum.optional()
51
- }).strict();
52
- var equipmentEntryStateSchema = z.object({
53
- charges: z.object({
54
- current: z.number().int().nonnegative(),
55
- max: z.number().int().nonnegative()
56
- }).optional(),
57
- recovery: z.object({
58
- amount: z.string(),
59
- reset: z.enum(["dawn", "short", "long", "special"])
60
- }).optional(),
61
- depletion_risk: z.object({
62
- trigger: z.string(),
63
- roll: z.string(),
64
- threshold: z.number().int(),
65
- effect: z.string()
66
- }).optional()
67
- }).strict();
68
- var entryRefField = z.preprocess(
69
- (v) => typeof v === "number" ? String(v) : typeof v === "string" && v.length > 0 ? v : void 0,
70
- z.string().optional()
71
- );
72
- var infusionMarkerSchema = z.object({
73
- kind: z.enum(["infused", "created"]),
74
- by: z.string().min(1),
75
- seq: z.number().int().min(1),
76
- choice: z.string().min(1).optional(),
77
- charges: z.object({ current: z.number().int().nonnegative() }).optional()
78
- });
79
- var equipmentEntrySchema = z.object({
80
- item: z.string().min(1),
81
- equipped: z.boolean().optional(),
82
- attuned: z.boolean().optional(),
83
- qty: z.number().int().positive().optional(),
84
- notes: z.string().optional(),
85
- slot: slotEnum.nullable().optional(),
86
- overrides: equipmentEntryOverridesSchema.optional(),
87
- state: equipmentEntryStateSchema.optional(),
88
- // Build-only provenance for Equipment-step-seeded gear (e.g. "builder:starting",
89
- // "builder:gold-buy"). Permissive plain string; stripped by finishBuild so a
90
- // finished file never carries it.
91
- granted_by: z.string().optional(),
92
- id: entryRefField,
93
- in: entryRefField,
94
- infusion: infusionMarkerSchema.optional()
95
- });
96
- var characterOverridesShape = z.object({
97
- scores: z.partialRecord(abilityEnum, z.number().int()).optional(),
98
- saves: z.partialRecord(abilityEnum, z.object({
99
- bonus: z.number().int().optional(),
100
- proficient: z.boolean().optional()
101
- })).optional(),
102
- skills: z.partialRecord(skillEnum, z.object({
103
- bonus: z.number().int(),
104
- proficiency: proficiencyTri.optional()
105
- })).optional(),
106
- passives: z.object({
107
- perception: z.number().int().optional(),
108
- investigation: z.number().int().optional(),
109
- insight: z.number().int().optional()
110
- }).partial().optional(),
111
- hp: z.object({
112
- max: z.number().int().positive().optional(),
113
- rolled: z.number().int().positive().optional(),
114
- modifier: z.number().int().optional()
115
- }).optional(),
116
- ac: z.number().int().optional(),
117
- speed: z.number().int().optional(),
118
- initiative: z.number().int().optional(),
119
- spellcasting_ability_by_class: z.record(z.string(), abilityEnum).optional(),
120
- // Character-level DC-ability fallback for own-ability-less spells (e.g. a Spell
121
- // Scroll cast by a non-caster). Same ability enum as the per-instance spell_ability.
122
- spellcasting_ability: abilityEnum.optional(),
123
- spell_slots: z.record(z.coerce.number().int(), z.number().int().nonnegative()).optional(),
124
- attunement_limit: z.number().int().nonnegative().optional(),
125
- /** Manual proficiency edits. `remove` SUPPRESSES a rules-granted entry ("a dwarf who doesn't know
126
- * dwarvish"). NOTHING here may carry a default, at either level, or an untouched note stops being
127
- * byte-identical:
128
- * - a `.default({})` on `languages`/`tools` materializes the key on every note that carries any
129
- * `overrides` block at all;
130
- * - a `.default([])` on `add`/`remove` materializes the sibling array whenever the parent key IS
131
- * present, which is every add-only entry the mutators write. (It cannot fire while the parent
132
- * is absent, but that is the uninteresting half of the case.)
133
- * That rule covers `tools.proficiency` too: no default at any of its three levels.
134
- * Every reader uses `?? []` (`?? {}` for the record). */
135
- languages: z.object({ add: z.array(z.string()).optional(), remove: z.array(z.string()).optional() }).optional(),
136
- tools: z.object({
137
- add: z.array(z.string()).optional(),
138
- remove: z.array(z.string()).optional(),
139
- /** R4-G4 §9.3 (UR1): a per-tool tri. An OPEN key space (tool names are not an enum, unlike
140
- * `skillEnum` above); no `bonus` sibling, because tools have no numeric consumer. `expertise`
141
- * beats a data grant, `none` suppresses one, `proficient` clears a data expertise · applied in
142
- * `computeEffectiveProficiencies` (pc.decision-engine.ts). A key a WRITER CREATES is
143
- * `toProfSlug` output with the apostrophe RETAINED ("thieves'-tools"), matching the engine's
144
- * own tool vocabulary in types/choice.ts. The READER is wider: `computeEffectiveProficiencies`
145
- * normalises each key with `toProfSlug` on read, so a hand-typed "Thieves' Tools" also
146
- * matches; and the plugin's two writers (`CharacterEditState.setToolExpertise` and the
147
- * `addProficiency` clearance) match an existing key by slug too, so a key the note ALREADY
148
- * carries is written THROUGH in its own spelling rather than duplicated · nothing here
149
- * re-spells it (review M-4: "repaired in place" read as "normalised", which it is not).
150
- * `languages` gets no such sibling: languages have no tri (§9.3). */
151
- proficiency: z.record(z.string(), proficiencyTri).optional()
152
- }).optional(),
153
- /** D4 A: weapon and armor proficiency edits, the `languages` shape. Same no-defaults rule. */
154
- weapons: z.object({ add: z.array(z.string()).optional(), remove: z.array(z.string()).optional() }).optional(),
155
- armor: z.object({ add: z.array(z.string()).optional(), remove: z.array(z.string()).optional() }).optional(),
156
- /** Manual defense edits. SUPPRESSION-ONLY, and the missing `add` channel is a DELIBERATE
157
- * asymmetry with `languages`/`tools` above · do not "complete the pattern". The additive
158
- * store is `character.defenses.*`, which already exists and works; a second additive
159
- * channel would recreate exactly the two-writers divergence R4-P5 exists to remove.
160
- * The schema persists what the note wrote, VERBATIM · it neither normalizes nor validates
161
- * the strings. As of this commit the store has NO consumer at all: Task 5 writes the first,
162
- * and the intent it is to implement is that entries be matched with `toDefenseSlug`
163
- * (pc.defense-normalize.ts), so a note may author any spelling.
164
- * The no-defaults rule of the block above applies here at all three levels: a default on
165
- * `defenses`, on a bucket, or on `remove` rewrites an untouched note. Readers should
166
- * therefore treat every level as possibly absent (`?? []`). */
167
- defenses: z.object({
168
- resistances: z.object({ remove: z.array(z.string()).optional() }).optional(),
169
- immunities: z.object({ remove: z.array(z.string()).optional() }).optional(),
170
- vulnerabilities: z.object({ remove: z.array(z.string()).optional() }).optional(),
171
- condition_immunities: z.object({ remove: z.array(z.string()).optional() }).optional()
172
- }).optional()
173
- });
174
- var characterOverridesSchema = characterOverridesShape.default({});
175
- var characterStateSchema = z.object({
176
- hp: z.object({
177
- current: z.number().int(),
178
- max: z.number().int(),
179
- temp: z.number().int().nonnegative()
180
- }),
181
- hit_dice: z.record(z.string(), z.object({
182
- used: z.number().int().nonnegative(),
183
- total: z.number().int().nonnegative()
184
- })).default({}),
185
- spell_slots: z.record(z.coerce.number().int(), z.object({
186
- used: z.number().int().nonnegative(),
187
- total: z.number().int().nonnegative()
188
- })).default({}),
189
- spell_slots_pact: z.object({
190
- level: z.number().int().nonnegative(),
191
- used: z.number().int().nonnegative(),
192
- total: z.number().int().nonnegative()
193
- }).optional(),
194
- concentration: z.string().nullable().default(null),
195
- conditions: z.array(conditionSlugEnum).default([]),
196
- exhaustion: z.number().int().min(0).max(6).default(0),
197
- death_saves: z.object({
198
- successes: z.number().int().min(0).max(3),
199
- failures: z.number().int().min(0).max(3)
200
- }).optional(),
201
- inspiration: z.number().int().nonnegative().default(0),
202
- currency: z.object({
203
- cp: z.number().int().nonnegative(),
204
- sp: z.number().int().nonnegative(),
205
- ep: z.number().int().nonnegative(),
206
- gp: z.number().int().nonnegative(),
207
- pp: z.number().int().nonnegative()
208
- }).optional(),
209
- feature_uses: z.record(z.string(), z.object({
210
- used: z.number().int().nonnegative(),
211
- max: z.number().int().nonnegative()
212
- })).default({}),
213
- // R4-G5 G8 (research D §3.3, the booked design): banked PREROLLED dice, keyed by the SAME id as
214
- // feature_uses (the resource id, e.g. "wizard-2024:foretelling-roll" for Portent). SIGN IS STATE
215
- // (the G8 shuffle fix): a value is stored NEGATIVE while spent, positive while live, so positions
216
- // are STABLE and "spend the right-hand roll" never reorders the bank (the earlier spent-prefix
217
- // shape moved a spent value into a prefix and visibly shuffled its neighbours). The count axis
218
- // stays on feature_uses (the tracker remains the single source of how many are left); the
219
- // writers on the plugin edit state keep the sign set and `used` in step. Without this line a
220
- // non-strict parse STRIPS the key and the rolls never survive a load.
221
- feature_rolls: z.record(z.string(), z.array(z.number().int().refine((n) => n !== 0 && Math.abs(n) <= 999, "banked rolls are nonzero, |value| 1..999"))).default({}),
222
- // Phase 3 activatable buffs: ids/slugs of activatable features/boons that are
223
- // currently toggled on. Their effects fold into recalc only while listed here.
224
- active_buffs: z.array(z.string()).optional(),
225
- attuned_items: z.array(z.string()).optional()
226
- });
227
- var choiceValueSchema = z.union([
228
- z.string(),
229
- z.array(z.string()),
230
- z.record(z.string(), z.unknown())
231
- ]).catch((ctx) => ctx.value);
232
- var classEntrySchema = z.object({
233
- name: z.string().min(1),
234
- level: z.number().int().min(1).max(20),
235
- subclass: z.string().nullable().default(null),
236
- // Per-level record is also catch-guarded so a non-object level value
237
- // (e.g. `choices: {1: null}` or `{1: "foo"}`) survives the parse instead
238
- // of failing the whole character.
239
- choices: z.record(
240
- z.coerce.number().int(),
241
- z.record(z.string(), choiceValueSchema).catch((ctx) => ctx.value)
242
- // type-only cast; value preserved at runtime
243
- ).default({})
244
- });
245
- var spellOverrideSchema = z.object({
246
- slug: z.string().min(1),
247
- overrides: z.record(z.string(), z.unknown()).default({})
248
- });
249
- var knownSpellObjectSchema = z.object({
250
- spell: z.string().min(1),
251
- class: z.string().optional(),
252
- source: z.enum(["class", "feat", "item", "race", "domain"]).optional(),
253
- prepared: z.boolean().optional(),
254
- always_prepared: z.boolean().optional()
255
- }).strict();
256
- var knownSpellEntrySchema = z.union([z.string().min(1), knownSpellObjectSchema]);
257
- var sheetViewFilterSchema = z.object({
258
- show: z.array(z.string().min(1)).optional(),
259
- hide: z.array(z.string().min(1)).optional()
260
- });
261
- var sheetPoolViewSchema = z.object({
262
- show: z.enum(["known", "granted", "not-known"]).optional().catch(void 0),
263
- off: z.record(z.string(), z.array(z.string())).optional(),
264
- folded: z.array(z.string().min(1)).optional()
265
- });
266
- var sheetStateSchema = z.object({
267
- // D13 (D3-A): `body: wide` is the wide three-column sheet (it draws the saves as a section, like `saves: section`).
268
- layout: z.object({
269
- saves: z.enum(["section"]).optional().catch(void 0),
270
- body: z.enum(["wide"]).optional().catch(void 0)
271
- }).optional(),
272
- favorites: z.array(z.string().min(1)).optional(),
273
- filters: z.object({ actions: sheetViewFilterSchema.optional(), passive: sheetViewFilterSchema.optional() }).optional(),
274
- pools: z.record(z.string(), sheetPoolViewSchema).optional()
275
- });
276
- var characterSchema = z.object({
277
- name: z.string().min(1),
278
- edition: z.enum(["2014", "2024"]),
279
- // Builder-draft marker (SP2 Plan 3). NO default: absent on every existing
280
- // file and stays absent on save; present+true only while the file is an
281
- // unfinished Builder draft. Finish deletes the key (see finishBuild).
282
- builder: z.boolean().optional(),
283
- alignment: z.string().optional(),
284
- age: z.string().optional(),
285
- race: z.string().nullable().default(null),
286
- subrace: z.string().nullable().default(null),
287
- background: z.string().nullable().default(null),
288
- // Relaxed from .min(1) for build-in-progress drafts: the Builder is the only
289
- // producer of class-less files, and recalc degrades gracefully (HP/derivation
290
- // fall back with warnings) when no class is present. See SP2 spec §5/§9.
291
- class: z.array(classEntrySchema).default([]),
292
- // Race/background decision selections, keyed `race:<id>` / `background:<id>`
293
- // (SP2 Plan 3). Permissive value arm mirrors per-level class choices.
294
- origin_choices: z.record(z.string(), choiceValueSchema).default({}),
295
- abilities: z.object({
296
- str: z.number().int(),
297
- dex: z.number().int(),
298
- con: z.number().int(),
299
- int: z.number().int(),
300
- wis: z.number().int(),
301
- cha: z.number().int()
302
- }),
303
- ability_method: z.enum(["standard-array", "point-buy", "archivist-point-buy", "rolled", "manual"]),
304
- // Persisted Roll-method ability pool (SP2 Plan 5). NO default — absent on
305
- // every existing/finished file and stays absent on save; present only while
306
- // the file is an unfinished Builder draft in `rolled` mode. Finish deletes
307
- // the key (see finishBuild). Permissive: a plain int array, no length pin
308
- // (re-rolls always write six, but legacy/hand-edited files may vary).
309
- builder_rolls: z.array(z.number().int()).optional(),
310
- // Persisted Equipment-step mode (SP2). NO default — absent on every
311
- // existing/finished file and stays absent on save; present only while the file
312
- // is an unfinished Builder draft. Finish deletes the key (see finishBuild).
313
- builder_equipment_mode: z.enum(["starting", "gold", "empty"]).optional(),
314
- skills: z.object({
315
- proficient: z.array(skillEnum).default([]),
316
- expertise: z.array(skillEnum).default([])
317
- }).default({ proficient: [], expertise: [] }),
318
- spells: z.object({
319
- known: z.array(knownSpellEntrySchema).default([]),
320
- overrides: z.array(spellOverrideSchema).default([]),
321
- view: z.enum(["by-level", "table"]).optional()
322
- }).default({ known: [], overrides: [] }),
323
- equipment: z.array(equipmentEntrySchema).default([]),
324
- overrides: characterOverridesSchema,
325
- currency: z.object({
326
- cp: z.number().int().nonnegative(),
327
- sp: z.number().int().nonnegative(),
328
- ep: z.number().int().nonnegative(),
329
- gp: z.number().int().nonnegative(),
330
- pp: z.number().int().nonnegative()
331
- }).optional(),
332
- /** Features granted directly to this character by the DM — a campaign boon, a sanity track, hero
333
- * points. Each entry names an `optional-feature` entity; the engine resolves it exactly the way a
334
- * pool pick resolves, but with no pool and no class choice behind it.
335
- *
336
- * WHERE a grant is drawn is the declaring NOTE's business, not the character's: the note's
337
- * `surface: band` opts it into the header strip. A character-side opt-OUT flag lived here briefly
338
- * and was removed — two mechanisms for one job, and the opt-out eroded the band's shortness one
339
- * grant at a time. */
340
- additional_features: z.array(z.string().min(1)).default([]),
341
- notes: z.string().optional(),
342
- defenses: z.object({
343
- resistances: z.array(z.string()).default([]),
344
- immunities: z.array(z.string()).default([]),
345
- vulnerabilities: z.array(z.string()).default([]),
346
- condition_immunities: z.array(z.string()).default([])
347
- }).partial().optional(),
348
- sheet: sheetStateSchema.optional(),
349
- state: characterStateSchema
350
- });
351
-
352
- export {
353
- characterOverridesShape,
354
- characterSchema
355
- };