@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,28 @@
|
|
|
1
|
+
// src/spell/spell.scaling.ts
|
|
2
|
+
function spellScales(spell) {
|
|
3
|
+
var _a, _b, _c, _d;
|
|
4
|
+
return ((_b = (_a = spell.casting_options) == null ? void 0 : _a.length) != null ? _b : 0) > 0 || ((_d = (_c = spell.at_higher_levels) == null ? void 0 : _c.length) != null ? _d : 0) > 0;
|
|
5
|
+
}
|
|
6
|
+
function spellEffectAtSlot(spell, slotLevel) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const opt = ((_a = spell.casting_options) != null ? _a : []).find((o) => o.type === `slot_level_${slotLevel}`);
|
|
9
|
+
if (!opt) return null;
|
|
10
|
+
if (opt.damage_roll) return opt.damage_roll;
|
|
11
|
+
if (typeof opt.target_count === "number") {
|
|
12
|
+
if (opt.target_count === slotLevel) return null;
|
|
13
|
+
return `${opt.target_count} targets`;
|
|
14
|
+
}
|
|
15
|
+
if (opt.duration) return opt.duration;
|
|
16
|
+
return (_b = opt.desc) != null ? _b : null;
|
|
17
|
+
}
|
|
18
|
+
function upcastLevelsFor(spell, ownedSlotLevels) {
|
|
19
|
+
var _a;
|
|
20
|
+
const base = (_a = spell.level) != null ? _a : 0;
|
|
21
|
+
if (base < 1 || !spellScales(spell)) return [];
|
|
22
|
+
return ownedSlotLevels.filter((l) => l > base).sort((a, b) => a - b);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
spellEffectAtSlot,
|
|
26
|
+
spellScales,
|
|
27
|
+
upcastLevelsFor
|
|
28
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const spellEntitySchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
level: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
school: z.ZodOptional<z.ZodString>;
|
|
6
|
+
casting_time: z.ZodOptional<z.ZodString>;
|
|
7
|
+
range: z.ZodOptional<z.ZodString>;
|
|
8
|
+
components: z.ZodOptional<z.ZodString>;
|
|
9
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
10
|
+
concentration: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
ritual: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
classes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
|
+
description: z.ZodOptional<z.ZodString>;
|
|
14
|
+
at_higher_levels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
+
damage: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
types: z.ZodArray<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
saving_throw: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
ability: z.ZodString;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
casting_options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
22
|
+
type: z.ZodString;
|
|
23
|
+
damage_roll: z.ZodOptional<z.ZodString>;
|
|
24
|
+
target_count: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
26
|
+
range: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
concentration: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
shape_size: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>>>;
|
|
31
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CastingOption } from "@archivist-gg/dnd5e/types/casting-option";
|
|
2
|
+
export type { CastingOption };
|
|
3
|
+
export interface Spell {
|
|
4
|
+
name: string;
|
|
5
|
+
level?: number;
|
|
6
|
+
school?: string;
|
|
7
|
+
casting_time?: string;
|
|
8
|
+
range?: string;
|
|
9
|
+
components?: string;
|
|
10
|
+
duration?: string;
|
|
11
|
+
concentration?: boolean;
|
|
12
|
+
ritual?: boolean;
|
|
13
|
+
classes?: string[];
|
|
14
|
+
description?: string;
|
|
15
|
+
at_higher_levels?: string[];
|
|
16
|
+
damage?: {
|
|
17
|
+
types: string[];
|
|
18
|
+
};
|
|
19
|
+
saving_throw?: {
|
|
20
|
+
ability: string;
|
|
21
|
+
};
|
|
22
|
+
casting_options?: CastingOption[];
|
|
23
|
+
source?: string;
|
|
24
|
+
edition?: "2014" | "2024" | string;
|
|
25
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface SrdEntity {
|
|
2
|
+
slug: string;
|
|
3
|
+
name: string;
|
|
4
|
+
entityType: string;
|
|
5
|
+
data: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
export type SrdEntityType = "monster" | "spell" | "item" | "armor" | "weapon" | "feat" | "condition" | "class" | "subclass" | "background" | "race" | "optional-feature";
|
|
8
|
+
export type SrdDataSources = Record<string, Record<string, unknown>[]>;
|
|
9
|
+
export declare class SrdStore {
|
|
10
|
+
/** slug -> SrdEntity for O(1) lookup */
|
|
11
|
+
private bySlug;
|
|
12
|
+
/** entityType -> SrdEntity[] for type-scoped operations */
|
|
13
|
+
private byType;
|
|
14
|
+
/**
|
|
15
|
+
* Load entities from a map of source-key -> raw JSON arrays.
|
|
16
|
+
* Source keys are resolved through TYPE_MAP (e.g. "monster" -> "monster",
|
|
17
|
+
* "magicitems" -> "item"). If a key is not in TYPE_MAP it is used as-is.
|
|
18
|
+
*/
|
|
19
|
+
loadFromData(sources: SrdDataSources): void;
|
|
20
|
+
/**
|
|
21
|
+
* Load all bundled SRD JSON files from the canonical pipeline runtime.
|
|
22
|
+
* Both 2014 and 2024 editions are merged into a single store; entities are
|
|
23
|
+
* disambiguated by their edition-prefixed slugs (e.g. "srd-5e_aboleth" vs
|
|
24
|
+
* "srd-2024_aboleth").
|
|
25
|
+
*/
|
|
26
|
+
loadFromBundledJson(): void;
|
|
27
|
+
/**
|
|
28
|
+
* O(1) lookup by slug.
|
|
29
|
+
*/
|
|
30
|
+
getBySlug(slug: string): SrdEntity | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Ranked search: exact match > starts-with > contains.
|
|
33
|
+
* Case-insensitive. Optionally filtered by entityType.
|
|
34
|
+
*/
|
|
35
|
+
search(query: string, entityType?: string, limit?: number): SrdEntity[];
|
|
36
|
+
/**
|
|
37
|
+
* Return all entities of a given type.
|
|
38
|
+
*/
|
|
39
|
+
getAllOfType(entityType: string): SrdEntity[];
|
|
40
|
+
/**
|
|
41
|
+
* Return all registered entity type strings.
|
|
42
|
+
*/
|
|
43
|
+
getTypes(): string[];
|
|
44
|
+
/**
|
|
45
|
+
* Total number of entities across all types.
|
|
46
|
+
*/
|
|
47
|
+
count(): number;
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Use getBySlug() instead. Kept for backward compatibility.
|
|
50
|
+
* Exact name match (case-insensitive). Searches all types or a specific type.
|
|
51
|
+
*/
|
|
52
|
+
getByName(name: string, entityType?: string): SrdEntity | null;
|
|
53
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DocCodec } from "@archivist-gg/core";
|
|
2
|
+
import type { SubclassEntity } from "./subclass.types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Normalizing codec (0c.1a). `parse` delegates to `parseSubclass`, which validates
|
|
5
|
+
* against `subclassEntitySchema`. `subclass.types` is this entity's dnd5e home for
|
|
6
|
+
* `SubclassEntity` (consumed by the PC resolver/types); its `Edition`/`SpellcastingConfig`
|
|
7
|
+
* imports resolve dnd5e-internally from `class.types`. `serialize` stays `yaml.dump`
|
|
8
|
+
* (the edit-save path uses obsidian's separate serializer; gate (d) verifies `yaml.dump`
|
|
9
|
+
* round-trips through `parseSubclass`).
|
|
10
|
+
*/
|
|
11
|
+
export declare const subclassCodec: DocCodec<SubclassEntity>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
subclassCodec
|
|
3
|
+
} from "../chunk-SSXBYF3P.js";
|
|
4
|
+
import "../chunk-PMADYMUI.js";
|
|
5
|
+
import "../chunk-B7UXKNLD.js";
|
|
6
|
+
import "../chunk-4TIJKN6O.js";
|
|
7
|
+
import "../chunk-DABBCYTT.js";
|
|
8
|
+
import "../chunk-WYGD2UGN.js";
|
|
9
|
+
import "../chunk-PZOWBI3B.js";
|
|
10
|
+
import "../chunk-CDW7R2QT.js";
|
|
11
|
+
import "../chunk-NXR3BD2V.js";
|
|
12
|
+
export {
|
|
13
|
+
subclassCodec
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseSubclass
|
|
3
|
+
} from "../chunk-PMADYMUI.js";
|
|
4
|
+
import "../chunk-B7UXKNLD.js";
|
|
5
|
+
import "../chunk-4TIJKN6O.js";
|
|
6
|
+
import "../chunk-DABBCYTT.js";
|
|
7
|
+
import "../chunk-WYGD2UGN.js";
|
|
8
|
+
import "../chunk-PZOWBI3B.js";
|
|
9
|
+
import "../chunk-CDW7R2QT.js";
|
|
10
|
+
import "../chunk-NXR3BD2V.js";
|
|
11
|
+
export {
|
|
12
|
+
parseSubclass
|
|
13
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const subclassEntitySchema: z.ZodObject<{
|
|
3
|
+
slug: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
parent_class: z.ZodString;
|
|
6
|
+
edition: z.ZodEnum<{
|
|
7
|
+
2014: "2014";
|
|
8
|
+
2024: "2024";
|
|
9
|
+
}>;
|
|
10
|
+
source: z.ZodString;
|
|
11
|
+
description: z.ZodString;
|
|
12
|
+
spellcasting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
13
|
+
caster_type: z.ZodEnum<{
|
|
14
|
+
pact: "pact";
|
|
15
|
+
full: "full";
|
|
16
|
+
half: "half";
|
|
17
|
+
third: "third";
|
|
18
|
+
}>;
|
|
19
|
+
ability: z.ZodEnum<{
|
|
20
|
+
str: "str";
|
|
21
|
+
dex: "dex";
|
|
22
|
+
con: "con";
|
|
23
|
+
int: "int";
|
|
24
|
+
wis: "wis";
|
|
25
|
+
cha: "cha";
|
|
26
|
+
}>;
|
|
27
|
+
preparation: z.ZodEnum<{
|
|
28
|
+
known: "known";
|
|
29
|
+
prepared: "prepared";
|
|
30
|
+
}>;
|
|
31
|
+
spell_list: z.ZodString;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
table: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
34
|
+
columns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
35
|
+
}, z.core.$strip>>>;
|
|
36
|
+
features_by_level: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
37
|
+
resources: z.ZodArray<z.ZodObject<{
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
max_formula: z.ZodString;
|
|
41
|
+
scales_at: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
42
|
+
level: z.ZodNumber;
|
|
43
|
+
max: z.ZodString;
|
|
44
|
+
}, z.core.$strict>>>;
|
|
45
|
+
die: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
base: z.ZodString;
|
|
47
|
+
scaling: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
reset: z.ZodEnum<{
|
|
50
|
+
"short-rest": "short-rest";
|
|
51
|
+
"long-rest": "long-rest";
|
|
52
|
+
dawn: "dawn";
|
|
53
|
+
dusk: "dusk";
|
|
54
|
+
turn: "turn";
|
|
55
|
+
round: "round";
|
|
56
|
+
custom: "custom";
|
|
57
|
+
}>;
|
|
58
|
+
consumes: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
resource: z.ZodString;
|
|
60
|
+
amount: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
recovery: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
amount: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
66
|
+
action: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
action: "action";
|
|
68
|
+
"bonus-action": "bonus-action";
|
|
69
|
+
reaction: "reaction";
|
|
70
|
+
free: "free";
|
|
71
|
+
special: "special";
|
|
72
|
+
}>>;
|
|
73
|
+
uses: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
reset: z.ZodEnum<{
|
|
75
|
+
"short-rest": "short-rest";
|
|
76
|
+
"long-rest": "long-rest";
|
|
77
|
+
dawn: "dawn";
|
|
78
|
+
dusk: "dusk";
|
|
79
|
+
turn: "turn";
|
|
80
|
+
round: "round";
|
|
81
|
+
custom: "custom";
|
|
82
|
+
}>;
|
|
83
|
+
}, z.core.$strip>>>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
selection_pools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
86
|
+
id: z.ZodString;
|
|
87
|
+
label: z.ZodString;
|
|
88
|
+
source: z.ZodObject<{
|
|
89
|
+
entity_type: z.ZodLiteral<"optional-feature">;
|
|
90
|
+
where: z.ZodObject<{
|
|
91
|
+
feature_type: z.ZodString;
|
|
92
|
+
available_to: z.ZodLiteral<"self">;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
count: z.ZodObject<{
|
|
96
|
+
column: z.ZodString;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
replaceable: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
+
}, z.core.$strip>>>;
|
|
100
|
+
pool_grants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
101
|
+
pool: z.ZodString;
|
|
102
|
+
grants: z.ZodArray<z.ZodObject<{
|
|
103
|
+
feature: z.ZodString;
|
|
104
|
+
at_level: z.ZodNumber;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
}, z.core.$strip>>>;
|
|
107
|
+
tabs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
label: z.ZodString;
|
|
110
|
+
renders: z.ZodObject<{
|
|
111
|
+
pool: z.ZodString;
|
|
112
|
+
layout: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
"spell-like": "spell-like";
|
|
114
|
+
blocks: "blocks";
|
|
115
|
+
}>>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
}, z.core.$strip>>>;
|
|
118
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
subclassEntitySchema
|
|
3
|
+
} from "../chunk-B7UXKNLD.js";
|
|
4
|
+
import "../chunk-4TIJKN6O.js";
|
|
5
|
+
import "../chunk-DABBCYTT.js";
|
|
6
|
+
import "../chunk-WYGD2UGN.js";
|
|
7
|
+
import "../chunk-PZOWBI3B.js";
|
|
8
|
+
import "../chunk-CDW7R2QT.js";
|
|
9
|
+
import "../chunk-NXR3BD2V.js";
|
|
10
|
+
export {
|
|
11
|
+
subclassEntitySchema
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Feature, Resource } from "@archivist-gg/dnd5e";
|
|
2
|
+
import type { Edition, SpellcastingConfig } from "@archivist-gg/dnd5e/class/class.types";
|
|
3
|
+
import type { SelectionPool, PoolGrant, TabDecl } from "@archivist-gg/dnd5e/types/selection-pool";
|
|
4
|
+
export interface SubclassEntity {
|
|
5
|
+
slug: string;
|
|
6
|
+
name: string;
|
|
7
|
+
parent_class: string;
|
|
8
|
+
edition: Edition;
|
|
9
|
+
source: string;
|
|
10
|
+
description: string;
|
|
11
|
+
spellcasting?: SpellcastingConfig | null;
|
|
12
|
+
table?: Record<number, {
|
|
13
|
+
columns?: Record<string, string | number>;
|
|
14
|
+
}>;
|
|
15
|
+
features_by_level: Record<number, Feature[]>;
|
|
16
|
+
resources: Resource[];
|
|
17
|
+
selection_pools?: SelectionPool[];
|
|
18
|
+
pool_grants?: PoolGrant[];
|
|
19
|
+
tabs?: TabDecl[];
|
|
20
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Ability } from "./choice.js";
|
|
2
|
+
export interface AttackRange {
|
|
3
|
+
normal?: number;
|
|
4
|
+
long?: number;
|
|
5
|
+
reach?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface Attack {
|
|
8
|
+
name: string;
|
|
9
|
+
type: "melee" | "ranged" | "spell";
|
|
10
|
+
ability?: Ability[] | Ability;
|
|
11
|
+
bonus?: number;
|
|
12
|
+
damage?: string;
|
|
13
|
+
damage_type?: string;
|
|
14
|
+
extra_damage?: {
|
|
15
|
+
dice: string;
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
action?: "action" | "bonus-action" | "reaction";
|
|
19
|
+
properties?: string[];
|
|
20
|
+
range?: AttackRange;
|
|
21
|
+
condition?: string;
|
|
22
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** A single alternate casting mode for a spell (e.g. a different shape, range,
|
|
2
|
+
* or scaling). Lives in dnd5e so the build-time SRD spell merger can consume
|
|
3
|
+
* it without a tools→obsidian reverse edge; obsidian `spell.types` re-exports
|
|
4
|
+
* it for the renderer/parser. */
|
|
5
|
+
export interface CastingOption {
|
|
6
|
+
type: string;
|
|
7
|
+
damage_roll?: string;
|
|
8
|
+
target_count?: number;
|
|
9
|
+
duration?: string;
|
|
10
|
+
range?: number;
|
|
11
|
+
concentration?: boolean;
|
|
12
|
+
shape_size?: number;
|
|
13
|
+
desc?: string;
|
|
14
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Abilities } from "./abilities.js";
|
|
2
|
+
import type { FeatureEffect } from "./feature-effect.js";
|
|
3
|
+
export type Ability = keyof Abilities;
|
|
4
|
+
export type SkillSlug = "acrobatics" | "animal-handling" | "arcana" | "athletics" | "deception" | "history" | "insight" | "intimidation" | "investigation" | "medicine" | "nature" | "perception" | "performance" | "persuasion" | "religion" | "sleight-of-hand" | "stealth" | "survival";
|
|
5
|
+
export declare const ALL_SKILL_SLUGS: SkillSlug[];
|
|
6
|
+
export type FeatCategory = "origin" | "general" | "fighting-style" | "epic-boon";
|
|
7
|
+
/** Closed, enumerated registry filter — YAML can never express a query the
|
|
8
|
+
* engine would apply unsafely. `"self"` resolves against the owning
|
|
9
|
+
* class/subclass at ledger-build time. */
|
|
10
|
+
export interface EntityFilter {
|
|
11
|
+
feature_type?: string;
|
|
12
|
+
category?: string;
|
|
13
|
+
parent_class?: "self";
|
|
14
|
+
available_to?: "self";
|
|
15
|
+
/** Weapon proficiency class. Matched against a weapon entity's compound
|
|
16
|
+
* `category` (e.g. "martial-melee") by prefix, so "martial" covers both
|
|
17
|
+
* martial-melee and martial-ranged. */
|
|
18
|
+
weapon_category?: "simple" | "martial";
|
|
19
|
+
/** Armor proficiency class. Matched against an armor entity's `category`
|
|
20
|
+
* field exactly; "shield" selects shields. */
|
|
21
|
+
armor_category?: "light" | "medium" | "heavy" | "shield";
|
|
22
|
+
}
|
|
23
|
+
export interface InlineOption {
|
|
24
|
+
value: string;
|
|
25
|
+
label: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
/** Applied via a synthesized resolved feature when the option is selected. */
|
|
28
|
+
effects?: FeatureEffect[];
|
|
29
|
+
/** Nested decisions revealed when this option is selected (recursive). */
|
|
30
|
+
choices?: Choice[];
|
|
31
|
+
}
|
|
32
|
+
/** The four game-agnostic decision primitives. All game knowledge (which
|
|
33
|
+
* options, which counts) lives in data — authored in the SRD overlay or
|
|
34
|
+
* inline in homebrew entity notes. `id` is the persistence key under
|
|
35
|
+
* `ClassEntry.choices[level]` / `Character.origin_choices`. */
|
|
36
|
+
export type Choice = {
|
|
37
|
+
kind: "select-inline";
|
|
38
|
+
id: string;
|
|
39
|
+
label?: string;
|
|
40
|
+
count?: number;
|
|
41
|
+
options: InlineOption[];
|
|
42
|
+
} | {
|
|
43
|
+
kind: "select-entity";
|
|
44
|
+
id: string;
|
|
45
|
+
label?: string;
|
|
46
|
+
count?: number;
|
|
47
|
+
entity_type: string;
|
|
48
|
+
from?: string[];
|
|
49
|
+
where?: EntityFilter;
|
|
50
|
+
} | {
|
|
51
|
+
kind: "select-proficiency";
|
|
52
|
+
id: string;
|
|
53
|
+
label?: string;
|
|
54
|
+
count: number;
|
|
55
|
+
domain: "skill" | "tool" | "language" | "save";
|
|
56
|
+
from?: string[];
|
|
57
|
+
from_proficient?: boolean;
|
|
58
|
+
expertise?: boolean;
|
|
59
|
+
} | {
|
|
60
|
+
kind: "ability-points";
|
|
61
|
+
id: string;
|
|
62
|
+
label?: string;
|
|
63
|
+
points: number;
|
|
64
|
+
max_per: number;
|
|
65
|
+
pool?: Ability[];
|
|
66
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** One thing a starting-equipment option grants. `item` is a BARE compendium
|
|
2
|
+
* slug (e.g. "chain-mail"); the seeder resolves it to the full edition slug.
|
|
3
|
+
* `category` is a player-picked class of item ("martial-weapon",
|
|
4
|
+
* "simple-weapon", "martial-melee-weapon", "any-armor", "shield", …) resolved
|
|
5
|
+
* by a nested select-entity. `gold` is gp folded into the bundle. */
|
|
6
|
+
export type EquipmentGrant = {
|
|
7
|
+
item: string;
|
|
8
|
+
qty?: number;
|
|
9
|
+
} | {
|
|
10
|
+
category: string;
|
|
11
|
+
qty?: number;
|
|
12
|
+
} | {
|
|
13
|
+
gold: number;
|
|
14
|
+
};
|
|
15
|
+
/** One selectable option of a `kind:"choice"` starting-equipment entry. `label`
|
|
16
|
+
* is the human display string (the `.pc-cb-eqopt` text); `grants` is what seeds. */
|
|
17
|
+
export interface EquipmentOption {
|
|
18
|
+
label: string;
|
|
19
|
+
grants: EquipmentGrant[];
|
|
20
|
+
}
|
|
21
|
+
/** Structured starting equipment. Shared by class + background. A `fixed` entry
|
|
22
|
+
* may carry a `label` for the un-parsed (prose fallback) case where `grants`
|
|
23
|
+
* is empty — it then displays but seeds nothing (graceful degradation). */
|
|
24
|
+
export type StartingEquipmentEntry = {
|
|
25
|
+
kind: "choice";
|
|
26
|
+
options: EquipmentOption[];
|
|
27
|
+
} | {
|
|
28
|
+
kind: "fixed";
|
|
29
|
+
label?: string;
|
|
30
|
+
grants: EquipmentGrant[];
|
|
31
|
+
} | {
|
|
32
|
+
kind: "gold";
|
|
33
|
+
amount: number;
|
|
34
|
+
};
|
|
35
|
+
/** Buy-with-Gold budget. `fixed` gp (2024) or a `dice`×`multiplier` roll (2014
|
|
36
|
+
* "XdY × 10"); average is derived by the consumer. */
|
|
37
|
+
export interface StartingGold {
|
|
38
|
+
fixed?: number;
|
|
39
|
+
dice?: string;
|
|
40
|
+
multiplier?: number;
|
|
41
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { Ability } from "./choice.js";
|
|
2
|
+
export type SenseType = "darkvision" | "blindsight" | "tremorsense" | "truesight";
|
|
3
|
+
export type FeatureEffect = {
|
|
4
|
+
kind: "initiative-bonus";
|
|
5
|
+
value: number;
|
|
6
|
+
} | {
|
|
7
|
+
kind: "immune-condition";
|
|
8
|
+
condition: string;
|
|
9
|
+
while?: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: "resistance";
|
|
12
|
+
damage_type: string;
|
|
13
|
+
} | {
|
|
14
|
+
kind: "hp-per-level-bonus";
|
|
15
|
+
value: number;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "speed-bonus";
|
|
18
|
+
mode: "walk" | "fly" | "swim" | "climb" | "burrow";
|
|
19
|
+
value: number;
|
|
20
|
+
set?: boolean;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "sense";
|
|
23
|
+
type: SenseType;
|
|
24
|
+
range: number;
|
|
25
|
+
} | {
|
|
26
|
+
kind: "apply-condition";
|
|
27
|
+
condition: string;
|
|
28
|
+
duration?: string;
|
|
29
|
+
ends_on?: string[];
|
|
30
|
+
save_repeat?: {
|
|
31
|
+
ability: string;
|
|
32
|
+
timing: string;
|
|
33
|
+
};
|
|
34
|
+
} | {
|
|
35
|
+
kind: "damage-bonus";
|
|
36
|
+
damage_type: string;
|
|
37
|
+
amount: string;
|
|
38
|
+
applies_to?: "weapon" | "spell" | "all";
|
|
39
|
+
condition?: string;
|
|
40
|
+
} | {
|
|
41
|
+
kind: "proficiency";
|
|
42
|
+
proficiency_type: "skill" | "tool" | "language" | "saving-throw" | "armor" | "weapon";
|
|
43
|
+
value: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: "ac-bonus";
|
|
46
|
+
value: number;
|
|
47
|
+
requires_armor?: boolean;
|
|
48
|
+
} | {
|
|
49
|
+
kind: "unarmored-ac";
|
|
50
|
+
abilities: Ability[];
|
|
51
|
+
base?: number;
|
|
52
|
+
allow_shield?: boolean;
|
|
53
|
+
} | {
|
|
54
|
+
kind: "weapon-ability";
|
|
55
|
+
ability: Ability | "spellcasting";
|
|
56
|
+
weapons?: string | string[];
|
|
57
|
+
} | {
|
|
58
|
+
kind: "roll-modifier";
|
|
59
|
+
mode: "advantage" | "disadvantage";
|
|
60
|
+
roll: "ability-check" | "saving-throw" | "attack";
|
|
61
|
+
scope?: string;
|
|
62
|
+
condition?: string;
|
|
63
|
+
} | {
|
|
64
|
+
kind: "crit-range";
|
|
65
|
+
min_roll: number;
|
|
66
|
+
applies_to?: "weapon" | "spell" | "all";
|
|
67
|
+
condition?: string;
|
|
68
|
+
} | {
|
|
69
|
+
kind: "extra-attack";
|
|
70
|
+
count: number;
|
|
71
|
+
} | {
|
|
72
|
+
kind: "reroll-damage";
|
|
73
|
+
max_reroll: number;
|
|
74
|
+
applies_to?: "weapon" | "spell" | "all";
|
|
75
|
+
once_per_die?: boolean;
|
|
76
|
+
} | {
|
|
77
|
+
kind: "attack-rule";
|
|
78
|
+
flag: "no-ranged-in-melee-disadvantage";
|
|
79
|
+
};
|
|
File without changes
|