@archivist-gg/dnd5e 0.1.0 → 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.
- package/dist/background/background.codec.js +4 -4
- package/dist/background/background.parser.js +3 -3
- package/dist/background/background.schema.js +2 -2
- package/dist/{chunk-FFULAF2P.js → chunk-2BWAID3Y.js} +2 -2
- package/dist/{chunk-FUK7QSN5.js → chunk-42Y5IJKT.js} +1 -1
- package/dist/{chunk-537BHVSH.js → chunk-4JHOHWBI.js} +1 -1
- package/dist/{chunk-ZLG6FQFB.js → chunk-5WQD3WNZ.js} +16 -1
- package/dist/{chunk-FEOB24KP.js → chunk-73HOFQQ5.js} +1 -1
- package/dist/{chunk-4SSDYJS2.js → chunk-7VJ6BOA5.js} +5 -1
- package/dist/{chunk-DABBCYTT.js → chunk-CZPMTQOY.js} +1 -1
- package/dist/{chunk-DRNZJNJP.js → chunk-DZXSWSBP.js} +1 -1
- package/dist/{chunk-RVYYKYFL.js → chunk-GE4TLPWM.js} +1 -1
- package/dist/{chunk-4C2KOKLF.js → chunk-K6Q5OUGK.js} +12 -0
- package/dist/{chunk-PMADYMUI.js → chunk-L7E2UT5A.js} +1 -1
- package/dist/{chunk-CDW7R2QT.js → chunk-NXSWH3AE.js} +4 -1
- package/dist/{chunk-IDTDACM6.js → chunk-PHQRGDRQ.js} +1 -1
- package/dist/{chunk-BAXWWGFJ.js → chunk-Q5K6LWBZ.js} +1 -1
- package/dist/chunk-R5SQHP2X.js +1092 -0
- package/dist/{chunk-Z6GXV2GO.js → chunk-TLYDBT5F.js} +1 -1
- package/dist/{chunk-QQ5W2AZP.js → chunk-TQZB4OCJ.js} +67 -12
- package/dist/{chunk-A7T5L7SS.js → chunk-TUIFSVLI.js} +1 -1
- package/dist/{chunk-XURS6Q6Q.js → chunk-V6SOFUJW.js} +19 -5
- package/dist/{chunk-Z4TL2V7S.js → chunk-VTYUBINW.js} +1 -1
- package/dist/{chunk-B7UXKNLD.js → chunk-W7HWMMBF.js} +1 -1
- package/dist/{chunk-SSXBYF3P.js → chunk-XLSVNUTK.js} +1 -1
- package/dist/{chunk-GIOH5JB5.js → chunk-XTIQWSFM.js} +1 -1
- package/dist/{chunk-PKC77VZP.js → chunk-ZZGEVJKX.js} +1 -1
- package/dist/class/class.codec.js +5 -5
- package/dist/class/class.parser.js +4 -4
- package/dist/class/class.schema.js +3 -3
- package/dist/feat/feat.codec.js +4 -4
- package/dist/feat/feat.parser.js +3 -3
- package/dist/feat/feat.schema.js +2 -2
- package/dist/index.js +622 -118
- package/dist/item/item.actions-map.d.ts +10 -3
- package/dist/item/item.actions-map.js +13 -8
- package/dist/item/item.codec.js +3 -3
- package/dist/item/item.parser.js +2 -2
- package/dist/item/item.schema.d.ts +13 -0
- package/dist/item/item.schema.js +1 -1
- package/dist/item/item.types.d.ts +17 -0
- package/dist/pc/pc.decision-engine.js +8 -1
- package/dist/pc/pc.equipment.d.ts +2 -1
- package/dist/pc/pc.equipment.js +9 -1
- package/dist/pc/pc.feature-effects.d.ts +31 -9
- package/dist/pc/pc.feature-effects.js +11 -1
- package/dist/pc/pc.parser.js +1 -1
- package/dist/pc/pc.pools.js +8 -3
- package/dist/pc/pc.recalc.js +80 -62
- package/dist/pc/pc.resolver.d.ts +71 -1
- package/dist/pc/pc.resolver.js +21 -254
- package/dist/pc/pc.schema.d.ts +21 -0
- package/dist/pc/pc.schema.js +1 -1
- package/dist/pc/pc.types.d.ts +80 -1
- package/dist/race/race.codec.js +5 -5
- package/dist/race/race.parser.js +4 -4
- package/dist/race/race.schema.js +3 -3
- package/dist/schemas/choice-schema.js +1 -1
- package/dist/schemas/feature-schema.js +2 -2
- package/dist/subclass/subclass.codec.js +5 -5
- package/dist/subclass/subclass.parser.js +4 -4
- package/dist/subclass/subclass.schema.js +3 -3
- package/dist/types/choice.d.ts +5 -0
- package/dist/weapon/weapon-mastery.d.ts +12 -0
- package/package.json +1 -1
- package/dist/chunk-6PXE7T7C.js +0 -79
- package/dist/chunk-TJCNX6UZ.js +0 -521
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
backgroundCodec
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-VTYUBINW.js";
|
|
4
|
+
import "../chunk-DZXSWSBP.js";
|
|
5
|
+
import "../chunk-TUIFSVLI.js";
|
|
6
6
|
import "../chunk-3DZ74AKK.js";
|
|
7
|
-
import "../chunk-
|
|
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-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-DZXSWSBP.js";
|
|
4
|
+
import "../chunk-TUIFSVLI.js";
|
|
5
5
|
import "../chunk-3DZ74AKK.js";
|
|
6
|
-
import "../chunk-
|
|
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-
|
|
3
|
+
} from "../chunk-TUIFSVLI.js";
|
|
4
4
|
import "../chunk-3DZ74AKK.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-NXSWH3AE.js";
|
|
6
6
|
import "../chunk-NXR3BD2V.js";
|
|
7
7
|
export {
|
|
8
8
|
backgroundEntitySchema
|
|
@@ -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
|
itemEntitySchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-K6Q5OUGK.js";
|
|
4
4
|
|
|
5
5
|
// src/item/item.parser.ts
|
|
6
6
|
import { parseYaml } from "@archivist-gg/core";
|
|
@@ -36,7 +36,11 @@ var KNOWN_KEYS = /* @__PURE__ */ new Set([
|
|
|
36
36
|
"description",
|
|
37
37
|
"entries",
|
|
38
38
|
"effects",
|
|
39
|
+
"damage_riders",
|
|
39
40
|
"raw",
|
|
41
|
+
"scroll_level",
|
|
42
|
+
"unidentified",
|
|
43
|
+
"masked_category",
|
|
40
44
|
// Legacy fields kept (removed in Slice 7 after grep verifies no consumer)
|
|
41
45
|
"damage_dice",
|
|
42
46
|
"damage_type",
|
|
@@ -170,6 +170,18 @@ var itemEntitySchema = z.object({
|
|
|
170
170
|
description: z.string().optional(),
|
|
171
171
|
entries: z.array(z.unknown()).optional(),
|
|
172
172
|
effects: z.array(z.unknown()).optional(),
|
|
173
|
+
damage_riders: z.array(z.object({
|
|
174
|
+
amount: z.string(),
|
|
175
|
+
damage_type: z.string(),
|
|
176
|
+
applies_to: z.enum(["weapon", "spell", "all"]).optional(),
|
|
177
|
+
condition: z.string().optional()
|
|
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(),
|
|
173
185
|
raw: z.record(z.string(), z.unknown()).optional(),
|
|
174
186
|
// Legacy fields preserved
|
|
175
187
|
damage_dice: z.string().optional(),
|
|
@@ -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),
|