@archivist-gg/dnd5e 0.2.0 → 0.3.1

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 (58) hide show
  1. package/dist/background/background.codec.js +3 -3
  2. package/dist/background/background.parser.js +2 -2
  3. package/dist/background/background.schema.d.ts +8 -0
  4. package/dist/background/background.schema.js +5 -3
  5. package/dist/chunk-353WXS6S.js +25 -0
  6. package/dist/{chunk-DC74TZNA.js → chunk-4LZJXJJS.js} +7 -2
  7. package/dist/{chunk-DZXSWSBP.js → chunk-5ZBE4CWV.js} +1 -1
  8. package/dist/{chunk-IXZXFFFW.js → chunk-6IRYTM5V.js} +6 -1
  9. package/dist/chunk-7TEK5KK7.js +49 -0
  10. package/dist/{chunk-V6SOFUJW.js → chunk-AIRFC5NQ.js} +3 -1
  11. package/dist/{chunk-VTYUBINW.js → chunk-BIK4DFWK.js} +1 -1
  12. package/dist/{chunk-TQZB4OCJ.js → chunk-D3CLOBE3.js} +49 -21
  13. package/dist/{chunk-3TRGRSCH.js → chunk-LV4SNWZQ.js} +7 -1
  14. package/dist/{chunk-UC4FE5X3.js → chunk-N6N74K6X.js} +1 -1
  15. package/dist/chunk-O5EYMKFH.js +6 -0
  16. package/dist/{chunk-TUIFSVLI.js → chunk-SE7AZDR3.js} +1 -0
  17. package/dist/{chunk-5WQD3WNZ.js → chunk-TN6ZLTNU.js} +6 -5
  18. package/dist/{chunk-R5SQHP2X.js → chunk-TNUFPIXI.js} +48 -30
  19. package/dist/{chunk-J2RYSZMQ.js → chunk-VTTA2ALZ.js} +2 -2
  20. package/dist/class/class.slug.d.ts +7 -5
  21. package/dist/class/class.slug.js +1 -1
  22. package/dist/entities/base-item-resolver.d.ts +9 -0
  23. package/dist/entities/base-item-resolver.js +6 -4
  24. package/dist/entities/slug.d.ts +7 -0
  25. package/dist/entities/slug.js +3 -1
  26. package/dist/index.js +3902 -3623
  27. package/dist/item/item.actions-map.d.ts +8 -7
  28. package/dist/item/item.actions-map.js +3 -4
  29. package/dist/item/item.ai-schema.d.ts +1 -1
  30. package/dist/pc/pc.decision-engine.d.ts +13 -3
  31. package/dist/pc/pc.decision-engine.js +9 -9
  32. package/dist/pc/pc.equipment.js +6 -12
  33. package/dist/pc/pc.feature-effects.d.ts +5 -0
  34. package/dist/pc/pc.feature-effects.js +2 -11
  35. package/dist/pc/pc.parser.js +1 -1
  36. package/dist/pc/pc.pools.js +7 -7
  37. package/dist/pc/pc.proficiencies.d.ts +31 -0
  38. package/dist/pc/pc.proficiencies.js +96 -23
  39. package/dist/pc/pc.proficiency-normalize.d.ts +5 -0
  40. package/dist/pc/pc.proficiency-query.js +5 -1
  41. package/dist/pc/pc.recalc.d.ts +7 -0
  42. package/dist/pc/pc.recalc.js +112 -58
  43. package/dist/pc/pc.resolver.js +7 -7
  44. package/dist/pc/pc.rest.d.ts +1 -1
  45. package/dist/pc/pc.rest.js +20 -11
  46. package/dist/pc/pc.schema.d.ts +10 -4
  47. package/dist/pc/pc.schema.js +1 -1
  48. package/dist/pc/pc.slotting.js +3 -3
  49. package/dist/pc/pc.spellcasting.d.ts +5 -1
  50. package/dist/pc/pc.spellcasting.js +4 -2
  51. package/dist/pc/pc.types.d.ts +30 -4
  52. package/dist/spell/spell.access.js +1 -1
  53. package/dist/types/choice.d.ts +5 -0
  54. package/dist/types/choice.js +9 -3
  55. package/dist/weapon/weapon.classify.d.ts +21 -0
  56. package/dist/weapon/weapon.classify.js +7 -0
  57. package/package.json +1 -1
  58. package/dist/chunk-BH6AMZVY.js +0 -25
@@ -0,0 +1,21 @@
1
+ import type { WeaponEntity } from "./weapon.types.js";
2
+ /** The two attack modes a weapon supports, derived from data the SRD pipeline
3
+ * actually preserves. The SRD runtime data miscategorizes throwable MELEE
4
+ * weapons (dagger/spear/handaxe/javelin/light hammer/trident) as `*-ranged`,
5
+ * so the melee/ranged split is reconstructed here instead of trusted:
6
+ * a category-ranged weapon is PURE ranged only when it needs ammunition or
7
+ * loading, or is one of the two genuinely-ranged thrown weapons (dart, net —
8
+ * a closed SRD set; a homebrew weapon whose bare slug is exactly "dart"/"net"
9
+ * is force-classified pure ranged). Everything else category-ranged is a
10
+ * throwable melee weapon. `reach` is 5 ft, +5 with the reach property. */
11
+ export interface WeaponRangeModes {
12
+ melee: {
13
+ reach: number;
14
+ } | null;
15
+ ranged: {
16
+ normal: number;
17
+ long: number;
18
+ thrown: boolean;
19
+ } | null;
20
+ }
21
+ export declare function classifyWeaponRange(weapon: Pick<WeaponEntity, "category" | "properties" | "range" | "slug">): WeaponRangeModes;
@@ -0,0 +1,7 @@
1
+ import {
2
+ classifyWeaponRange
3
+ } from "../chunk-353WXS6S.js";
4
+ import "../chunk-LV4SNWZQ.js";
5
+ export {
6
+ classifyWeaponRange
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archivist-gg/dnd5e",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,25 +0,0 @@
1
- // src/types/choice.ts
2
- var ALL_SKILL_SLUGS = [
3
- "acrobatics",
4
- "animal-handling",
5
- "arcana",
6
- "athletics",
7
- "deception",
8
- "history",
9
- "insight",
10
- "intimidation",
11
- "investigation",
12
- "medicine",
13
- "nature",
14
- "perception",
15
- "performance",
16
- "persuasion",
17
- "religion",
18
- "sleight-of-hand",
19
- "stealth",
20
- "survival"
21
- ];
22
-
23
- export {
24
- ALL_SKILL_SLUGS
25
- };