@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,21 @@
|
|
|
1
|
+
import type { EntityRegistry, RegisteredEntity } from "@archivist-gg/core";
|
|
2
|
+
/**
|
|
3
|
+
* Public: take a `base_item` string (vault-path wikilink, alias-form
|
|
4
|
+
* wikilink, bare-slug wikilink, or bare slug) and return the matching
|
|
5
|
+
* `RegisteredEntity` or null.
|
|
6
|
+
*
|
|
7
|
+
* - Empty / null / non-string input -> null
|
|
8
|
+
* - String that doesn't unwrap to a slug -> null
|
|
9
|
+
* - Slug not present in the registry -> null
|
|
10
|
+
*
|
|
11
|
+
* The lookup is type-agnostic: callers that need to narrow to a specific
|
|
12
|
+
* `entityType` (e.g. "weapon" only) should branch on the result's
|
|
13
|
+
* `entityType`. A type-narrowed convenience wrapper is also exported for the
|
|
14
|
+
* common weapon/armor cases.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveBaseItem(baseItem: string | null | undefined, registry: EntityRegistry): RegisteredEntity | null;
|
|
17
|
+
/**
|
|
18
|
+
* Convenience: resolve and require a specific entityType. Returns null if
|
|
19
|
+
* the entry resolves but is the wrong type.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveBaseItemOfType(baseItem: string | null | undefined, entityType: string, registry: EntityRegistry): RegisteredEntity | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DocCodec } from "@archivist-gg/core";
|
|
2
|
+
import type { FeatEntity } from "./feat.types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Normalizing codec (0c.1a). `parse` delegates to `parseFeat`, which seeds the
|
|
5
|
+
* `edition: "2014"` default and validates against `featEntitySchema`.
|
|
6
|
+
* `serialize` stays `yaml.dump` (the edit-save path uses obsidian's separate
|
|
7
|
+
* serializer; gate (d) verifies `yaml.dump` round-trips through `parseFeat`).
|
|
8
|
+
*/
|
|
9
|
+
export declare const featCodec: DocCodec<FeatEntity>;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const featEntitySchema: z.ZodObject<{
|
|
3
|
+
slug: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
edition: z.ZodEnum<{
|
|
6
|
+
2014: "2014";
|
|
7
|
+
2024: "2024";
|
|
8
|
+
}>;
|
|
9
|
+
source: z.ZodString;
|
|
10
|
+
category: z.ZodEnum<{
|
|
11
|
+
origin: "origin";
|
|
12
|
+
general: "general";
|
|
13
|
+
"fighting-style": "fighting-style";
|
|
14
|
+
"epic-boon": "epic-boon";
|
|
15
|
+
}>;
|
|
16
|
+
description: z.ZodString;
|
|
17
|
+
prerequisites: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
18
|
+
kind: z.ZodLiteral<"ability">;
|
|
19
|
+
ability: z.ZodEnum<{
|
|
20
|
+
str: "str";
|
|
21
|
+
dex: "dex";
|
|
22
|
+
con: "con";
|
|
23
|
+
int: "int";
|
|
24
|
+
wis: "wis";
|
|
25
|
+
cha: "cha";
|
|
26
|
+
}>;
|
|
27
|
+
min: z.ZodNumber;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"level">;
|
|
30
|
+
min: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
32
|
+
kind: z.ZodLiteral<"spellcaster">;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<"proficiency">;
|
|
35
|
+
proficiency_type: z.ZodEnum<{
|
|
36
|
+
weapon: "weapon";
|
|
37
|
+
skill: "skill";
|
|
38
|
+
tool: "tool";
|
|
39
|
+
"saving-throw": "saving-throw";
|
|
40
|
+
armor: "armor";
|
|
41
|
+
}>;
|
|
42
|
+
value: z.ZodString;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
+
kind: z.ZodLiteral<"race">;
|
|
45
|
+
slug: z.ZodString;
|
|
46
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
47
|
+
kind: z.ZodLiteral<"class">;
|
|
48
|
+
slug: z.ZodString;
|
|
49
|
+
}, z.core.$strip>], "kind">>;
|
|
50
|
+
benefits: z.ZodArray<z.ZodString>;
|
|
51
|
+
effects: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
52
|
+
kind: z.ZodLiteral<"initiative-bonus">;
|
|
53
|
+
value: z.ZodNumber;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
kind: z.ZodLiteral<"immune-condition">;
|
|
56
|
+
condition: z.ZodString;
|
|
57
|
+
while: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
kind: z.ZodLiteral<"resistance">;
|
|
60
|
+
damage_type: z.ZodString;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
kind: z.ZodLiteral<"hp-per-level-bonus">;
|
|
63
|
+
value: z.ZodNumber;
|
|
64
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
+
kind: z.ZodLiteral<"speed-bonus">;
|
|
66
|
+
mode: z.ZodEnum<{
|
|
67
|
+
walk: "walk";
|
|
68
|
+
fly: "fly";
|
|
69
|
+
swim: "swim";
|
|
70
|
+
climb: "climb";
|
|
71
|
+
burrow: "burrow";
|
|
72
|
+
}>;
|
|
73
|
+
value: z.ZodNumber;
|
|
74
|
+
set: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
kind: z.ZodLiteral<"sense">;
|
|
77
|
+
type: z.ZodEnum<{
|
|
78
|
+
darkvision: "darkvision";
|
|
79
|
+
blindsight: "blindsight";
|
|
80
|
+
tremorsense: "tremorsense";
|
|
81
|
+
truesight: "truesight";
|
|
82
|
+
}>;
|
|
83
|
+
range: z.ZodNumber;
|
|
84
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
+
kind: z.ZodLiteral<"apply-condition">;
|
|
86
|
+
condition: z.ZodString;
|
|
87
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
88
|
+
ends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
|
+
save_repeat: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
ability: z.ZodString;
|
|
91
|
+
timing: z.ZodString;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
kind: z.ZodLiteral<"damage-bonus">;
|
|
95
|
+
damage_type: z.ZodString;
|
|
96
|
+
amount: z.ZodString;
|
|
97
|
+
applies_to: z.ZodOptional<z.ZodEnum<{
|
|
98
|
+
weapon: "weapon";
|
|
99
|
+
spell: "spell";
|
|
100
|
+
all: "all";
|
|
101
|
+
}>>;
|
|
102
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
kind: z.ZodLiteral<"proficiency">;
|
|
105
|
+
proficiency_type: z.ZodEnum<{
|
|
106
|
+
weapon: "weapon";
|
|
107
|
+
skill: "skill";
|
|
108
|
+
tool: "tool";
|
|
109
|
+
language: "language";
|
|
110
|
+
"saving-throw": "saving-throw";
|
|
111
|
+
armor: "armor";
|
|
112
|
+
}>;
|
|
113
|
+
value: z.ZodString;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
kind: z.ZodLiteral<"ac-bonus">;
|
|
116
|
+
value: z.ZodNumber;
|
|
117
|
+
requires_armor: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
119
|
+
kind: z.ZodLiteral<"unarmored-ac">;
|
|
120
|
+
abilities: z.ZodArray<z.ZodEnum<{
|
|
121
|
+
str: "str";
|
|
122
|
+
dex: "dex";
|
|
123
|
+
con: "con";
|
|
124
|
+
int: "int";
|
|
125
|
+
wis: "wis";
|
|
126
|
+
cha: "cha";
|
|
127
|
+
}>>;
|
|
128
|
+
base: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
allow_shield: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
131
|
+
kind: z.ZodLiteral<"weapon-ability">;
|
|
132
|
+
ability: z.ZodUnion<readonly [z.ZodEnum<{
|
|
133
|
+
str: "str";
|
|
134
|
+
dex: "dex";
|
|
135
|
+
con: "con";
|
|
136
|
+
int: "int";
|
|
137
|
+
wis: "wis";
|
|
138
|
+
cha: "cha";
|
|
139
|
+
}>, z.ZodLiteral<"spellcasting">]>;
|
|
140
|
+
weapons: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"chosen">, z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
+
kind: z.ZodLiteral<"roll-modifier">;
|
|
143
|
+
mode: z.ZodEnum<{
|
|
144
|
+
advantage: "advantage";
|
|
145
|
+
disadvantage: "disadvantage";
|
|
146
|
+
}>;
|
|
147
|
+
roll: z.ZodEnum<{
|
|
148
|
+
"saving-throw": "saving-throw";
|
|
149
|
+
"ability-check": "ability-check";
|
|
150
|
+
attack: "attack";
|
|
151
|
+
}>;
|
|
152
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
153
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
154
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
155
|
+
kind: z.ZodLiteral<"extra-attack">;
|
|
156
|
+
count: z.ZodNumber;
|
|
157
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
158
|
+
kind: z.ZodLiteral<"crit-range">;
|
|
159
|
+
min_roll: z.ZodNumber;
|
|
160
|
+
applies_to: z.ZodOptional<z.ZodEnum<{
|
|
161
|
+
weapon: "weapon";
|
|
162
|
+
spell: "spell";
|
|
163
|
+
all: "all";
|
|
164
|
+
}>>;
|
|
165
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
167
|
+
kind: z.ZodLiteral<"reroll-damage">;
|
|
168
|
+
max_reroll: z.ZodNumber;
|
|
169
|
+
applies_to: z.ZodOptional<z.ZodEnum<{
|
|
170
|
+
weapon: "weapon";
|
|
171
|
+
spell: "spell";
|
|
172
|
+
all: "all";
|
|
173
|
+
}>>;
|
|
174
|
+
once_per_die: z.ZodOptional<z.ZodBoolean>;
|
|
175
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
176
|
+
kind: z.ZodLiteral<"attack-rule">;
|
|
177
|
+
flag: z.ZodEnum<{
|
|
178
|
+
"no-ranged-in-melee-disadvantage": "no-ranged-in-melee-disadvantage";
|
|
179
|
+
}>;
|
|
180
|
+
}, z.core.$strip>], "kind">>;
|
|
181
|
+
grants_asi: z.ZodNullable<z.ZodObject<{
|
|
182
|
+
amount: z.ZodNumber;
|
|
183
|
+
pool: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
184
|
+
str: "str";
|
|
185
|
+
dex: "dex";
|
|
186
|
+
con: "con";
|
|
187
|
+
int: "int";
|
|
188
|
+
wis: "wis";
|
|
189
|
+
cha: "cha";
|
|
190
|
+
}>>>;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
repeatable: z.ZodBoolean;
|
|
193
|
+
choices: z.ZodArray<z.ZodType<import("../index.js").Choice, unknown, z.core.$ZodTypeInternals<import("../index.js").Choice, unknown>>>;
|
|
194
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Choice, Ability, FeatCategory, FeatureEffect } from "@archivist-gg/dnd5e";
|
|
2
|
+
import type { Edition } from "@archivist-gg/dnd5e/types/edition";
|
|
3
|
+
import type { Resource } from "@archivist-gg/dnd5e/types/resource";
|
|
4
|
+
export type FeatPrerequisite = {
|
|
5
|
+
kind: "ability";
|
|
6
|
+
ability: Ability;
|
|
7
|
+
min: number;
|
|
8
|
+
} | {
|
|
9
|
+
kind: "level";
|
|
10
|
+
min: number;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "spellcaster";
|
|
13
|
+
} | {
|
|
14
|
+
kind: "proficiency";
|
|
15
|
+
proficiency_type: "armor" | "weapon" | "tool" | "skill" | "saving-throw";
|
|
16
|
+
value: string;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "race";
|
|
19
|
+
slug: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "class";
|
|
22
|
+
slug: string;
|
|
23
|
+
};
|
|
24
|
+
export interface FeatGrantsAsi {
|
|
25
|
+
amount: number;
|
|
26
|
+
pool?: Ability[];
|
|
27
|
+
}
|
|
28
|
+
export interface FeatEntity {
|
|
29
|
+
slug: string;
|
|
30
|
+
name: string;
|
|
31
|
+
edition: Edition;
|
|
32
|
+
source: string;
|
|
33
|
+
category: FeatCategory;
|
|
34
|
+
description: string;
|
|
35
|
+
prerequisites: FeatPrerequisite[];
|
|
36
|
+
benefits: string[];
|
|
37
|
+
effects: FeatureEffect[];
|
|
38
|
+
grants_asi: FeatGrantsAsi | null;
|
|
39
|
+
repeatable: boolean;
|
|
40
|
+
choices: Choice[];
|
|
41
|
+
resources?: Resource[];
|
|
42
|
+
}
|
|
File without changes
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./types/index.js";
|
|
2
|
+
export * from "./monster/monster.types.js";
|
|
3
|
+
export { parseMonster } from "./monster/monster.parser.js";
|
|
4
|
+
export { enrichMonster } from "./monster/monster.enrichment.js";
|
|
5
|
+
export { monsterCodec } from "./monster/monster.codec.js";
|
|
6
|
+
export type { MonsterRaw } from "./monster/monster.codec.js";
|
|
7
|
+
export { resolveMonster } from "./monster/monster.resolve.js";
|
|
8
|
+
export { monsterEntityType } from "./monster/monster.entity-type.js";
|
|
9
|
+
export { monsterGeneratable } from "./monster/monster.generatable.js";
|
|
10
|
+
export { dnd5ePack } from "./pack.js";
|
|
11
|
+
export * from "./inline-tag-parser.js";
|
|
12
|
+
export * from "./srd-store.js";
|