@archivist-gg/dnd5e 0.3.0 → 0.3.4
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/LICENSES/SRD.md +25 -6
- package/dist/armor/armor.codec.js +4 -3
- package/dist/armor/armor.parser.js +3 -2
- package/dist/armor/armor.schema.d.ts +4 -0
- package/dist/armor/armor.schema.js +2 -1
- package/dist/armor/armor.types.d.ts +8 -0
- package/dist/background/background.codec.js +7 -6
- package/dist/background/background.parser.js +6 -5
- package/dist/background/background.schema.d.ts +34 -0
- package/dist/background/background.schema.js +9 -6
- package/dist/background/background.types.d.ts +22 -0
- package/dist/{chunk-4TIJKN6O.js → chunk-23LZLBJK.js} +1 -1
- package/dist/{chunk-AFKTJXRA.js → chunk-2DFENQIJ.js} +18 -0
- package/dist/chunk-2FRUSVZS.js +489 -0
- package/dist/chunk-4FWNK4FD.js +159 -0
- package/dist/chunk-4U55VNC7.js +22 -0
- package/dist/{chunk-4JHOHWBI.js → chunk-4XTNPNQB.js} +1 -1
- package/dist/{chunk-HCP3GMHS.js → chunk-5N2GW72F.js} +15 -2
- package/dist/{chunk-42Y5IJKT.js → chunk-5U5FFFA3.js} +5 -1
- package/dist/{chunk-4F6AIZ36.js → chunk-5XMQPTHD.js} +1 -1
- package/dist/{chunk-GJOI2GHP.js → chunk-6GNXYAYP.js} +1 -1
- package/dist/chunk-6PKV5V2H.js +178 -0
- package/dist/{chunk-66XXW2Z2.js → chunk-6PXTNCBP.js} +2 -2
- package/dist/chunk-6X2NV665.js +33 -0
- package/dist/{chunk-LV4SNWZQ.js → chunk-6X4KUDMU.js} +8 -1
- package/dist/{chunk-ZMR77DDL.js → chunk-AW3EHF3L.js} +1 -1
- package/dist/chunk-CJYCVNW2.js +7 -0
- package/dist/chunk-COEOOQX2.js +133 -0
- package/dist/{chunk-XTIQWSFM.js → chunk-D5U7GMPX.js} +1 -1
- package/dist/{chunk-RAWJTA45.js → chunk-DEEHHLAP.js} +1 -1
- package/dist/chunk-DPUJDOKV.js +365 -0
- package/dist/{chunk-73HOFQQ5.js → chunk-ESS46GR4.js} +1 -1
- package/dist/chunk-EVMUJYUD.js +195 -0
- package/dist/{chunk-2BWAID3Y.js → chunk-FDBWYMZK.js} +29 -3
- package/dist/{chunk-K6Q5OUGK.js → chunk-GFZ7PITJ.js} +86 -10
- package/dist/chunk-H7KBLR4X.js +81 -0
- package/dist/{chunk-L7E2UT5A.js → chunk-HB7XZXDK.js} +5 -1
- package/dist/{chunk-VTYUBINW.js → chunk-HJ5EEZ47.js} +1 -1
- package/dist/{chunk-6NK2MUD3.js → chunk-HZA7OE7N.js} +9 -2
- package/dist/{chunk-A4WENOUQ.js → chunk-I2NDWFDD.js} +52 -8
- package/dist/{chunk-RSDRMH54.js → chunk-IMZFOOVL.js} +1 -1
- package/dist/{chunk-3DZ74AKK.js → chunk-IN4M4X7P.js} +8 -2
- package/dist/chunk-IUAAXXNO.js +58 -0
- package/dist/{chunk-XJNECUPT.js → chunk-JC5UNIVM.js} +19 -0
- package/dist/chunk-JJ46T5XX.js +297 -0
- package/dist/{chunk-TUIFSVLI.js → chunk-JRDPUDT5.js} +30 -3
- package/dist/{chunk-24GFQU7T.js → chunk-JSZ4H6AQ.js} +1 -1
- package/dist/chunk-KU3YLF6D.js +106 -0
- package/dist/{chunk-5INR4NSL.js → chunk-LDDCNPHD.js} +1 -1
- package/dist/{chunk-DZXSWSBP.js → chunk-LMBAEIP6.js} +1 -1
- package/dist/chunk-LVQLWRCU.js +15 -0
- package/dist/chunk-MI7P3NX3.js +161 -0
- package/dist/chunk-O4SRD3J5.js +165 -0
- package/dist/{chunk-EMOORSQ7.js → chunk-OSQFPGLM.js} +45 -6
- package/dist/chunk-OZP6JFGT.js +162 -0
- package/dist/{chunk-NAEPSZAM.js → chunk-PDJSUH24.js} +24 -2
- package/dist/chunk-PP2UHLBA.js +50 -0
- package/dist/chunk-PVCEA4HZ.js +6 -0
- package/dist/{chunk-XLSVNUTK.js → chunk-R3VAKWKW.js} +1 -1
- package/dist/chunk-RIXI5D3R.js +89 -0
- package/dist/chunk-RLGQ5PZZ.js +16 -0
- package/dist/chunk-S7REMWW4.js +21 -0
- package/dist/{chunk-7VJ6BOA5.js → chunk-SMLXZUBH.js} +9 -1
- package/dist/{chunk-NXSWH3AE.js → chunk-T26ZVCL5.js} +1 -1
- package/dist/chunk-TOM66P2P.js +38 -0
- package/dist/chunk-UA5KS2PL.js +26 -0
- package/dist/{chunk-N6N74K6X.js → chunk-UBBKSYBY.js} +1 -1
- package/dist/{chunk-353WXS6S.js → chunk-UIRMA5KM.js} +1 -1
- package/dist/{chunk-GE4TLPWM.js → chunk-US5IKYCW.js} +1 -1
- package/dist/chunk-UXPGW4TI.js +101 -0
- package/dist/chunk-VQAXTIBW.js +100 -0
- package/dist/{chunk-WP2CX2JO.js → chunk-WELIKLZF.js} +22 -1
- package/dist/chunk-WPWOHGPI.js +172 -0
- package/dist/{chunk-GZ46OVGZ.js → chunk-WSVMLNTO.js} +1 -1
- package/dist/{chunk-4LZJXJJS.js → chunk-WXWPK3LI.js} +6 -2
- package/dist/{chunk-ZZGEVJKX.js → chunk-XBQMCEI2.js} +1 -1
- package/dist/{chunk-PHQRGDRQ.js → chunk-XGOFP7AQ.js} +5 -1
- package/dist/chunk-XJ2F2WO6.js +8 -0
- package/dist/chunk-XQCSGNXE.js +1580 -0
- package/dist/chunk-YBLDE5CG.js +42 -0
- package/dist/{chunk-JEYQU3JT.js → chunk-YHYTW5QA.js} +2 -18
- package/dist/{chunk-TLYDBT5F.js → chunk-YJJTISBN.js} +64 -7
- package/dist/{chunk-PZOWBI3B.js → chunk-YLL2QXY2.js} +7 -2
- package/dist/{chunk-MDEJHMKK.js → chunk-ZONJ66NE.js} +26 -5
- package/dist/class/class.codec.js +12 -9
- package/dist/class/class.parser.js +11 -8
- package/dist/class/class.schema.d.ts +55 -3
- package/dist/class/class.schema.js +9 -7
- package/dist/class/class.types.d.ts +48 -3
- package/dist/condition/condition.codec.d.ts +9 -0
- package/dist/condition/condition.entity-type.d.ts +2 -0
- package/dist/condition/condition.parser.d.ts +13 -0
- package/dist/condition/condition.parser.js +7 -0
- package/dist/condition/condition.schema.d.ts +29 -0
- package/dist/condition/condition.types.d.ts +15 -0
- package/dist/condition/condition.types.js +0 -0
- package/dist/dnd/constants.d.ts +22 -0
- package/dist/dnd/constants.js +9 -3
- package/dist/dnd/formula-tags.js +2 -2
- package/dist/dnd/math.d.ts +26 -0
- package/dist/dnd/math.js +12 -2
- package/dist/dnd/prose-tags.js +1 -1
- package/dist/dnd/resource-formula.d.ts +36 -10
- package/dist/dnd/resource-formula.js +10 -155
- package/dist/dnd/srd-tag-converter.js +3 -3
- package/dist/dnd/tag-grammar.js +1 -1
- package/dist/dnd/warn-once.d.ts +2 -0
- package/dist/dnd/warn-once.js +8 -0
- package/dist/entities/base-item-resolver.js +2 -2
- package/dist/entities/slug.d.ts +13 -0
- package/dist/entities/slug.js +5 -3
- package/dist/entities/wikilink-display.d.ts +3 -0
- package/dist/entities/wikilink-display.js +10 -0
- package/dist/feat/feat.category-codes.d.ts +32 -0
- package/dist/feat/feat.category-codes.js +14 -0
- package/dist/feat/feat.codec.js +7 -5
- package/dist/feat/feat.parser.js +6 -4
- package/dist/feat/feat.schema.d.ts +230 -0
- package/dist/feat/feat.schema.js +5 -3
- package/dist/feat/feat.types.d.ts +37 -1
- package/dist/index.js +2120 -6923
- package/dist/item/item.ai-schema.d.ts +1 -1
- package/dist/item/item.codec.js +4 -3
- package/dist/item/item.enrichment.js +4 -4
- package/dist/item/item.parser.js +3 -2
- package/dist/item/item.schema.d.ts +69 -3
- package/dist/item/item.schema.js +2 -1
- package/dist/item/item.types.d.ts +69 -3
- package/dist/monster/monster.codec.d.ts +7 -6
- package/dist/monster/monster.enrichment.js +4 -4
- package/dist/monster/monster.format.d.ts +135 -0
- package/dist/monster/monster.format.js +78 -0
- package/dist/monster/monster.parser.d.ts +6 -1
- package/dist/monster/monster.parser.js +10 -1
- package/dist/monster/monster.schema.d.ts +369 -0
- package/dist/monster/monster.schema.js +34 -0
- package/dist/monster/monster.types.d.ts +200 -14
- package/dist/optional-feature/optional-feature.codec.js +6 -5
- package/dist/optional-feature/optional-feature.parser.js +5 -4
- package/dist/optional-feature/optional-feature.schema.d.ts +176 -0
- package/dist/optional-feature/optional-feature.schema.js +4 -3
- package/dist/pack.d.ts +1 -1
- package/dist/pc/conditions.constants.d.ts +0 -1
- package/dist/pc/conditions.constants.js +1 -3
- package/dist/pc/decision-recognizer.js +1 -1
- package/dist/pc/pc.additional-spells.d.ts +47 -0
- package/dist/pc/pc.additional-spells.js +23 -0
- package/dist/pc/pc.asi-flatten.d.ts +18 -0
- package/dist/pc/pc.decision-engine.d.ts +106 -5
- package/dist/pc/pc.decision-engine.js +28 -10
- package/dist/pc/pc.defense-normalize.d.ts +11 -0
- package/dist/pc/pc.defense-normalize.js +6 -0
- package/dist/pc/pc.equipment.d.ts +30 -1
- package/dist/pc/pc.equipment.js +12 -7
- package/dist/pc/pc.feature-effects.d.ts +225 -11
- package/dist/pc/pc.feature-effects.js +21 -5
- package/dist/pc/pc.parser.js +2 -2
- package/dist/pc/pc.pools.d.ts +11 -3
- package/dist/pc/pc.pools.js +9 -13
- package/dist/pc/pc.proficiencies.d.ts +60 -4
- package/dist/pc/pc.proficiencies.js +89 -37
- package/dist/pc/pc.proficiency-grants.d.ts +58 -0
- package/dist/pc/pc.proficiency-normalize.d.ts +29 -0
- package/dist/pc/pc.proficiency-normalize.js +12 -0
- package/dist/pc/pc.proficiency-query.d.ts +13 -0
- package/dist/pc/pc.proficiency-query.js +5 -1
- package/dist/pc/pc.recalc.d.ts +69 -14
- package/dist/pc/pc.recalc.js +291 -142
- package/dist/pc/pc.resolver.d.ts +34 -8
- package/dist/pc/pc.resolver.js +27 -12
- package/dist/pc/pc.resource-seed.d.ts +3 -2
- package/dist/pc/pc.resource-seed.js +19 -17
- package/dist/pc/pc.resources.d.ts +87 -0
- package/dist/pc/pc.resources.js +21 -0
- package/dist/pc/pc.rest.d.ts +10 -1
- package/dist/pc/pc.rest.js +66 -12
- package/dist/pc/pc.schema.d.ts +147 -7
- package/dist/pc/pc.schema.js +4 -2
- package/dist/pc/pc.slotting.js +3 -3
- package/dist/pc/pc.spellcasting.d.ts +80 -7
- package/dist/pc/pc.spellcasting.js +18 -6
- package/dist/pc/pc.table-column.d.ts +23 -0
- package/dist/pc/pc.table-column.js +13 -3
- package/dist/pc/pc.types.d.ts +253 -16
- package/dist/pc/pool-layout.d.ts +47 -0
- package/dist/pc/pool-layout.js +16 -0
- package/dist/pc/roll-scope.d.ts +2 -0
- package/dist/pc/roll-scope.js +8 -0
- package/dist/pc/roll-tag-labels.d.ts +40 -0
- package/dist/pc/roll-tag-labels.js +17 -0
- package/dist/pc/spell-source.d.ts +21 -0
- package/dist/pc/spell-source.js +13 -0
- package/dist/race/race.codec.js +9 -7
- package/dist/race/race.parser.js +8 -6
- package/dist/race/race.schema.d.ts +51 -1
- package/dist/race/race.schema.js +8 -5
- package/dist/race/race.structural.d.ts +7 -0
- package/dist/race/race.structural.js +6 -0
- package/dist/race/race.types.d.ts +20 -0
- package/dist/schemas/attack-schema.d.ts +5 -0
- package/dist/schemas/caster-type-schema.d.ts +14 -0
- package/dist/schemas/caster-type-schema.js +6 -0
- package/dist/schemas/choice-schema.js +2 -2
- package/dist/schemas/entity-extras-schema.d.ts +53 -0
- package/dist/schemas/entity-extras-schema.js +10 -0
- package/dist/schemas/equipment-grant-schema.d.ts +2 -0
- package/dist/schemas/equipment-grant-schema.js +1 -1
- package/dist/schemas/feature-alias.d.ts +34 -0
- package/dist/schemas/feature-effect-schema.d.ts +124 -0
- package/dist/schemas/feature-effect-schema.js +1 -1
- package/dist/schemas/feature-schema.d.ts +8 -0
- package/dist/schemas/feature-schema.js +6 -4
- package/dist/schemas/resource-schema.d.ts +43 -0
- package/dist/schemas/resource-schema.js +1 -1
- package/dist/schemas/selection-pool-schema.d.ts +2 -0
- package/dist/schemas/selection-pool-schema.js +1 -1
- package/dist/spell/spell.access.js +23 -3
- package/dist/spell/spell.codec.js +4 -3
- package/dist/spell/spell.enrichment.js +4 -4
- package/dist/spell/spell.parser.d.ts +30 -0
- package/dist/spell/spell.parser.js +9 -2
- package/dist/spell/spell.scaling.d.ts +27 -6
- package/dist/spell/spell.scaling.js +25 -6
- package/dist/spell/spell.schema.d.ts +44 -2
- package/dist/spell/spell.schema.js +2 -1
- package/dist/spell/spell.types.d.ts +14 -0
- package/dist/subclass/subclass.codec.d.ts +1 -1
- package/dist/subclass/subclass.codec.js +11 -8
- package/dist/subclass/subclass.parser.js +10 -7
- package/dist/subclass/subclass.schema.d.ts +54 -7
- package/dist/subclass/subclass.schema.js +8 -6
- package/dist/subclass/subclass.types.d.ts +20 -2
- package/dist/types/choice.d.ts +56 -0
- package/dist/types/choice.js +21 -3
- package/dist/types/equipment-grant.d.ts +8 -1
- package/dist/types/feature-effect.d.ts +78 -23
- package/dist/types/feature.d.ts +70 -1
- package/dist/types/optional-feature.types.d.ts +28 -0
- package/dist/types/resource.d.ts +21 -1
- package/dist/types/selection-pool.d.ts +17 -2
- package/dist/weapon/weapon.classify.js +2 -2
- package/dist/weapon/weapon.codec.js +4 -3
- package/dist/weapon/weapon.parser.js +3 -2
- package/dist/weapon/weapon.schema.d.ts +4 -0
- package/dist/weapon/weapon.schema.js +2 -1
- package/dist/weapon/weapon.types.d.ts +8 -0
- package/package.json +2 -2
- package/dist/chunk-5MZSB6OM.js +0 -1089
- package/dist/chunk-5XUXXAQJ.js +0 -30
- package/dist/chunk-7P65Q426.js +0 -158
- package/dist/chunk-AIRFC5NQ.js +0 -143
- package/dist/chunk-BH6AMZVY.js +0 -25
- package/dist/chunk-CZPMTQOY.js +0 -68
- package/dist/chunk-M2EMFD6S.js +0 -269
- package/dist/chunk-N2JE7BWL.js +0 -81
- package/dist/chunk-NXR3BD2V.js +0 -90
- package/dist/chunk-Q5K6LWBZ.js +0 -45
- package/dist/chunk-TZK36BU7.js +0 -38
- package/dist/chunk-W7HWMMBF.js +0 -46
- package/dist/chunk-Y4I74YEG.js +0 -33
|
@@ -20,6 +20,20 @@ export interface Spell {
|
|
|
20
20
|
ability: string;
|
|
21
21
|
};
|
|
22
22
|
casting_options?: CastingOption[];
|
|
23
|
+
rendering_hint?: string;
|
|
24
|
+
misc_tags?: string[];
|
|
25
|
+
area_tags?: string[];
|
|
26
|
+
condition_inflict?: string[];
|
|
27
|
+
affects_creature_type?: string[];
|
|
28
|
+
spell_attack?: "melee" | "ranged";
|
|
29
|
+
ability_check?: string[];
|
|
30
|
+
damage_resist?: string[];
|
|
31
|
+
damage_immune?: string[];
|
|
32
|
+
condition_immune?: string[];
|
|
33
|
+
damage_vulnerable?: string[];
|
|
34
|
+
has_fluff?: boolean;
|
|
35
|
+
image?: string | string[];
|
|
36
|
+
has_fluff_images?: boolean;
|
|
23
37
|
source?: string;
|
|
24
38
|
edition?: "2014" | "2024" | string;
|
|
25
39
|
}
|
|
@@ -3,7 +3,7 @@ import type { SubclassEntity } from "./subclass.types.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Normalizing codec (0c.1a). `parse` delegates to `parseSubclass`, which validates
|
|
5
5
|
* against `subclassEntitySchema`. `subclass.types` is this entity's dnd5e home for
|
|
6
|
-
* `SubclassEntity` (consumed by the PC resolver/types); its `Edition`/`
|
|
6
|
+
* `SubclassEntity` (consumed by the PC resolver/types); its `Edition`/`SubclassSpellcastingConfig`
|
|
7
7
|
* imports resolve dnd5e-internally from `class.types`. `serialize` stays `yaml.dump`
|
|
8
8
|
* (the edit-save path uses obsidian's separate serializer; gate (d) verifies `yaml.dump`
|
|
9
9
|
* round-trips through `parseSubclass`).
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
subclassCodec
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-R3VAKWKW.js";
|
|
4
|
+
import "../chunk-HB7XZXDK.js";
|
|
5
|
+
import "../chunk-H7KBLR4X.js";
|
|
6
|
+
import "../chunk-4U55VNC7.js";
|
|
7
|
+
import "../chunk-23LZLBJK.js";
|
|
8
|
+
import "../chunk-CJYCVNW2.js";
|
|
9
|
+
import "../chunk-4FWNK4FD.js";
|
|
8
10
|
import "../chunk-WYGD2UGN.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-YLL2QXY2.js";
|
|
12
|
+
import "../chunk-T26ZVCL5.js";
|
|
13
|
+
import "../chunk-WPWOHGPI.js";
|
|
14
|
+
import "../chunk-UA5KS2PL.js";
|
|
12
15
|
export {
|
|
13
16
|
subclassCodec
|
|
14
17
|
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSubclass
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-HB7XZXDK.js";
|
|
4
|
+
import "../chunk-H7KBLR4X.js";
|
|
5
|
+
import "../chunk-4U55VNC7.js";
|
|
6
|
+
import "../chunk-23LZLBJK.js";
|
|
7
|
+
import "../chunk-CJYCVNW2.js";
|
|
8
|
+
import "../chunk-4FWNK4FD.js";
|
|
7
9
|
import "../chunk-WYGD2UGN.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-YLL2QXY2.js";
|
|
11
|
+
import "../chunk-T26ZVCL5.js";
|
|
12
|
+
import "../chunk-WPWOHGPI.js";
|
|
13
|
+
import "../chunk-UA5KS2PL.js";
|
|
11
14
|
export {
|
|
12
15
|
parseSubclass
|
|
13
16
|
};
|
|
@@ -10,12 +10,13 @@ export declare const subclassEntitySchema: z.ZodObject<{
|
|
|
10
10
|
source: z.ZodString;
|
|
11
11
|
description: z.ZodString;
|
|
12
12
|
spellcasting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
13
|
-
caster_type: z.ZodEnum<{
|
|
14
|
-
pact: "pact";
|
|
15
|
-
full: "full";
|
|
13
|
+
caster_type: z.ZodOptional<z.ZodEnum<{
|
|
16
14
|
half: "half";
|
|
15
|
+
full: "full";
|
|
16
|
+
pact: "pact";
|
|
17
17
|
third: "third";
|
|
18
|
-
|
|
18
|
+
artificer: "artificer";
|
|
19
|
+
}>>;
|
|
19
20
|
ability: z.ZodEnum<{
|
|
20
21
|
str: "str";
|
|
21
22
|
dex: "dex";
|
|
@@ -24,11 +25,11 @@ export declare const subclassEntitySchema: z.ZodObject<{
|
|
|
24
25
|
wis: "wis";
|
|
25
26
|
cha: "cha";
|
|
26
27
|
}>;
|
|
27
|
-
preparation: z.ZodEnum<{
|
|
28
|
+
preparation: z.ZodOptional<z.ZodEnum<{
|
|
28
29
|
known: "known";
|
|
29
30
|
prepared: "prepared";
|
|
30
|
-
}
|
|
31
|
-
spell_list: z.ZodString
|
|
31
|
+
}>>;
|
|
32
|
+
spell_list: z.ZodOptional<z.ZodString>;
|
|
32
33
|
}, z.core.$strip>>>;
|
|
33
34
|
table: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
34
35
|
columns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
@@ -49,6 +50,7 @@ export declare const subclassEntitySchema: z.ZodObject<{
|
|
|
49
50
|
reset: z.ZodEnum<{
|
|
50
51
|
"short-rest": "short-rest";
|
|
51
52
|
"long-rest": "long-rest";
|
|
53
|
+
either: "either";
|
|
52
54
|
dawn: "dawn";
|
|
53
55
|
dusk: "dusk";
|
|
54
56
|
turn: "turn";
|
|
@@ -74,12 +76,17 @@ export declare const subclassEntitySchema: z.ZodObject<{
|
|
|
74
76
|
reset: z.ZodEnum<{
|
|
75
77
|
"short-rest": "short-rest";
|
|
76
78
|
"long-rest": "long-rest";
|
|
79
|
+
either: "either";
|
|
77
80
|
dawn: "dawn";
|
|
78
81
|
dusk: "dusk";
|
|
79
82
|
turn: "turn";
|
|
80
83
|
round: "round";
|
|
81
84
|
custom: "custom";
|
|
82
85
|
}>;
|
|
86
|
+
restores: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
uses: "uses";
|
|
88
|
+
"spell-slots": "spell-slots";
|
|
89
|
+
}>>;
|
|
83
90
|
}, z.core.$strip>>>;
|
|
84
91
|
}, z.core.$strip>>;
|
|
85
92
|
selection_pools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -112,7 +119,47 @@ export declare const subclassEntitySchema: z.ZodObject<{
|
|
|
112
119
|
layout: z.ZodOptional<z.ZodEnum<{
|
|
113
120
|
"spell-like": "spell-like";
|
|
114
121
|
blocks: "blocks";
|
|
122
|
+
"dice-pool": "dice-pool";
|
|
123
|
+
"point-pool": "point-pool";
|
|
115
124
|
}>>;
|
|
116
125
|
}, z.core.$strip>;
|
|
117
126
|
}, z.core.$strip>>>;
|
|
127
|
+
rendering_hint: z.ZodOptional<z.ZodString>;
|
|
128
|
+
short_name: z.ZodOptional<z.ZodString>;
|
|
129
|
+
has_fluff: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
has_fluff_images: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
fluff: z.ZodOptional<z.ZodUnknown>;
|
|
132
|
+
table_col_labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
133
|
+
cantrip_progression: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
134
|
+
prepared_spells_change: z.ZodOptional<z.ZodString>;
|
|
135
|
+
prepared_spells_progression: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
136
|
+
spells_known_progression: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
137
|
+
feat_progression: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
138
|
+
name: z.ZodString;
|
|
139
|
+
progression: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodNumber>, z.ZodArray<z.ZodNumber>]>;
|
|
140
|
+
feature_type: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
141
|
+
featureType: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
142
|
+
category: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
143
|
+
required: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
144
|
+
}, z.core.$strip>>>;
|
|
145
|
+
optionalfeature_progression: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
progression: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodNumber>, z.ZodArray<z.ZodNumber>]>;
|
|
148
|
+
feature_type: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
149
|
+
featureType: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
150
|
+
category: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
151
|
+
required: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
152
|
+
}, z.core.$strip>>>;
|
|
153
|
+
additional_spells: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
154
|
+
name: z.ZodOptional<z.ZodString>;
|
|
155
|
+
ability: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
156
|
+
choose: z.ZodArray<z.ZodString>;
|
|
157
|
+
}, z.core.$strip>]>>;
|
|
158
|
+
known: z.ZodOptional<z.ZodUnknown>;
|
|
159
|
+
innate: z.ZodOptional<z.ZodUnknown>;
|
|
160
|
+
prepared: z.ZodOptional<z.ZodUnknown>;
|
|
161
|
+
expanded: z.ZodOptional<z.ZodUnknown>;
|
|
162
|
+
resourceName: z.ZodOptional<z.ZodString>;
|
|
163
|
+
}, z.core.$strip>>>;
|
|
164
|
+
image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
118
165
|
}, z.core.$strip>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
subclassEntitySchema
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-H7KBLR4X.js";
|
|
4
|
+
import "../chunk-23LZLBJK.js";
|
|
5
|
+
import "../chunk-CJYCVNW2.js";
|
|
6
|
+
import "../chunk-4FWNK4FD.js";
|
|
6
7
|
import "../chunk-WYGD2UGN.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-YLL2QXY2.js";
|
|
9
|
+
import "../chunk-T26ZVCL5.js";
|
|
10
|
+
import "../chunk-WPWOHGPI.js";
|
|
11
|
+
import "../chunk-UA5KS2PL.js";
|
|
10
12
|
export {
|
|
11
13
|
subclassEntitySchema
|
|
12
14
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Feature, Resource } from "@archivist-gg/dnd5e";
|
|
2
|
-
import type { Edition,
|
|
2
|
+
import type { Edition, SubclassSpellcastingConfig } from "@archivist-gg/dnd5e/class/class.types";
|
|
3
3
|
import type { SelectionPool, PoolGrant, TabDecl } from "@archivist-gg/dnd5e/types/selection-pool";
|
|
4
|
+
import type { AdditionalSpellsEntry, ProgressionEntry } from "@archivist-gg/dnd5e/schemas/entity-extras-schema";
|
|
4
5
|
export interface SubclassEntity {
|
|
5
6
|
slug: string;
|
|
6
7
|
name: string;
|
|
@@ -8,7 +9,7 @@ export interface SubclassEntity {
|
|
|
8
9
|
edition: Edition;
|
|
9
10
|
source: string;
|
|
10
11
|
description: string;
|
|
11
|
-
spellcasting?:
|
|
12
|
+
spellcasting?: SubclassSpellcastingConfig | null;
|
|
12
13
|
table?: Record<number, {
|
|
13
14
|
columns?: Record<string, string | number>;
|
|
14
15
|
}>;
|
|
@@ -17,4 +18,21 @@ export interface SubclassEntity {
|
|
|
17
18
|
selection_pools?: SelectionPool[];
|
|
18
19
|
pool_grants?: PoolGrant[];
|
|
19
20
|
tabs?: TabDecl[];
|
|
21
|
+
/** Converter/bundle extras declared by subclass.schema.ts §2.7; all optional, none read today. */
|
|
22
|
+
rendering_hint?: string;
|
|
23
|
+
short_name?: string;
|
|
24
|
+
has_fluff?: boolean;
|
|
25
|
+
has_fluff_images?: boolean;
|
|
26
|
+
/** RAW 5etools passthrough (single measured key-set `{_subclassFluff:{…}}`): mirrors `z.unknown()`. */
|
|
27
|
+
fluff?: unknown;
|
|
28
|
+
table_col_labels?: string[];
|
|
29
|
+
cantrip_progression?: number[];
|
|
30
|
+
prepared_spells_change?: string;
|
|
31
|
+
prepared_spells_progression?: number[];
|
|
32
|
+
spells_known_progression?: number[];
|
|
33
|
+
feat_progression?: ProgressionEntry[];
|
|
34
|
+
optionalfeature_progression?: ProgressionEntry[];
|
|
35
|
+
additional_spells?: AdditionalSpellsEntry[];
|
|
36
|
+
/** One wikilink, or an array of them for the multi-fluff-image emit. */
|
|
37
|
+
image?: string | string[];
|
|
20
38
|
}
|
package/dist/types/choice.d.ts
CHANGED
|
@@ -3,6 +3,62 @@ import type { FeatureEffect } from "./feature-effect.js";
|
|
|
3
3
|
export type Ability = keyof Abilities;
|
|
4
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
5
|
export declare const ALL_SKILL_SLUGS: SkillSlug[];
|
|
6
|
+
/** The language vocabulary the engine matches every language grant and pick
|
|
7
|
+
* against: 8 standard + 8 exotic + 2 SECRET. It is NOT "the SRD language set" —
|
|
8
|
+
* the two secret languages are class-taught and appear on no SRD language list.
|
|
9
|
+
* Slugs are edition-agnostic, apostrophe-retaining and canonical under
|
|
10
|
+
* `toProfSlug`, exactly as ALL_TOOLS is.
|
|
11
|
+
*
|
|
12
|
+
* A cross-repo CONTRACT with three kinds of consumer, so widening this list is a
|
|
13
|
+
* data change at all three · named by symbol, because line cites rot:
|
|
14
|
+
* · the SRD GENERATOR: `race-merge.ts` builds `KNOWN_LANGUAGES = new Set(ALL_LANGUAGES)`
|
|
15
|
+
* and `extractLanguagesFromTraits` gates species prose tokens through it, so
|
|
16
|
+
* this constant is INPUT DATA to canonical species output. That name belongs
|
|
17
|
+
* to the generator and to nothing else. Guarded by
|
|
18
|
+
* `tests/srd-canonical/merger-rules/srd-race-languages.test.ts`.
|
|
19
|
+
* · the ENGINE: `enumerateOptions` uses it as the from-less `domain:"language"`
|
|
20
|
+
* picker pool, and `computeEffectiveProficiencies` canonicalizes grants, picks
|
|
21
|
+
* and manual adds against it through `pc.decision-engine.ts`'s one canonical
|
|
22
|
+
* comparison, `matchPool` — a module-level helper it shares with its other call
|
|
23
|
+
* sites, not one of its own. `computeEffectiveProficiencies` reads ALL_LANGUAGES
|
|
24
|
+
* from HERE, directly — it does not go through the generator's KNOWN_LANGUAGES.
|
|
25
|
+
* · the PLUGIN: `proficiency-edit-modal.ts` renders its LANGUAGE section from
|
|
26
|
+
* `[...ALL_LANGUAGES, ...suppressed]`.
|
|
27
|
+
* Membership is also what makes two spellings of one language FOLD onto a single
|
|
28
|
+
* row: a vocabulary MISS keys on the raw string and splits the row in two. */
|
|
29
|
+
export declare const STANDARD_LANGUAGES: string[];
|
|
30
|
+
export declare const EXOTIC_LANGUAGES: string[];
|
|
31
|
+
/** Secret languages: granted by a class feature (Druid, Rogue), never carried by a
|
|
32
|
+
* race or background language list. `thieves'-cant` RETAINS the ASCII apostrophe —
|
|
33
|
+
* the file's stated convention, and the slug `toProfSlug` already produces from
|
|
34
|
+
* both live spellings (the converter's `Thieves' Cant` and the 2014 SRD prose's
|
|
35
|
+
* U+2019 form). */
|
|
36
|
+
export declare const SECRET_LANGUAGES: string[];
|
|
37
|
+
export declare const ALL_LANGUAGES: string[];
|
|
38
|
+
/** The SRD tool set: 17 artisan's tools + 10 musical instruments + 2 gaming sets
|
|
39
|
+
* + 6 other tools = 35. Like ALL_LANGUAGES this is a SINGLE edition-agnostic
|
|
40
|
+
* list covering 2014 and 2024, and where the two editions name the same tool
|
|
41
|
+
* differently the 2024 name wins. Across all 35 entries there is exactly one
|
|
42
|
+
* such delta: `Playing Card Set` (2014) vs `Playing Cards` (2024), resolved
|
|
43
|
+
* here to "playing-cards".
|
|
44
|
+
*
|
|
45
|
+
* Apostrophes are RETAINED ("thieves'-tools", "calligrapher's-supplies").
|
|
46
|
+
* These are the slugs the product already emits · see
|
|
47
|
+
* `tools/srd-canonical/merger-rules/background-merge.ts`, whose output is live
|
|
48
|
+
* in `background.2024.json` · and humanizeProficiency is apostrophe-safe.
|
|
49
|
+
* Stripping the apostrophes would diverge from that live data and CREATE the
|
|
50
|
+
* collision it would claim to avoid.
|
|
51
|
+
*
|
|
52
|
+
* Every entry is already canonical under toProfSlug (identity) and the set is
|
|
53
|
+
* collision-free under it. Ordering is alphabetical within each subset, and
|
|
54
|
+
* ALL_TOOLS composes the four subsets in that order, mirroring
|
|
55
|
+
* ALL_LANGUAGES = STANDARD + EXOTIC + SECRET. The list is a cross-repo contract: a
|
|
56
|
+
* one-entry divergence is silent and permanent, so it is pinned verbatim. */
|
|
57
|
+
export declare const ARTISANS_TOOLS: string[];
|
|
58
|
+
export declare const MUSICAL_INSTRUMENTS: string[];
|
|
59
|
+
export declare const GAMING_SETS: string[];
|
|
60
|
+
export declare const OTHER_TOOLS: string[];
|
|
61
|
+
export declare const ALL_TOOLS: string[];
|
|
6
62
|
export type FeatCategory = "origin" | "general" | "fighting-style" | "epic-boon";
|
|
7
63
|
/** Closed, enumerated registry filter — YAML can never express a query the
|
|
8
64
|
* engine would apply unsafely. `"self"` resolves against the owning
|
package/dist/types/choice.js
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
ALL_LANGUAGES,
|
|
3
|
+
ALL_SKILL_SLUGS,
|
|
4
|
+
ALL_TOOLS,
|
|
5
|
+
ARTISANS_TOOLS,
|
|
6
|
+
EXOTIC_LANGUAGES,
|
|
7
|
+
GAMING_SETS,
|
|
8
|
+
MUSICAL_INSTRUMENTS,
|
|
9
|
+
OTHER_TOOLS,
|
|
10
|
+
SECRET_LANGUAGES,
|
|
11
|
+
STANDARD_LANGUAGES
|
|
12
|
+
} from "../chunk-KU3YLF6D.js";
|
|
4
13
|
export {
|
|
5
|
-
|
|
14
|
+
ALL_LANGUAGES,
|
|
15
|
+
ALL_SKILL_SLUGS,
|
|
16
|
+
ALL_TOOLS,
|
|
17
|
+
ARTISANS_TOOLS,
|
|
18
|
+
EXOTIC_LANGUAGES,
|
|
19
|
+
GAMING_SETS,
|
|
20
|
+
MUSICAL_INSTRUMENTS,
|
|
21
|
+
OTHER_TOOLS,
|
|
22
|
+
SECRET_LANGUAGES,
|
|
23
|
+
STANDARD_LANGUAGES
|
|
6
24
|
};
|
|
@@ -3,12 +3,19 @@
|
|
|
3
3
|
* `category` is a player-picked class of item ("martial-weapon",
|
|
4
4
|
* "simple-weapon", "martial-melee-weapon", "any-armor", "shield", …) resolved
|
|
5
5
|
* by a nested select-entity. `gold` is gp folded into the bundle. */
|
|
6
|
-
export type EquipmentGrant =
|
|
6
|
+
export type EquipmentGrant =
|
|
7
|
+
/** `contains_value` (COPPER; `1500` = 15 gp) is seeded as gold by the plugin's starting-equipment seeder
|
|
8
|
+
* (R4-G3b §9); `worth_value` is never seeded; `display_name` is read by grantLabel. */
|
|
9
|
+
{
|
|
7
10
|
item: string;
|
|
8
11
|
qty?: number;
|
|
12
|
+
contains_value?: number;
|
|
13
|
+
display_name?: string;
|
|
14
|
+
worth_value?: number;
|
|
9
15
|
} | {
|
|
10
16
|
category: string;
|
|
11
17
|
qty?: number;
|
|
18
|
+
display_name?: string;
|
|
12
19
|
} | {
|
|
13
20
|
gold: number;
|
|
14
21
|
};
|
|
@@ -1,28 +1,46 @@
|
|
|
1
1
|
import type { Ability } from "./choice.js";
|
|
2
2
|
export type SenseType = "darkvision" | "blindsight" | "tremorsense" | "truesight";
|
|
3
|
-
|
|
3
|
+
/** Present on every arm: whose numbers the effect changes. Absent === "self". The engine's fold readers skip
|
|
4
|
+
* every effect whose subject is present and not "self" (`foldsOnSelf` in pc.feature-effects.ts). */
|
|
5
|
+
type Subject = {
|
|
6
|
+
subject?: string;
|
|
7
|
+
};
|
|
8
|
+
/** A prose qualifier, carried for display; on `apply-condition` and `immune-condition` the `condition` key is the
|
|
9
|
+
* condition NAME instead, so those two arms do not carry this qualifier. */
|
|
10
|
+
type Qualified = {
|
|
11
|
+
condition?: string;
|
|
12
|
+
} & Subject;
|
|
13
|
+
/**
|
|
14
|
+
* Hand-written MIRROR of `featureEffectSchema` (schemas/feature-effect-schema.ts). The two are cross-checked at the
|
|
15
|
+
* four parser returns and by `_kindPin` in the schema file; edit both in the same commit.
|
|
16
|
+
*/
|
|
17
|
+
export type FeatureEffect = ({
|
|
4
18
|
kind: "initiative-bonus";
|
|
5
19
|
value: number;
|
|
6
|
-
} | {
|
|
20
|
+
} & Qualified) | ({
|
|
7
21
|
kind: "immune-condition";
|
|
8
22
|
condition: string;
|
|
9
23
|
while?: string;
|
|
10
|
-
} | {
|
|
24
|
+
} & Subject) | ({
|
|
11
25
|
kind: "resistance";
|
|
12
26
|
damage_type: string;
|
|
13
|
-
} | {
|
|
27
|
+
} & Qualified) | ({
|
|
14
28
|
kind: "hp-per-level-bonus";
|
|
15
29
|
value: number;
|
|
16
|
-
} | {
|
|
30
|
+
} & Qualified) | ({
|
|
17
31
|
kind: "speed-bonus";
|
|
18
32
|
mode: "walk" | "fly" | "swim" | "climb" | "burrow";
|
|
19
33
|
value: number;
|
|
20
34
|
set?: boolean;
|
|
21
|
-
|
|
35
|
+
scales_at?: {
|
|
36
|
+
level: number;
|
|
37
|
+
value: number;
|
|
38
|
+
}[];
|
|
39
|
+
} & Qualified) | ({
|
|
22
40
|
kind: "sense";
|
|
23
41
|
type: SenseType;
|
|
24
42
|
range: number;
|
|
25
|
-
} | {
|
|
43
|
+
} & Qualified) | ({
|
|
26
44
|
kind: "apply-condition";
|
|
27
45
|
condition: string;
|
|
28
46
|
duration?: string;
|
|
@@ -31,49 +49,86 @@ export type FeatureEffect = {
|
|
|
31
49
|
ability: string;
|
|
32
50
|
timing: string;
|
|
33
51
|
};
|
|
34
|
-
} | {
|
|
52
|
+
} & Subject) | ({
|
|
35
53
|
kind: "damage-bonus";
|
|
36
54
|
damage_type: string;
|
|
37
55
|
amount: string;
|
|
38
56
|
applies_to?: "weapon" | "spell" | "all";
|
|
39
|
-
|
|
40
|
-
} | {
|
|
57
|
+
} & Qualified) | ({
|
|
41
58
|
kind: "proficiency";
|
|
42
59
|
proficiency_type: "skill" | "tool" | "language" | "saving-throw" | "armor" | "weapon";
|
|
43
60
|
value: string;
|
|
44
|
-
|
|
61
|
+
expertise?: boolean;
|
|
62
|
+
} & Qualified) | ({
|
|
45
63
|
kind: "ac-bonus";
|
|
46
64
|
value: number;
|
|
47
65
|
requires_armor?: boolean;
|
|
48
|
-
} | {
|
|
66
|
+
} & Qualified) | ({
|
|
49
67
|
kind: "unarmored-ac";
|
|
50
68
|
abilities: Ability[];
|
|
51
69
|
base?: number;
|
|
52
70
|
allow_shield?: boolean;
|
|
53
|
-
} | {
|
|
71
|
+
} & Qualified) | ({
|
|
72
|
+
kind: "unarmed-strike";
|
|
73
|
+
dice?: string | {
|
|
74
|
+
column: string;
|
|
75
|
+
};
|
|
76
|
+
abilities?: Ability[];
|
|
77
|
+
} & Qualified) | ({
|
|
54
78
|
kind: "weapon-ability";
|
|
55
79
|
ability: Ability | "spellcasting";
|
|
56
80
|
weapons?: string | string[];
|
|
57
|
-
} | {
|
|
81
|
+
} & Qualified) | ({
|
|
58
82
|
kind: "roll-modifier";
|
|
59
|
-
mode: "advantage" | "disadvantage";
|
|
60
|
-
roll: "ability-check" | "saving-throw" | "attack";
|
|
83
|
+
mode: "advantage" | "disadvantage" | "reroll" | "add-d4";
|
|
84
|
+
roll: "ability-check" | "saving-throw" | "attack" | "any";
|
|
61
85
|
scope?: string;
|
|
62
|
-
|
|
63
|
-
} | {
|
|
86
|
+
} & Qualified) | ({
|
|
64
87
|
kind: "crit-range";
|
|
65
88
|
min_roll: number;
|
|
66
89
|
applies_to?: "weapon" | "spell" | "all";
|
|
67
|
-
|
|
68
|
-
} | {
|
|
90
|
+
} & Qualified) | ({
|
|
69
91
|
kind: "extra-attack";
|
|
70
92
|
count: number;
|
|
71
|
-
|
|
93
|
+
scales_at?: {
|
|
94
|
+
level: number;
|
|
95
|
+
count: number;
|
|
96
|
+
}[];
|
|
97
|
+
} & Qualified) | ({
|
|
72
98
|
kind: "reroll-damage";
|
|
73
99
|
max_reroll: number;
|
|
74
100
|
applies_to?: "weapon" | "spell" | "all";
|
|
75
101
|
once_per_die?: boolean;
|
|
76
|
-
} | {
|
|
102
|
+
} & Qualified) | ({
|
|
77
103
|
kind: "attack-rule";
|
|
78
104
|
flag: "no-ranged-in-melee-disadvantage";
|
|
79
|
-
}
|
|
105
|
+
} & Qualified) | ({
|
|
106
|
+
kind: "immunity";
|
|
107
|
+
damage_type: string;
|
|
108
|
+
} & Qualified) | ({
|
|
109
|
+
kind: "vulnerability";
|
|
110
|
+
damage_type: string;
|
|
111
|
+
} & Qualified) | ({
|
|
112
|
+
kind: "temp-hp";
|
|
113
|
+
amount: string;
|
|
114
|
+
} & Qualified) | ({
|
|
115
|
+
kind: "heal";
|
|
116
|
+
amount: string;
|
|
117
|
+
} & Qualified) | ({
|
|
118
|
+
kind: "ability-score-increase";
|
|
119
|
+
abilities: "chosen" | Ability[];
|
|
120
|
+
amount: number;
|
|
121
|
+
choose: number | null;
|
|
122
|
+
max: number | null;
|
|
123
|
+
} & Qualified) | ({
|
|
124
|
+
kind: "extra-action";
|
|
125
|
+
count: number;
|
|
126
|
+
action_type: "action" | "bonus-action" | "reaction";
|
|
127
|
+
} & Qualified) | ({
|
|
128
|
+
kind: "save-outcome";
|
|
129
|
+
ability: Ability | "any";
|
|
130
|
+
on_success: "none" | "half" | "full";
|
|
131
|
+
on_failure: "none" | "half" | "full";
|
|
132
|
+
applies_to: string | null;
|
|
133
|
+
} & Qualified);
|
|
134
|
+
export {};
|
package/dist/types/feature.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Choice } from "./choice.js";
|
|
2
|
-
import type { Resource, ResourceConsumption } from "./resource.js";
|
|
2
|
+
import type { Resource, ResourceConsumption, ActionCost } from "./resource.js";
|
|
3
3
|
import type { Attack } from "./attack.js";
|
|
4
4
|
import type { FeatureEffect } from "./feature-effect.js";
|
|
5
5
|
import type { Duration } from "../schemas/duration-schema.js";
|
|
@@ -15,6 +15,56 @@ export interface FeatureRecharge {
|
|
|
15
15
|
type: "recharge_on_roll" | "per_day" | "per_short_rest" | "per_long_rest";
|
|
16
16
|
param: number;
|
|
17
17
|
}
|
|
18
|
+
/** The converter's 14-key companion binding (R4-G5 §7, ruling G5-UR2 "declare now, card after the G7 re-emit").
|
|
19
|
+
* DECLARED, not read: the converter withholds the key today (`P9_NOT_EMITTED_FIELDS`), 0 converted and 0 bundle
|
|
20
|
+
* notes carry it, and the Passive-tab card is a G8 booking. Every closed-vocabulary leaf is a plain `string` and
|
|
21
|
+
* every position the converter can emit as null is `| null`, for the reason the schema mirror states: a class,
|
|
22
|
+
* subclass or race parser refuses a WHOLE document on one nested leaf failure, so a mirror stricter than the
|
|
23
|
+
* emitter is a total-loss risk on the day the re-emit lands. */
|
|
24
|
+
export interface FeatureCompanion {
|
|
25
|
+
statblock?: string;
|
|
26
|
+
statblock_wikilink?: string | null;
|
|
27
|
+
count?: string;
|
|
28
|
+
count_scaling?: Array<{
|
|
29
|
+
level?: number;
|
|
30
|
+
count?: string;
|
|
31
|
+
source_quote?: string;
|
|
32
|
+
}>;
|
|
33
|
+
shares_action_economy?: boolean;
|
|
34
|
+
turn_order?: string;
|
|
35
|
+
turn_order_source_quote?: string | null;
|
|
36
|
+
proficiency_bonus_scaled?: Array<{
|
|
37
|
+
stat?: string;
|
|
38
|
+
formula?: string;
|
|
39
|
+
source_quote?: string;
|
|
40
|
+
}>;
|
|
41
|
+
lifecycle?: {
|
|
42
|
+
created_by?: string;
|
|
43
|
+
recreate_on?: string | null;
|
|
44
|
+
previous_instance_perishes?: boolean | null;
|
|
45
|
+
vanishes_if_owner_dies?: boolean | null;
|
|
46
|
+
vanishes_after?: string | null;
|
|
47
|
+
source_quote?: string;
|
|
48
|
+
} | null;
|
|
49
|
+
autonomy?: {
|
|
50
|
+
when?: string;
|
|
51
|
+
behaviour?: string;
|
|
52
|
+
source_quote?: string;
|
|
53
|
+
} | null;
|
|
54
|
+
variants?: Array<{
|
|
55
|
+
axis?: string;
|
|
56
|
+
choices?: string[];
|
|
57
|
+
chosen_at?: string;
|
|
58
|
+
source_quote?: string;
|
|
59
|
+
}>;
|
|
60
|
+
base_statblock?: string | null;
|
|
61
|
+
overrides?: Array<{
|
|
62
|
+
field?: string;
|
|
63
|
+
value?: string;
|
|
64
|
+
source_quote?: string;
|
|
65
|
+
}>;
|
|
66
|
+
source_quote?: string;
|
|
67
|
+
}
|
|
18
68
|
export interface Feature {
|
|
19
69
|
id?: string;
|
|
20
70
|
name: string;
|
|
@@ -38,4 +88,23 @@ export interface Feature {
|
|
|
38
88
|
passive?: boolean;
|
|
39
89
|
/** How long the buff lasts; rendered as a static label (no live countdown). */
|
|
40
90
|
duration?: Duration;
|
|
91
|
+
class_source?: string;
|
|
92
|
+
/** Always "" on every measured carrier — never constrain it non-empty. */
|
|
93
|
+
rendering_hint?: string;
|
|
94
|
+
subclass_short_name?: string;
|
|
95
|
+
subclass_source?: string;
|
|
96
|
+
header?: number;
|
|
97
|
+
is_class_feature_variant?: boolean;
|
|
98
|
+
gain_subclass_feature?: boolean;
|
|
99
|
+
gain_subclass_feature_has_content?: boolean;
|
|
100
|
+
/** 5etools entry type; values {"inset","item"}. */
|
|
101
|
+
type?: string;
|
|
102
|
+
action_cost?: ActionCost;
|
|
103
|
+
save?: {
|
|
104
|
+
ability: string;
|
|
105
|
+
dc_formula: string;
|
|
106
|
+
};
|
|
107
|
+
/** The companion this feature binds (R4-G5 §7). Declared so the class / subclass / race parsers stop stripping
|
|
108
|
+
* it on the day the G7 re-emit lands; nothing reads it in G5. */
|
|
109
|
+
companion?: FeatureCompanion;
|
|
41
110
|
}
|