@archivist-gg/dnd5e 0.1.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/LICENSE +21 -0
- package/LICENSES/SRD.md +37 -0
- package/README.md +65 -0
- package/dist/armor/armor.codec.d.ts +10 -0
- package/dist/armor/armor.codec.js +8 -0
- package/dist/armor/armor.entity-type.d.ts +2 -0
- package/dist/armor/armor.parser.d.ts +3 -0
- package/dist/armor/armor.parser.js +7 -0
- package/dist/armor/armor.schema.d.ts +25 -0
- package/dist/armor/armor.schema.js +6 -0
- package/dist/armor/armor.types.d.ts +26 -0
- package/dist/armor/armor.types.js +0 -0
- package/dist/background/background.codec.d.ts +9 -0
- package/dist/background/background.codec.js +11 -0
- package/dist/background/background.entity-type.d.ts +2 -0
- package/dist/background/background.parser.d.ts +3 -0
- package/dist/background/background.parser.js +10 -0
- package/dist/background/background.schema.d.ts +74 -0
- package/dist/background/background.schema.js +9 -0
- package/dist/background/background.types.d.ts +52 -0
- package/dist/background/background.types.js +0 -0
- package/dist/chunk-24GFQU7T.js +18 -0
- package/dist/chunk-3DZ74AKK.js +28 -0
- package/dist/chunk-3TM34RSJ.js +23 -0
- package/dist/chunk-3TRGRSCH.js +8 -0
- package/dist/chunk-4C2KOKLF.js +185 -0
- package/dist/chunk-4F6AIZ36.js +19 -0
- package/dist/chunk-4SSDYJS2.js +86 -0
- package/dist/chunk-4TIJKN6O.js +37 -0
- package/dist/chunk-537BHVSH.js +18 -0
- package/dist/chunk-5INR4NSL.js +18 -0
- package/dist/chunk-5XUXXAQJ.js +30 -0
- package/dist/chunk-656QCX4U.js +22 -0
- package/dist/chunk-66XXW2Z2.js +133 -0
- package/dist/chunk-6NK2MUD3.js +114 -0
- package/dist/chunk-6PXE7T7C.js +79 -0
- package/dist/chunk-7P65Q426.js +158 -0
- package/dist/chunk-A7T5L7SS.js +83 -0
- package/dist/chunk-AFKTJXRA.js +39 -0
- package/dist/chunk-B7UXKNLD.js +46 -0
- package/dist/chunk-BAXWWGFJ.js +45 -0
- package/dist/chunk-BH6AMZVY.js +25 -0
- package/dist/chunk-CDW7R2QT.js +62 -0
- package/dist/chunk-DABBCYTT.js +68 -0
- package/dist/chunk-DC74TZNA.js +46 -0
- package/dist/chunk-DNAJRMNN.js +68 -0
- package/dist/chunk-DRNZJNJP.js +19 -0
- package/dist/chunk-FEOB24KP.js +18 -0
- package/dist/chunk-FFULAF2P.js +63 -0
- package/dist/chunk-FUK7QSN5.js +19 -0
- package/dist/chunk-GIOH5JB5.js +19 -0
- package/dist/chunk-GJOI2GHP.js +25 -0
- package/dist/chunk-GZ46OVGZ.js +31 -0
- package/dist/chunk-HCP3GMHS.js +44 -0
- package/dist/chunk-IDTDACM6.js +19 -0
- package/dist/chunk-IKSMX4TN.js +0 -0
- package/dist/chunk-IXZXFFFW.js +269 -0
- package/dist/chunk-J2RYSZMQ.js +16 -0
- package/dist/chunk-JEYQU3JT.js +36 -0
- package/dist/chunk-LSLSG67V.js +31 -0
- package/dist/chunk-LWFTHJIE.js +24 -0
- package/dist/chunk-MDEJHMKK.js +52 -0
- package/dist/chunk-N2JE7BWL.js +81 -0
- package/dist/chunk-NAEPSZAM.js +88 -0
- package/dist/chunk-NXR3BD2V.js +90 -0
- package/dist/chunk-PKC77VZP.js +18 -0
- package/dist/chunk-PMADYMUI.js +19 -0
- package/dist/chunk-PTXBIDG7.js +63 -0
- package/dist/chunk-PZOWBI3B.js +49 -0
- package/dist/chunk-QQ5W2AZP.js +515 -0
- package/dist/chunk-QS5L5YTJ.js +24 -0
- package/dist/chunk-QYZV2MQA.js +97 -0
- package/dist/chunk-R2ZV233X.js +233 -0
- package/dist/chunk-RAWJTA45.js +271 -0
- package/dist/chunk-RSDRMH54.js +18 -0
- package/dist/chunk-RVYYKYFL.js +18 -0
- package/dist/chunk-SSXBYF3P.js +18 -0
- package/dist/chunk-TJCNX6UZ.js +521 -0
- package/dist/chunk-TZK36BU7.js +38 -0
- package/dist/chunk-UC4FE5X3.js +65 -0
- package/dist/chunk-WP2CX2JO.js +235 -0
- package/dist/chunk-WYGD2UGN.js +14 -0
- package/dist/chunk-XJNECUPT.js +31 -0
- package/dist/chunk-XURS6Q6Q.js +127 -0
- package/dist/chunk-Y4I74YEG.js +33 -0
- package/dist/chunk-Z4TL2V7S.js +18 -0
- package/dist/chunk-Z6GXV2GO.js +121 -0
- package/dist/chunk-ZLG6FQFB.js +237 -0
- package/dist/chunk-ZMR77DDL.js +18 -0
- package/dist/class/class.codec.d.ts +10 -0
- package/dist/class/class.codec.js +15 -0
- package/dist/class/class.entity-type.d.ts +2 -0
- package/dist/class/class.parser.d.ts +3 -0
- package/dist/class/class.parser.js +14 -0
- package/dist/class/class.schema.d.ts +202 -0
- package/dist/class/class.schema.js +13 -0
- package/dist/class/class.slug.d.ts +11 -0
- package/dist/class/class.slug.js +8 -0
- package/dist/class/class.types.d.ts +74 -0
- package/dist/class/class.types.js +0 -0
- package/dist/data-srd/index.generated.d.ts +7 -0
- package/dist/data-srd/index.generated.js +146 -0
- package/dist/dnd/constants.d.ts +16 -0
- package/dist/dnd/constants.js +36 -0
- package/dist/dnd/formula-tags.d.ts +16 -0
- package/dist/dnd/formula-tags.js +119 -0
- package/dist/dnd/math.d.ts +24 -0
- package/dist/dnd/math.js +35 -0
- package/dist/dnd/prose-tags.d.ts +16 -0
- package/dist/dnd/prose-tags.js +18 -0
- package/dist/dnd/resource-die.d.ts +6 -0
- package/dist/dnd/resource-die.js +17 -0
- package/dist/dnd/resource-formula.d.ts +41 -0
- package/dist/dnd/resource-formula.js +159 -0
- package/dist/dnd/srd-tag-converter.d.ts +44 -0
- package/dist/dnd/srd-tag-converter.js +12 -0
- package/dist/dnd/tag-grammar.d.ts +19 -0
- package/dist/dnd/tag-grammar.js +12 -0
- package/dist/encounter/encounter.ai-schema.d.ts +29 -0
- package/dist/encounter/encounter.ai-schema.js +8 -0
- package/dist/encounter/encounter.entity-type.d.ts +2 -0
- package/dist/encounter/encounter.generatable.d.ts +2 -0
- package/dist/entities/base-item-resolver.d.ts +21 -0
- package/dist/entities/base-item-resolver.js +9 -0
- package/dist/entities/slug.d.ts +5 -0
- package/dist/entities/slug.js +6 -0
- package/dist/feat/feat.codec.d.ts +9 -0
- package/dist/feat/feat.codec.js +10 -0
- package/dist/feat/feat.entity-type.d.ts +2 -0
- package/dist/feat/feat.parser.d.ts +3 -0
- package/dist/feat/feat.parser.js +9 -0
- package/dist/feat/feat.schema.d.ts +194 -0
- package/dist/feat/feat.schema.js +8 -0
- package/dist/feat/feat.types.d.ts +42 -0
- package/dist/feat/feat.types.js +0 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +139149 -0
- package/dist/inline-tag-parser.d.ts +11 -0
- package/dist/inline-tag-parser.js +6 -0
- package/dist/item/item.actions-map.d.ts +41 -0
- package/dist/item/item.actions-map.js +85 -0
- package/dist/item/item.ai-schema.d.ts +35 -0
- package/dist/item/item.ai-schema.js +6 -0
- package/dist/item/item.attunement.d.ts +18 -0
- package/dist/item/item.attunement.js +12 -0
- package/dist/item/item.bonuses.d.ts +2 -0
- package/dist/item/item.bonuses.js +7 -0
- package/dist/item/item.codec.d.ts +3 -0
- package/dist/item/item.codec.js +8 -0
- package/dist/item/item.conditions.d.ts +10 -0
- package/dist/item/item.conditions.js +8 -0
- package/dist/item/item.conditions.types.d.ts +28 -0
- package/dist/item/item.conditions.types.js +0 -0
- package/dist/item/item.enrichment.d.ts +4 -0
- package/dist/item/item.enrichment.js +9 -0
- package/dist/item/item.entity-type.d.ts +2 -0
- package/dist/item/item.generatable.d.ts +2 -0
- package/dist/item/item.parser.d.ts +3 -0
- package/dist/item/item.parser.js +7 -0
- package/dist/item/item.schema.d.ts +174 -0
- package/dist/item/item.schema.js +8 -0
- package/dist/item/item.types.d.ts +108 -0
- package/dist/item/item.types.js +0 -0
- package/dist/monster/monster.ai-schema.d.ts +67 -0
- package/dist/monster/monster.ai-schema.js +6 -0
- package/dist/monster/monster.codec.d.ts +13 -0
- package/dist/monster/monster.enrichment.d.ts +10 -0
- package/dist/monster/monster.enrichment.js +19 -0
- package/dist/monster/monster.entity-type.d.ts +2 -0
- package/dist/monster/monster.generatable.d.ts +2 -0
- package/dist/monster/monster.parser.d.ts +3 -0
- package/dist/monster/monster.parser.js +6 -0
- package/dist/monster/monster.resolve.d.ts +10 -0
- package/dist/monster/monster.types.d.ts +29 -0
- package/dist/monster/monster.types.js +1 -0
- package/dist/npc/npc.ai-schema.d.ts +6 -0
- package/dist/npc/npc.entity-type.d.ts +2 -0
- package/dist/npc/npc.generatable.d.ts +2 -0
- package/dist/optional-feature/optional-feature.codec.d.ts +14 -0
- package/dist/optional-feature/optional-feature.codec.js +11 -0
- package/dist/optional-feature/optional-feature.entity-type.d.ts +2 -0
- package/dist/optional-feature/optional-feature.parser.d.ts +3 -0
- package/dist/optional-feature/optional-feature.parser.js +10 -0
- package/dist/optional-feature/optional-feature.schema.d.ts +236 -0
- package/dist/optional-feature/optional-feature.schema.js +9 -0
- package/dist/pack.d.ts +11 -0
- package/dist/pc/conditions.constants.d.ts +3 -0
- package/dist/pc/conditions.constants.js +8 -0
- package/dist/pc/decision-recognizer.d.ts +4 -0
- package/dist/pc/decision-recognizer.js +8 -0
- package/dist/pc/pc.conditions.d.ts +3 -0
- package/dist/pc/pc.conditions.js +6 -0
- package/dist/pc/pc.decision-engine.d.ts +97 -0
- package/dist/pc/pc.decision-engine.js +19 -0
- package/dist/pc/pc.equipment.d.ts +12 -0
- package/dist/pc/pc.equipment.js +15 -0
- package/dist/pc/pc.feature-effects.d.ts +95 -0
- package/dist/pc/pc.feature-effects.js +9 -0
- package/dist/pc/pc.formula-context.d.ts +4 -0
- package/dist/pc/pc.formula-context.js +11 -0
- package/dist/pc/pc.parser.d.ts +3 -0
- package/dist/pc/pc.parser.js +41 -0
- package/dist/pc/pc.pools.d.ts +12 -0
- package/dist/pc/pc.pools.js +15 -0
- package/dist/pc/pc.proficiencies.d.ts +8 -0
- package/dist/pc/pc.proficiencies.js +47 -0
- package/dist/pc/pc.proficiency-query.d.ts +11 -0
- package/dist/pc/pc.proficiency-query.js +17 -0
- package/dist/pc/pc.recalc.d.ts +105 -0
- package/dist/pc/pc.recalc.js +662 -0
- package/dist/pc/pc.resolver.d.ts +34 -0
- package/dist/pc/pc.resolver.js +267 -0
- package/dist/pc/pc.resource-seed.d.ts +10 -0
- package/dist/pc/pc.resource-seed.js +40 -0
- package/dist/pc/pc.rest.d.ts +23 -0
- package/dist/pc/pc.rest.js +128 -0
- package/dist/pc/pc.schema.d.ts +294 -0
- package/dist/pc/pc.schema.js +7 -0
- package/dist/pc/pc.slotting.d.ts +22 -0
- package/dist/pc/pc.slotting.js +20 -0
- package/dist/pc/pc.spellcasting.d.ts +56 -0
- package/dist/pc/pc.spellcasting.js +16 -0
- package/dist/pc/pc.table-column.d.ts +12 -0
- package/dist/pc/pc.table-column.js +8 -0
- package/dist/pc/pc.types.d.ts +514 -0
- package/dist/pc/pc.types.js +0 -0
- package/dist/race/race.codec.d.ts +9 -0
- package/dist/race/race.codec.js +13 -0
- package/dist/race/race.entity-type.d.ts +2 -0
- package/dist/race/race.parser.d.ts +3 -0
- package/dist/race/race.parser.js +12 -0
- package/dist/race/race.schema.d.ts +67 -0
- package/dist/race/race.schema.js +11 -0
- package/dist/race/race.types.d.ts +44 -0
- package/dist/race/race.types.js +0 -0
- package/dist/schemas/attack-schema.d.ts +38 -0
- package/dist/schemas/choice-schema.d.ts +5 -0
- package/dist/schemas/choice-schema.js +7 -0
- package/dist/schemas/duration-schema.d.ts +13 -0
- package/dist/schemas/duration-schema.js +6 -0
- package/dist/schemas/equipment-grant-schema.d.ts +6 -0
- package/dist/schemas/equipment-grant-schema.js +12 -0
- package/dist/schemas/feature-effect-schema.d.ts +131 -0
- package/dist/schemas/feature-effect-schema.js +6 -0
- package/dist/schemas/feature-schema.d.ts +2 -0
- package/dist/schemas/feature-schema.js +10 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/resource-schema.d.ts +95 -0
- package/dist/schemas/resource-schema.js +12 -0
- package/dist/schemas/selection-pool-schema.d.ts +34 -0
- package/dist/schemas/selection-pool-schema.js +10 -0
- package/dist/spell/spell.access.d.ts +15 -0
- package/dist/spell/spell.access.js +25 -0
- package/dist/spell/spell.ai-schema.d.ts +24 -0
- package/dist/spell/spell.ai-schema.js +6 -0
- package/dist/spell/spell.codec.d.ts +3 -0
- package/dist/spell/spell.codec.js +8 -0
- package/dist/spell/spell.enrichment.d.ts +2 -0
- package/dist/spell/spell.enrichment.js +9 -0
- package/dist/spell/spell.entity-type.d.ts +2 -0
- package/dist/spell/spell.filter.d.ts +15 -0
- package/dist/spell/spell.filter.js +87 -0
- package/dist/spell/spell.generatable.d.ts +2 -0
- package/dist/spell/spell.parser.d.ts +3 -0
- package/dist/spell/spell.parser.js +7 -0
- package/dist/spell/spell.scaling.d.ts +14 -0
- package/dist/spell/spell.scaling.js +28 -0
- package/dist/spell/spell.schema.d.ts +31 -0
- package/dist/spell/spell.schema.js +6 -0
- package/dist/spell/spell.types.d.ts +25 -0
- package/dist/spell/spell.types.js +0 -0
- package/dist/srd-store.d.ts +53 -0
- package/dist/subclass/subclass.codec.d.ts +11 -0
- package/dist/subclass/subclass.codec.js +14 -0
- package/dist/subclass/subclass.entity-type.d.ts +2 -0
- package/dist/subclass/subclass.parser.d.ts +3 -0
- package/dist/subclass/subclass.parser.js +13 -0
- package/dist/subclass/subclass.schema.d.ts +118 -0
- package/dist/subclass/subclass.schema.js +12 -0
- package/dist/subclass/subclass.types.d.ts +20 -0
- package/dist/subclass/subclass.types.js +0 -0
- package/dist/types/abilities.d.ts +8 -0
- package/dist/types/abilities.js +0 -0
- package/dist/types/ac.d.ts +5 -0
- package/dist/types/attack.d.ts +22 -0
- package/dist/types/attack.js +0 -0
- package/dist/types/casting-option.d.ts +14 -0
- package/dist/types/casting-option.js +0 -0
- package/dist/types/choice.d.ts +66 -0
- package/dist/types/choice.js +6 -0
- package/dist/types/edition.d.ts +4 -0
- package/dist/types/edition.js +0 -0
- package/dist/types/equipment-grant.d.ts +41 -0
- package/dist/types/equipment-grant.js +0 -0
- package/dist/types/feature-effect.d.ts +79 -0
- package/dist/types/feature-effect.js +0 -0
- package/dist/types/feature.d.ts +41 -0
- package/dist/types/feature.js +0 -0
- package/dist/types/formula-context.d.ts +7 -0
- package/dist/types/formula-context.js +0 -0
- package/dist/types/hp.d.ts +4 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/item-conditions.types.d.ts +63 -0
- package/dist/types/item-conditions.types.js +0 -0
- package/dist/types/optional-feature.types.d.ts +60 -0
- package/dist/types/optional-feature.types.js +0 -0
- package/dist/types/resource.d.ts +44 -0
- package/dist/types/resource.js +0 -0
- package/dist/types/selection-pool.d.ts +37 -0
- package/dist/types/selection-pool.js +0 -0
- package/dist/types/speed.d.ts +8 -0
- package/dist/weapon/weapon.codec.d.ts +12 -0
- package/dist/weapon/weapon.codec.js +8 -0
- package/dist/weapon/weapon.entity-type.d.ts +2 -0
- package/dist/weapon/weapon.parser.d.ts +3 -0
- package/dist/weapon/weapon.parser.js +7 -0
- package/dist/weapon/weapon.schema.d.ts +34 -0
- package/dist/weapon/weapon.schema.js +6 -0
- package/dist/weapon/weapon.types.d.ts +36 -0
- package/dist/weapon/weapon.types.js +0 -0
- package/package.json +32 -0
- package/src/data-srd/ATTRIBUTION.md +2 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const characterSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
edition: z.ZodEnum<{
|
|
5
|
+
2014: "2014";
|
|
6
|
+
2024: "2024";
|
|
7
|
+
}>;
|
|
8
|
+
builder: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
alignment: z.ZodOptional<z.ZodString>;
|
|
10
|
+
age: z.ZodOptional<z.ZodString>;
|
|
11
|
+
race: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
subrace: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
background: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
class: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
level: z.ZodNumber;
|
|
17
|
+
subclass: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
choices: z.ZodDefault<z.ZodRecord<z.ZodCoercedNumber<unknown>, z.ZodCatch<z.ZodRecord<z.ZodString, z.ZodCatch<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>>>>;
|
|
19
|
+
}, z.core.$strip>>>;
|
|
20
|
+
origin_choices: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodCatch<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>>;
|
|
21
|
+
abilities: z.ZodObject<{
|
|
22
|
+
str: z.ZodNumber;
|
|
23
|
+
dex: z.ZodNumber;
|
|
24
|
+
con: z.ZodNumber;
|
|
25
|
+
int: z.ZodNumber;
|
|
26
|
+
wis: z.ZodNumber;
|
|
27
|
+
cha: z.ZodNumber;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
ability_method: z.ZodEnum<{
|
|
30
|
+
"standard-array": "standard-array";
|
|
31
|
+
"point-buy": "point-buy";
|
|
32
|
+
"archivist-point-buy": "archivist-point-buy";
|
|
33
|
+
rolled: "rolled";
|
|
34
|
+
manual: "manual";
|
|
35
|
+
}>;
|
|
36
|
+
builder_rolls: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
37
|
+
builder_equipment_mode: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
gold: "gold";
|
|
39
|
+
starting: "starting";
|
|
40
|
+
empty: "empty";
|
|
41
|
+
}>>;
|
|
42
|
+
skills: z.ZodDefault<z.ZodObject<{
|
|
43
|
+
proficient: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
44
|
+
acrobatics: "acrobatics";
|
|
45
|
+
"animal-handling": "animal-handling";
|
|
46
|
+
arcana: "arcana";
|
|
47
|
+
athletics: "athletics";
|
|
48
|
+
deception: "deception";
|
|
49
|
+
history: "history";
|
|
50
|
+
insight: "insight";
|
|
51
|
+
intimidation: "intimidation";
|
|
52
|
+
investigation: "investigation";
|
|
53
|
+
medicine: "medicine";
|
|
54
|
+
nature: "nature";
|
|
55
|
+
perception: "perception";
|
|
56
|
+
performance: "performance";
|
|
57
|
+
persuasion: "persuasion";
|
|
58
|
+
religion: "religion";
|
|
59
|
+
"sleight-of-hand": "sleight-of-hand";
|
|
60
|
+
stealth: "stealth";
|
|
61
|
+
survival: "survival";
|
|
62
|
+
}>>>;
|
|
63
|
+
expertise: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
64
|
+
acrobatics: "acrobatics";
|
|
65
|
+
"animal-handling": "animal-handling";
|
|
66
|
+
arcana: "arcana";
|
|
67
|
+
athletics: "athletics";
|
|
68
|
+
deception: "deception";
|
|
69
|
+
history: "history";
|
|
70
|
+
insight: "insight";
|
|
71
|
+
intimidation: "intimidation";
|
|
72
|
+
investigation: "investigation";
|
|
73
|
+
medicine: "medicine";
|
|
74
|
+
nature: "nature";
|
|
75
|
+
perception: "perception";
|
|
76
|
+
performance: "performance";
|
|
77
|
+
persuasion: "persuasion";
|
|
78
|
+
religion: "religion";
|
|
79
|
+
"sleight-of-hand": "sleight-of-hand";
|
|
80
|
+
stealth: "stealth";
|
|
81
|
+
survival: "survival";
|
|
82
|
+
}>>>;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
spells: z.ZodDefault<z.ZodObject<{
|
|
85
|
+
known: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
86
|
+
spell: z.ZodString;
|
|
87
|
+
class: z.ZodOptional<z.ZodString>;
|
|
88
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
domain: "domain";
|
|
90
|
+
race: "race";
|
|
91
|
+
item: "item";
|
|
92
|
+
class: "class";
|
|
93
|
+
feat: "feat";
|
|
94
|
+
}>>;
|
|
95
|
+
prepared: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
always_prepared: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
+
}, z.core.$strict>]>>>;
|
|
98
|
+
overrides: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
99
|
+
slug: z.ZodString;
|
|
100
|
+
overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
101
|
+
}, z.core.$strip>>>;
|
|
102
|
+
view: z.ZodOptional<z.ZodEnum<{
|
|
103
|
+
table: "table";
|
|
104
|
+
"by-level": "by-level";
|
|
105
|
+
}>>;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
equipment: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
108
|
+
item: z.ZodString;
|
|
109
|
+
equipped: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
attuned: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
qty: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
113
|
+
slot: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
114
|
+
armor: "armor";
|
|
115
|
+
shield: "shield";
|
|
116
|
+
mainhand: "mainhand";
|
|
117
|
+
offhand: "offhand";
|
|
118
|
+
}>>>;
|
|
119
|
+
overrides: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
name: z.ZodOptional<z.ZodString>;
|
|
121
|
+
bonus: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
damage_bonus: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
extra_damage: z.ZodOptional<z.ZodString>;
|
|
124
|
+
ac_bonus: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
action: z.ZodOptional<z.ZodEnum<{
|
|
126
|
+
action: "action";
|
|
127
|
+
"bonus-action": "bonus-action";
|
|
128
|
+
reaction: "reaction";
|
|
129
|
+
free: "free";
|
|
130
|
+
special: "special";
|
|
131
|
+
}>>;
|
|
132
|
+
range: z.ZodOptional<z.ZodString>;
|
|
133
|
+
}, z.core.$strict>>;
|
|
134
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
charges: z.ZodOptional<z.ZodObject<{
|
|
136
|
+
current: z.ZodNumber;
|
|
137
|
+
max: z.ZodNumber;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
recovery: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
amount: z.ZodString;
|
|
141
|
+
reset: z.ZodEnum<{
|
|
142
|
+
dawn: "dawn";
|
|
143
|
+
special: "special";
|
|
144
|
+
long: "long";
|
|
145
|
+
short: "short";
|
|
146
|
+
}>;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
depletion_risk: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
trigger: z.ZodString;
|
|
150
|
+
roll: z.ZodString;
|
|
151
|
+
threshold: z.ZodNumber;
|
|
152
|
+
effect: z.ZodString;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
}, z.core.$strict>>;
|
|
155
|
+
granted_by: z.ZodOptional<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>>>;
|
|
157
|
+
overrides: z.ZodDefault<z.ZodObject<{
|
|
158
|
+
scores: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
159
|
+
str: "str";
|
|
160
|
+
dex: "dex";
|
|
161
|
+
con: "con";
|
|
162
|
+
int: "int";
|
|
163
|
+
wis: "wis";
|
|
164
|
+
cha: "cha";
|
|
165
|
+
}> & z.core.$partial, z.ZodNumber>>;
|
|
166
|
+
saves: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
167
|
+
str: "str";
|
|
168
|
+
dex: "dex";
|
|
169
|
+
con: "con";
|
|
170
|
+
int: "int";
|
|
171
|
+
wis: "wis";
|
|
172
|
+
cha: "cha";
|
|
173
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
174
|
+
bonus: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
proficient: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
+
}, z.core.$strip>>>;
|
|
177
|
+
skills: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
178
|
+
acrobatics: "acrobatics";
|
|
179
|
+
"animal-handling": "animal-handling";
|
|
180
|
+
arcana: "arcana";
|
|
181
|
+
athletics: "athletics";
|
|
182
|
+
deception: "deception";
|
|
183
|
+
history: "history";
|
|
184
|
+
insight: "insight";
|
|
185
|
+
intimidation: "intimidation";
|
|
186
|
+
investigation: "investigation";
|
|
187
|
+
medicine: "medicine";
|
|
188
|
+
nature: "nature";
|
|
189
|
+
perception: "perception";
|
|
190
|
+
performance: "performance";
|
|
191
|
+
persuasion: "persuasion";
|
|
192
|
+
religion: "religion";
|
|
193
|
+
"sleight-of-hand": "sleight-of-hand";
|
|
194
|
+
stealth: "stealth";
|
|
195
|
+
survival: "survival";
|
|
196
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
197
|
+
bonus: z.ZodNumber;
|
|
198
|
+
proficiency: z.ZodOptional<z.ZodEnum<{
|
|
199
|
+
none: "none";
|
|
200
|
+
proficient: "proficient";
|
|
201
|
+
expertise: "expertise";
|
|
202
|
+
}>>;
|
|
203
|
+
}, z.core.$strip>>>;
|
|
204
|
+
passives: z.ZodOptional<z.ZodObject<{
|
|
205
|
+
perception: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
206
|
+
investigation: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
207
|
+
insight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
208
|
+
}, z.core.$strip>>;
|
|
209
|
+
hp: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
}, z.core.$strip>>;
|
|
212
|
+
ac: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
214
|
+
initiative: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
spellcasting: z.ZodOptional<z.ZodObject<{
|
|
216
|
+
saveDC: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
attackBonus: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
}, z.core.$strip>>;
|
|
219
|
+
spell_slots: z.ZodOptional<z.ZodRecord<z.ZodCoercedNumber<unknown>, z.ZodNumber>>;
|
|
220
|
+
attunement_limit: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
}, z.core.$strip>>;
|
|
222
|
+
currency: z.ZodOptional<z.ZodObject<{
|
|
223
|
+
cp: z.ZodNumber;
|
|
224
|
+
sp: z.ZodNumber;
|
|
225
|
+
ep: z.ZodNumber;
|
|
226
|
+
gp: z.ZodNumber;
|
|
227
|
+
pp: z.ZodNumber;
|
|
228
|
+
}, z.core.$strip>>;
|
|
229
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
230
|
+
defenses: z.ZodOptional<z.ZodObject<{
|
|
231
|
+
resistances: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
232
|
+
immunities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
233
|
+
vulnerabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
234
|
+
condition_immunities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
235
|
+
}, z.core.$strip>>;
|
|
236
|
+
state: z.ZodObject<{
|
|
237
|
+
hp: z.ZodObject<{
|
|
238
|
+
current: z.ZodNumber;
|
|
239
|
+
max: z.ZodNumber;
|
|
240
|
+
temp: z.ZodNumber;
|
|
241
|
+
}, z.core.$strip>;
|
|
242
|
+
hit_dice: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
243
|
+
used: z.ZodNumber;
|
|
244
|
+
total: z.ZodNumber;
|
|
245
|
+
}, z.core.$strip>>>;
|
|
246
|
+
spell_slots: z.ZodDefault<z.ZodRecord<z.ZodCoercedNumber<unknown>, z.ZodObject<{
|
|
247
|
+
used: z.ZodNumber;
|
|
248
|
+
total: z.ZodNumber;
|
|
249
|
+
}, z.core.$strip>>>;
|
|
250
|
+
spell_slots_pact: z.ZodOptional<z.ZodObject<{
|
|
251
|
+
level: z.ZodNumber;
|
|
252
|
+
used: z.ZodNumber;
|
|
253
|
+
total: z.ZodNumber;
|
|
254
|
+
}, z.core.$strip>>;
|
|
255
|
+
concentration: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
256
|
+
conditions: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
257
|
+
poisoned: "poisoned";
|
|
258
|
+
grappled: "grappled";
|
|
259
|
+
paralyzed: "paralyzed";
|
|
260
|
+
petrified: "petrified";
|
|
261
|
+
prone: "prone";
|
|
262
|
+
restrained: "restrained";
|
|
263
|
+
unconscious: "unconscious";
|
|
264
|
+
charmed: "charmed";
|
|
265
|
+
frightened: "frightened";
|
|
266
|
+
blinded: "blinded";
|
|
267
|
+
deafened: "deafened";
|
|
268
|
+
stunned: "stunned";
|
|
269
|
+
incapacitated: "incapacitated";
|
|
270
|
+
invisible: "invisible";
|
|
271
|
+
}>>>;
|
|
272
|
+
exhaustion: z.ZodDefault<z.ZodNumber>;
|
|
273
|
+
death_saves: z.ZodOptional<z.ZodObject<{
|
|
274
|
+
successes: z.ZodNumber;
|
|
275
|
+
failures: z.ZodNumber;
|
|
276
|
+
}, z.core.$strip>>;
|
|
277
|
+
inspiration: z.ZodDefault<z.ZodNumber>;
|
|
278
|
+
currency: z.ZodOptional<z.ZodObject<{
|
|
279
|
+
cp: z.ZodNumber;
|
|
280
|
+
sp: z.ZodNumber;
|
|
281
|
+
ep: z.ZodNumber;
|
|
282
|
+
gp: z.ZodNumber;
|
|
283
|
+
pp: z.ZodNumber;
|
|
284
|
+
}, z.core.$strip>>;
|
|
285
|
+
feature_uses: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
286
|
+
used: z.ZodNumber;
|
|
287
|
+
max: z.ZodNumber;
|
|
288
|
+
}, z.core.$strip>>>;
|
|
289
|
+
active_buffs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
290
|
+
attuned_items: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
export type CharacterInput = z.input<typeof characterSchema>;
|
|
294
|
+
export type CharacterOutput = z.output<typeof characterSchema>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { EntityRegistry } from "@archivist-gg/core";
|
|
2
|
+
import type { ItemEntity } from "@archivist-gg/dnd5e/item/item.types";
|
|
3
|
+
import type { ArmorEntity } from "@archivist-gg/dnd5e/armor/armor.types";
|
|
4
|
+
import type { WeaponEntity } from "@archivist-gg/dnd5e/weapon/weapon.types";
|
|
5
|
+
import type { SlotKey } from "./pc.types.js";
|
|
6
|
+
export declare function isItemEntity(e: unknown): e is ItemEntity;
|
|
7
|
+
export declare function isWeaponEntity(e: unknown): e is WeaponEntity;
|
|
8
|
+
export declare function isArmorEntity(e: unknown): e is ArmorEntity;
|
|
9
|
+
/** Resolve an equipment entry's `item` wikilink (or bare slug) through the shared
|
|
10
|
+
* base-item resolver so vault-path wikilinks, alias wikilinks, AND
|
|
11
|
+
* compendium-prefixed slugs all resolve consistently. */
|
|
12
|
+
export declare function resolveEntityForEntry(item: string, registry: EntityRegistry): {
|
|
13
|
+
entity: ArmorEntity | WeaponEntity | ItemEntity | null;
|
|
14
|
+
entityType: string | null;
|
|
15
|
+
};
|
|
16
|
+
/** Is this armor a shield? Robust to SRD-2024 data where the Shield entity
|
|
17
|
+
* carries `category: "heavy"` rather than `"shield"`. */
|
|
18
|
+
export declare function isShieldArmor(armor: ArmorEntity): boolean;
|
|
19
|
+
/** The ArmorEntity whose `ac` block governs a slot: the entity itself when armor,
|
|
20
|
+
* or — for a magic item whose `base_item` points at armor — the resolved base. */
|
|
21
|
+
export declare function effectiveArmor(entity: ArmorEntity | WeaponEntity | ItemEntity | null | undefined, registry: EntityRegistry): ArmorEntity | null;
|
|
22
|
+
export declare function defaultSlotForType(entityType: string | null, entity: ArmorEntity | WeaponEntity | ItemEntity | null, registry: EntityRegistry): SlotKey | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultSlotForType,
|
|
3
|
+
effectiveArmor,
|
|
4
|
+
isArmorEntity,
|
|
5
|
+
isItemEntity,
|
|
6
|
+
isShieldArmor,
|
|
7
|
+
isWeaponEntity,
|
|
8
|
+
resolveEntityForEntry
|
|
9
|
+
} from "../chunk-UC4FE5X3.js";
|
|
10
|
+
import "../chunk-DC74TZNA.js";
|
|
11
|
+
import "../chunk-3TRGRSCH.js";
|
|
12
|
+
export {
|
|
13
|
+
defaultSlotForType,
|
|
14
|
+
effectiveArmor,
|
|
15
|
+
isArmorEntity,
|
|
16
|
+
isItemEntity,
|
|
17
|
+
isShieldArmor,
|
|
18
|
+
isWeaponEntity,
|
|
19
|
+
resolveEntityForEntry
|
|
20
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Ability } from "@archivist-gg/dnd5e";
|
|
2
|
+
import type { KnownSpellEntry, ResolvedClass } from "./pc.types.js";
|
|
3
|
+
import type { CasterType } from "@archivist-gg/dnd5e/class/class.types";
|
|
4
|
+
export interface SpellcastingProfile {
|
|
5
|
+
ability: Ability;
|
|
6
|
+
casterType: CasterType;
|
|
7
|
+
preparation: "known" | "prepared";
|
|
8
|
+
spellList: string;
|
|
9
|
+
table: Record<number, {
|
|
10
|
+
columns?: Record<string, string | number>;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Data-driven spellcasting profile for a resolved class. Reads the subclass
|
|
15
|
+
* block if the subclass grants casting (e.g. Architect of Ruin), else the class
|
|
16
|
+
* block. Known/cantrip columns come from whichever entity grants casting
|
|
17
|
+
* (subclass table preferred, falling back to the class table). Returns null for
|
|
18
|
+
* non-casters. No hardcoded class knowledge — everything comes from the data.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveSpellcasting(rc: ResolvedClass): SpellcastingProfile | null;
|
|
21
|
+
export interface NormalizedKnownSpell {
|
|
22
|
+
slug: string;
|
|
23
|
+
classSlug: string | null;
|
|
24
|
+
source: "class" | "feat" | "item" | "race" | "domain";
|
|
25
|
+
preparedFlag: boolean | undefined;
|
|
26
|
+
alwaysPrepared: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function normalizeKnownSpell(entry: KnownSpellEntry): NormalizedKnownSpell;
|
|
29
|
+
export interface CasterClassInput {
|
|
30
|
+
casterType: CasterType;
|
|
31
|
+
level: number;
|
|
32
|
+
}
|
|
33
|
+
export interface DerivedSpellSlots {
|
|
34
|
+
/** spell level (1..9) → total slots. Levels with 0 slots are omitted. */
|
|
35
|
+
standard: Record<number, number>;
|
|
36
|
+
/** Warlock Pact Magic, or null. */
|
|
37
|
+
pact: {
|
|
38
|
+
level: number;
|
|
39
|
+
total: number;
|
|
40
|
+
} | null;
|
|
41
|
+
}
|
|
42
|
+
export declare function deriveSpellSlots(classes: CasterClassInput[]): DerivedSpellSlots;
|
|
43
|
+
export interface LimitClassInput {
|
|
44
|
+
classSlug: string;
|
|
45
|
+
level: number;
|
|
46
|
+
profile: SpellcastingProfile;
|
|
47
|
+
/** Ability score for this class's spellcasting ability. */
|
|
48
|
+
abilityScore: number;
|
|
49
|
+
}
|
|
50
|
+
export interface SpellLimit {
|
|
51
|
+
classSlug: string;
|
|
52
|
+
kind: "known" | "prepared";
|
|
53
|
+
cantripsKnown: number | null;
|
|
54
|
+
preparedOrKnown: number | null;
|
|
55
|
+
}
|
|
56
|
+
export declare function computeSpellLimits(inputs: LimitClassInput[]): SpellLimit[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computeSpellLimits,
|
|
3
|
+
deriveSpellSlots,
|
|
4
|
+
normalizeKnownSpell,
|
|
5
|
+
resolveSpellcasting
|
|
6
|
+
} from "../chunk-IXZXFFFW.js";
|
|
7
|
+
import "../chunk-5XUXXAQJ.js";
|
|
8
|
+
import "../chunk-J2RYSZMQ.js";
|
|
9
|
+
import "../chunk-NAEPSZAM.js";
|
|
10
|
+
import "../chunk-WP2CX2JO.js";
|
|
11
|
+
export {
|
|
12
|
+
computeSpellLimits,
|
|
13
|
+
deriveSpellSlots,
|
|
14
|
+
normalizeKnownSpell,
|
|
15
|
+
resolveSpellcasting
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Read a numeric value from a (sub)class table column at a given level, trying
|
|
2
|
+
* each candidate key in order. Returns null when absent or non-numeric. Shared
|
|
3
|
+
* by spellcasting (Cantrips/Spells Known) and the pool engine (pick counts). */
|
|
4
|
+
export declare function readTableColumn(table: Record<number, {
|
|
5
|
+
columns?: Record<string, string | number>;
|
|
6
|
+
}> | undefined, level: number, keys: string[]): number | null;
|
|
7
|
+
/** All numeric columns of a (sub)class table row at `level`, keyed by column
|
|
8
|
+
* name. Non-numeric / missing cells are omitted. Backs `column('Name')` in the
|
|
9
|
+
* resource max-formula DSL. */
|
|
10
|
+
export declare function numericColumnsAt(table: Record<number, {
|
|
11
|
+
columns?: Record<string, string | number>;
|
|
12
|
+
}> | undefined, level: number): Record<string, number>;
|