@archivist-gg/dnd5e 0.1.1 → 0.2.0

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 (65) hide show
  1. package/dist/background/background.codec.js +4 -4
  2. package/dist/background/background.parser.js +3 -3
  3. package/dist/background/background.schema.js +2 -2
  4. package/dist/{chunk-FFULAF2P.js → chunk-2BWAID3Y.js} +2 -2
  5. package/dist/{chunk-FUK7QSN5.js → chunk-42Y5IJKT.js} +1 -1
  6. package/dist/{chunk-TPZSPU4L.js → chunk-4JHOHWBI.js} +1 -1
  7. package/dist/{chunk-ZLG6FQFB.js → chunk-5WQD3WNZ.js} +16 -1
  8. package/dist/{chunk-FEOB24KP.js → chunk-73HOFQQ5.js} +1 -1
  9. package/dist/{chunk-YDPWD2T7.js → chunk-7VJ6BOA5.js} +4 -1
  10. package/dist/{chunk-DABBCYTT.js → chunk-CZPMTQOY.js} +1 -1
  11. package/dist/{chunk-DRNZJNJP.js → chunk-DZXSWSBP.js} +1 -1
  12. package/dist/{chunk-RVYYKYFL.js → chunk-GE4TLPWM.js} +1 -1
  13. package/dist/{chunk-VLKIB33F.js → chunk-K6Q5OUGK.js} +6 -0
  14. package/dist/{chunk-PMADYMUI.js → chunk-L7E2UT5A.js} +1 -1
  15. package/dist/{chunk-CDW7R2QT.js → chunk-NXSWH3AE.js} +4 -1
  16. package/dist/{chunk-IDTDACM6.js → chunk-PHQRGDRQ.js} +1 -1
  17. package/dist/{chunk-BAXWWGFJ.js → chunk-Q5K6LWBZ.js} +1 -1
  18. package/dist/chunk-R5SQHP2X.js +1092 -0
  19. package/dist/{chunk-Z6GXV2GO.js → chunk-TLYDBT5F.js} +1 -1
  20. package/dist/{chunk-ADLTSHOR.js → chunk-TQZB4OCJ.js} +16 -12
  21. package/dist/{chunk-A7T5L7SS.js → chunk-TUIFSVLI.js} +1 -1
  22. package/dist/{chunk-GEJSJP6E.js → chunk-V6SOFUJW.js} +1 -1
  23. package/dist/{chunk-Z4TL2V7S.js → chunk-VTYUBINW.js} +1 -1
  24. package/dist/{chunk-B7UXKNLD.js → chunk-W7HWMMBF.js} +1 -1
  25. package/dist/{chunk-SSXBYF3P.js → chunk-XLSVNUTK.js} +1 -1
  26. package/dist/{chunk-GIOH5JB5.js → chunk-XTIQWSFM.js} +1 -1
  27. package/dist/{chunk-PKC77VZP.js → chunk-ZZGEVJKX.js} +1 -1
  28. package/dist/class/class.codec.js +5 -5
  29. package/dist/class/class.parser.js +4 -4
  30. package/dist/class/class.schema.js +3 -3
  31. package/dist/feat/feat.codec.js +4 -4
  32. package/dist/feat/feat.parser.js +3 -3
  33. package/dist/feat/feat.schema.js +2 -2
  34. package/dist/index.js +321 -75
  35. package/dist/item/item.actions-map.d.ts +10 -3
  36. package/dist/item/item.actions-map.js +13 -8
  37. package/dist/item/item.codec.js +3 -3
  38. package/dist/item/item.parser.js +2 -2
  39. package/dist/item/item.schema.d.ts +3 -0
  40. package/dist/item/item.schema.js +1 -1
  41. package/dist/item/item.types.d.ts +8 -0
  42. package/dist/pc/pc.decision-engine.js +8 -1
  43. package/dist/pc/pc.equipment.js +7 -3
  44. package/dist/pc/pc.feature-effects.js +9 -2
  45. package/dist/pc/pc.parser.js +1 -1
  46. package/dist/pc/pc.pools.js +8 -3
  47. package/dist/pc/pc.recalc.js +20 -10
  48. package/dist/pc/pc.resolver.d.ts +59 -1
  49. package/dist/pc/pc.resolver.js +20 -342
  50. package/dist/pc/pc.schema.d.ts +21 -0
  51. package/dist/pc/pc.schema.js +1 -1
  52. package/dist/pc/pc.types.d.ts +37 -5
  53. package/dist/race/race.codec.js +5 -5
  54. package/dist/race/race.parser.js +4 -4
  55. package/dist/race/race.schema.js +3 -3
  56. package/dist/schemas/choice-schema.js +1 -1
  57. package/dist/schemas/feature-schema.js +2 -2
  58. package/dist/subclass/subclass.codec.js +5 -5
  59. package/dist/subclass/subclass.parser.js +4 -4
  60. package/dist/subclass/subclass.schema.js +3 -3
  61. package/dist/types/choice.d.ts +5 -0
  62. package/dist/weapon/weapon-mastery.d.ts +3 -0
  63. package/package.json +1 -1
  64. package/dist/chunk-6PXE7T7C.js +0 -79
  65. package/dist/chunk-TJCNX6UZ.js +0 -521
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  backgroundCodec
3
- } from "../chunk-Z4TL2V7S.js";
4
- import "../chunk-DRNZJNJP.js";
5
- import "../chunk-A7T5L7SS.js";
3
+ } from "../chunk-VTYUBINW.js";
4
+ import "../chunk-DZXSWSBP.js";
5
+ import "../chunk-TUIFSVLI.js";
6
6
  import "../chunk-3DZ74AKK.js";
7
- import "../chunk-CDW7R2QT.js";
7
+ import "../chunk-NXSWH3AE.js";
8
8
  import "../chunk-NXR3BD2V.js";
9
9
  export {
10
10
  backgroundCodec
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseBackground
3
- } from "../chunk-DRNZJNJP.js";
4
- import "../chunk-A7T5L7SS.js";
3
+ } from "../chunk-DZXSWSBP.js";
4
+ import "../chunk-TUIFSVLI.js";
5
5
  import "../chunk-3DZ74AKK.js";
6
- import "../chunk-CDW7R2QT.js";
6
+ import "../chunk-NXSWH3AE.js";
7
7
  import "../chunk-NXR3BD2V.js";
8
8
  export {
9
9
  parseBackground
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  backgroundEntitySchema
3
- } from "../chunk-A7T5L7SS.js";
3
+ } from "../chunk-TUIFSVLI.js";
4
4
  import "../chunk-3DZ74AKK.js";
5
- import "../chunk-CDW7R2QT.js";
5
+ import "../chunk-NXSWH3AE.js";
6
6
  import "../chunk-NXR3BD2V.js";
7
7
  export {
8
8
  backgroundEntitySchema
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  featureSchema
3
- } from "./chunk-DABBCYTT.js";
3
+ } from "./chunk-CZPMTQOY.js";
4
4
  import {
5
5
  choiceSchema
6
- } from "./chunk-CDW7R2QT.js";
6
+ } from "./chunk-NXSWH3AE.js";
7
7
 
8
8
  // src/race/race.schema.ts
9
9
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  classEntitySchema
3
- } from "./chunk-Z6GXV2GO.js";
3
+ } from "./chunk-TLYDBT5F.js";
4
4
 
5
5
  // src/class/class.parser.ts
6
6
  import { parseYaml } from "@archivist-gg/core";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseItem
3
- } from "./chunk-YDPWD2T7.js";
3
+ } from "./chunk-7VJ6BOA5.js";
4
4
 
5
5
  // src/item/item.codec.ts
6
6
  import yaml from "js-yaml";
@@ -35,7 +35,19 @@ var equipmentEntryOverridesSchema = z.object({
35
35
  extra_damage: z.string().optional(),
36
36
  ac_bonus: z.number().int().optional(),
37
37
  action: z.enum(["action", "bonus-action", "reaction", "free", "special"]).optional(),
38
- range: z.string().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()
39
51
  }).strict();
40
52
  var equipmentEntryStateSchema = z.object({
41
53
  charges: z.object({
@@ -90,6 +102,9 @@ var characterOverridesSchema = z.object({
90
102
  saveDC: z.number().int().optional(),
91
103
  attackBonus: z.number().int().optional()
92
104
  }).optional(),
105
+ // Character-level DC-ability fallback for own-ability-less spells (e.g. a Spell
106
+ // Scroll cast by a non-caster). Same ability enum as the per-instance spell_ability.
107
+ spellcasting_ability: abilityEnum.optional(),
93
108
  spell_slots: z.record(z.coerce.number().int(), z.number().int().nonnegative()).optional(),
94
109
  attunement_limit: z.number().int().nonnegative().optional()
95
110
  }).default({});
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseFeat
3
- } from "./chunk-GIOH5JB5.js";
3
+ } from "./chunk-XTIQWSFM.js";
4
4
 
5
5
  // src/feat/feat.codec.ts
6
6
  import yaml from "js-yaml";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  itemEntitySchema
3
- } from "./chunk-VLKIB33F.js";
3
+ } from "./chunk-K6Q5OUGK.js";
4
4
 
5
5
  // src/item/item.parser.ts
6
6
  import { parseYaml } from "@archivist-gg/core";
@@ -38,6 +38,9 @@ var KNOWN_KEYS = /* @__PURE__ */ new Set([
38
38
  "effects",
39
39
  "damage_riders",
40
40
  "raw",
41
+ "scroll_level",
42
+ "unidentified",
43
+ "masked_category",
41
44
  // Legacy fields kept (removed in Slice 7 after grep verifies no consumer)
42
45
  "damage_dice",
43
46
  "damage_type",
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-PZOWBI3B.js";
8
8
  import {
9
9
  choiceSchema
10
- } from "./chunk-CDW7R2QT.js";
10
+ } from "./chunk-NXSWH3AE.js";
11
11
  import {
12
12
  featureEffectSchema
13
13
  } from "./chunk-NXR3BD2V.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  backgroundEntitySchema
3
- } from "./chunk-A7T5L7SS.js";
3
+ } from "./chunk-TUIFSVLI.js";
4
4
 
5
5
  // src/background/background.parser.ts
6
6
  import { parseYaml } from "@archivist-gg/core";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseClass
3
- } from "./chunk-FUK7QSN5.js";
3
+ } from "./chunk-42Y5IJKT.js";
4
4
 
5
5
  // src/class/class.codec.ts
6
6
  import yaml from "js-yaml";
@@ -176,6 +176,12 @@ var itemEntitySchema = z.object({
176
176
  applies_to: z.enum(["weapon", "spell", "all"]).optional(),
177
177
  condition: z.string().optional()
178
178
  })).optional(),
179
+ // Scroll & unidentified-item markers (Phase 4). Declared here so they survive
180
+ // parse (the schema strips undeclared keys) and are ALSO listed in the
181
+ // parser's KNOWN_KEYS so they are not additionally copied into `raw`.
182
+ scroll_level: z.number().optional(),
183
+ unidentified: z.boolean().optional(),
184
+ masked_category: z.string().optional(),
179
185
  raw: z.record(z.string(), z.unknown()).optional(),
180
186
  // Legacy fields preserved
181
187
  damage_dice: z.string().optional(),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  subclassEntitySchema
3
- } from "./chunk-B7UXKNLD.js";
3
+ } from "./chunk-W7HWMMBF.js";
4
4
 
5
5
  // src/subclass/subclass.parser.ts
6
6
  import { parseYaml } from "@archivist-gg/core";
@@ -11,7 +11,10 @@ var entityFilterSchema = z.object({
11
11
  parent_class: z.literal("self").optional(),
12
12
  available_to: z.literal("self").optional(),
13
13
  weapon_category: z.enum(["simple", "martial"]).optional(),
14
- armor_category: z.enum(["light", "medium", "heavy", "shield"]).optional()
14
+ armor_category: z.enum(["light", "medium", "heavy", "shield"]).optional(),
15
+ list: z.string().min(1).optional(),
16
+ level: z.number().int().min(0).max(9).optional(),
17
+ edition: z.string().min(1).optional()
15
18
  }).strict();
16
19
  var inlineOptionSchema = z.lazy(() => z.object({
17
20
  value: z.string().min(1),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raceEntitySchema
3
- } from "./chunk-FFULAF2P.js";
3
+ } from "./chunk-2BWAID3Y.js";
4
4
 
5
5
  // src/race/race.parser.ts
6
6
  import { parseYaml } from "@archivist-gg/core";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  choiceSchema
3
- } from "./chunk-CDW7R2QT.js";
3
+ } from "./chunk-NXSWH3AE.js";
4
4
  import {
5
5
  featureEffectSchema
6
6
  } from "./chunk-NXR3BD2V.js";