@archivist-gg/dnd5e 0.3.13 → 0.3.17

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.
Files changed (111) hide show
  1. package/dist/background/background.codec.js +5 -5
  2. package/dist/background/background.parser.js +4 -4
  3. package/dist/background/background.schema.js +3 -3
  4. package/dist/{chunk-ZMJQUZQH.js → chunk-2JSQE3DD.js} +11 -0
  5. package/dist/{chunk-Q6UOHCCT.js → chunk-2UDSN6VW.js} +1 -1
  6. package/dist/chunk-3LWMFYKS.js +57 -0
  7. package/dist/{chunk-MUIU7RZ3.js → chunk-3MGQFFNE.js} +1 -1
  8. package/dist/{chunk-T5GZBKIQ.js → chunk-3VZZDKRA.js} +114 -27
  9. package/dist/{chunk-BRGLDWUP.js → chunk-5MXFW4O3.js} +7 -3
  10. package/dist/{chunk-RQNJXADQ.js → chunk-6EI737IO.js} +1 -1
  11. package/dist/{chunk-EL6QPF6I.js → chunk-7ATNGKBS.js} +1 -1
  12. package/dist/{chunk-XY6X2APM.js → chunk-7Q2VPKCD.js} +17 -0
  13. package/dist/{chunk-4SLOJXJ4.js → chunk-7QN7XSAK.js} +1 -1
  14. package/dist/{chunk-MC5YJ4PB.js → chunk-AZRGFUSR.js} +1 -1
  15. package/dist/{chunk-HJQNK3J5.js → chunk-B3DP42OM.js} +1 -4
  16. package/dist/{chunk-JNNNBEUH.js → chunk-DOXSFYLH.js} +7 -2
  17. package/dist/{chunk-X7VZY4ON.js → chunk-FANQVQ3D.js} +2 -2
  18. package/dist/{chunk-PX25R3DK.js → chunk-G6PBI2BU.js} +1 -1
  19. package/dist/chunk-HTYMW5CH.js +228 -0
  20. package/dist/{chunk-VDPRBUU5.js → chunk-JCMUVZIK.js} +1 -1
  21. package/dist/{chunk-Q5XTEYHD.js → chunk-JSM6JFZR.js} +15 -8
  22. package/dist/chunk-KR6JF3BF.js +14 -0
  23. package/dist/{chunk-J53ERF6K.js → chunk-LF5AGJA4.js} +1 -1
  24. package/dist/{chunk-XJRNEQPD.js → chunk-MBX25B6D.js} +1 -1
  25. package/dist/{chunk-5KGV6TF7.js → chunk-OFCSP6MT.js} +1 -1
  26. package/dist/{chunk-QEO7LYTG.js → chunk-ONTGZR5T.js} +127 -71
  27. package/dist/{chunk-MWCCGPG3.js → chunk-OOSRUJBI.js} +3 -2
  28. package/dist/{chunk-LVX6TQ3R.js → chunk-PKX6TGRE.js} +2 -2
  29. package/dist/{chunk-QSBJ6NEM.js → chunk-PQZ4LM4Z.js} +1 -1
  30. package/dist/chunk-PXVNAY7T.js +84 -0
  31. package/dist/chunk-QH36K2PU.js +158 -0
  32. package/dist/{chunk-M2OWVAZG.js → chunk-QZSWN2KT.js} +1 -1
  33. package/dist/{chunk-6ZY3U6BQ.js → chunk-RYLXAYIQ.js} +1 -1
  34. package/dist/{chunk-UE6LKRXQ.js → chunk-T6QIF5XR.js} +16 -0
  35. package/dist/{chunk-4BZ47YJ4.js → chunk-TULQ4FFX.js} +32 -11
  36. package/dist/{chunk-PLOSP4XQ.js → chunk-UUBJCNQU.js} +11 -2
  37. package/dist/{chunk-DPM6V7YX.js → chunk-VRV3NNTA.js} +1 -1
  38. package/dist/{chunk-R2V5LN3I.js → chunk-Y5VVP73C.js} +1 -1
  39. package/dist/{chunk-FPGXFD2M.js → chunk-YD2VAHA6.js} +2 -2
  40. package/dist/{chunk-G7ED5H2G.js → chunk-YKL6SHRJ.js} +1 -1
  41. package/dist/class/class.codec.js +6 -6
  42. package/dist/class/class.parser.js +5 -5
  43. package/dist/class/class.schema.d.ts +8 -0
  44. package/dist/class/class.schema.js +4 -4
  45. package/dist/class/class.standard-array.d.ts +16 -0
  46. package/dist/class/class.standard-array.js +20 -0
  47. package/dist/class/class.types.d.ts +3 -0
  48. package/dist/dnd/amount-text.d.ts +38 -0
  49. package/dist/dnd/amount-text.js +13 -0
  50. package/dist/dnd/resource-words.d.ts +4 -0
  51. package/dist/dnd/resource-words.js +30 -0
  52. package/dist/feat/feat.codec.js +5 -5
  53. package/dist/feat/feat.parser.js +4 -4
  54. package/dist/feat/feat.schema.d.ts +25 -0
  55. package/dist/feat/feat.schema.js +3 -3
  56. package/dist/index.js +332 -70
  57. package/dist/monster/monster.parser.js +5 -5
  58. package/dist/monster/monster.schema.js +4 -4
  59. package/dist/optional-feature/optional-feature.codec.js +5 -4
  60. package/dist/optional-feature/optional-feature.parser.js +4 -3
  61. package/dist/optional-feature/optional-feature.schema.d.ts +26 -0
  62. package/dist/optional-feature/optional-feature.schema.js +3 -2
  63. package/dist/pc/pc.additional-spells.js +2 -2
  64. package/dist/pc/pc.amount-bindings.d.ts +32 -0
  65. package/dist/pc/pc.amount-bindings.js +23 -0
  66. package/dist/pc/pc.decision-engine.d.ts +3 -0
  67. package/dist/pc/pc.decision-engine.js +14 -13
  68. package/dist/pc/pc.entry-overrides.js +3 -3
  69. package/dist/pc/pc.equipment.js +6 -5
  70. package/dist/pc/pc.feature-effects.d.ts +12 -0
  71. package/dist/pc/pc.feature-effects.js +1 -1
  72. package/dist/pc/pc.infusions.d.ts +9 -1
  73. package/dist/pc/pc.infusions.js +3 -3
  74. package/dist/pc/pc.member-choices.d.ts +90 -0
  75. package/dist/pc/pc.member-choices.js +32 -0
  76. package/dist/pc/pc.parser.js +1 -1
  77. package/dist/pc/pc.pools.d.ts +7 -0
  78. package/dist/pc/pc.pools.js +5 -3
  79. package/dist/pc/pc.proficiencies.js +13 -12
  80. package/dist/pc/pc.proficiency-query.js +6 -0
  81. package/dist/pc/pc.recalc.js +75 -58
  82. package/dist/pc/pc.resolver.d.ts +2 -1
  83. package/dist/pc/pc.resolver.js +13 -12
  84. package/dist/pc/pc.rest.js +4 -4
  85. package/dist/pc/pc.schema.d.ts +29 -2
  86. package/dist/pc/pc.schema.js +1 -1
  87. package/dist/pc/pc.types.d.ts +45 -2
  88. package/dist/pc/pc.weapon-grant.d.ts +15 -0
  89. package/dist/pc/pool-layout.d.ts +3 -9
  90. package/dist/pc/pool-layout.js +1 -3
  91. package/dist/pc/resource-equivalents.d.ts +44 -0
  92. package/dist/pc/spell-source.js +4 -9
  93. package/dist/race/race.codec.js +6 -6
  94. package/dist/race/race.parser.js +5 -5
  95. package/dist/race/race.schema.js +4 -4
  96. package/dist/schemas/choice-schema.js +2 -2
  97. package/dist/schemas/feature-effect-schema.d.ts +25 -0
  98. package/dist/schemas/feature-effect-schema.js +1 -1
  99. package/dist/schemas/feature-schema.js +3 -3
  100. package/dist/spell/spell.codec.js +2 -2
  101. package/dist/spell/spell.parser.d.ts +6 -1
  102. package/dist/spell/spell.parser.js +5 -3
  103. package/dist/spell/spell.types.d.ts +10 -0
  104. package/dist/subclass/subclass.codec.js +6 -6
  105. package/dist/subclass/subclass.parser.js +5 -5
  106. package/dist/subclass/subclass.schema.js +4 -4
  107. package/dist/types/choice.d.ts +5 -0
  108. package/dist/types/feature-effect.d.ts +6 -0
  109. package/dist/types/optional-feature.types.d.ts +5 -0
  110. package/dist/types/selection-pool.d.ts +2 -2
  111. package/package.json +1 -1
@@ -18,6 +18,31 @@ export declare const featureEffectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
18
  minimum: z.ZodOptional<z.ZodNumber>;
19
19
  condition: z.ZodOptional<z.ZodString>;
20
20
  subject: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ kind: z.ZodLiteral<"save-bonus">;
23
+ ability: z.ZodEnum<{
24
+ str: "str";
25
+ dex: "dex";
26
+ con: "con";
27
+ int: "int";
28
+ wis: "wis";
29
+ cha: "cha";
30
+ }>;
31
+ minimum: z.ZodOptional<z.ZodNumber>;
32
+ saves: z.ZodOptional<z.ZodArray<z.ZodEnum<{
33
+ str: "str";
34
+ dex: "dex";
35
+ con: "con";
36
+ int: "int";
37
+ wis: "wis";
38
+ cha: "cha";
39
+ }>>>;
40
+ inactive_while: z.ZodOptional<z.ZodEnum<{
41
+ incapacitated: "incapacitated";
42
+ unconscious: "unconscious";
43
+ }>>;
44
+ condition: z.ZodOptional<z.ZodString>;
45
+ subject: z.ZodOptional<z.ZodString>;
21
46
  }, z.core.$strip>, z.ZodObject<{
22
47
  kind: z.ZodLiteral<"half-proficiency">;
23
48
  skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  featureEffectSchema
3
- } from "../chunk-ZMJQUZQH.js";
3
+ } from "../chunk-2JSQE3DD.js";
4
4
  export {
5
5
  featureEffectSchema
6
6
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  featureObjectSchema,
3
3
  featureSchema
4
- } from "../chunk-FPGXFD2M.js";
4
+ } from "../chunk-YD2VAHA6.js";
5
5
  import "../chunk-WYGD2UGN.js";
6
6
  import "../chunk-ZJXSXVFP.js";
7
- import "../chunk-BRGLDWUP.js";
8
- import "../chunk-ZMJQUZQH.js";
7
+ import "../chunk-5MXFW4O3.js";
8
+ import "../chunk-2JSQE3DD.js";
9
9
  export {
10
10
  featureObjectSchema,
11
11
  featureSchema
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  spellCodec
3
- } from "../chunk-MWCCGPG3.js";
4
- import "../chunk-XY6X2APM.js";
3
+ } from "../chunk-OOSRUJBI.js";
4
+ import "../chunk-7Q2VPKCD.js";
5
5
  import "../chunk-ZDAEGJH4.js";
6
6
  import "../chunk-UA5KS2PL.js";
7
7
  export {
@@ -1,4 +1,4 @@
1
- import { Spell } from "./spell.types.js";
1
+ import { Spell, SpellMaterial } from "./spell.types.js";
2
2
  import { ParseResult } from "@archivist-gg/core";
3
3
  /**
4
4
  * §3.3 · collapse the converter's structured `components` object to the corpus's own string form
@@ -13,6 +13,11 @@ import { ParseResult } from "@archivist-gg/core";
13
13
  * the unreachable-shape fallback (the schema has already accepted the value by the time we run).
14
14
  */
15
15
  export declare function normalizeSpellComponents(value: unknown): string;
16
+ /**
17
+ * D2b-B · the structured material component the string form cannot carry: `components.m` when it is an OBJECT (`text` with an
18
+ * optional `cost` and `consume`), copied field by field; `undefined` for every other shape. Structural narrowing, as above.
19
+ */
20
+ export declare function spellMaterialOf(value: unknown): SpellMaterial | undefined;
16
21
  /**
17
22
  * §3.3 · collapse the converter's structured `duration` array to the corpus's own lowercase string
18
23
  * form (`until dispelled`, `up to 1 hour`), leaving a string input byte-unchanged. Concentration is
@@ -2,13 +2,15 @@ import {
2
2
  mirrorSpellShapes,
3
3
  normalizeSpellComponents,
4
4
  normalizeSpellDuration,
5
- parseSpell
6
- } from "../chunk-XY6X2APM.js";
5
+ parseSpell,
6
+ spellMaterialOf
7
+ } from "../chunk-7Q2VPKCD.js";
7
8
  import "../chunk-ZDAEGJH4.js";
8
9
  import "../chunk-UA5KS2PL.js";
9
10
  export {
10
11
  mirrorSpellShapes,
11
12
  normalizeSpellComponents,
12
13
  normalizeSpellDuration,
13
- parseSpell
14
+ parseSpell,
15
+ spellMaterialOf
14
16
  };
@@ -1,5 +1,10 @@
1
1
  import type { CastingOption } from "@archivist-gg/dnd5e/types/casting-option";
2
2
  export type { CastingOption };
3
+ export interface SpellMaterial {
4
+ text: string;
5
+ cost?: number;
6
+ consume?: boolean | string;
7
+ }
3
8
  export interface Spell {
4
9
  name: string;
5
10
  level?: number;
@@ -7,6 +12,11 @@ export interface Spell {
7
12
  casting_time?: string;
8
13
  range?: string;
9
14
  components?: string;
15
+ /** D2b-B: the converter's structured material component (`components.m` as an object), kept beside the `components` string,
16
+ * which cannot carry its numbers: `cost` in copper pieces as authored (5etools), `consume` true or a word ("optional").
17
+ * Absent for a string `components`, a bare `m: true` or a string `m`. A PARSE output only, never a YAML key: the codec
18
+ * drops it on serialize. */
19
+ material?: SpellMaterial;
10
20
  duration?: string;
11
21
  concentration?: boolean;
12
22
  ritual?: boolean;
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  subclassCodec
3
- } from "../chunk-M2OWVAZG.js";
4
- import "../chunk-5KGV6TF7.js";
5
- import "../chunk-J53ERF6K.js";
3
+ } from "../chunk-QZSWN2KT.js";
4
+ import "../chunk-OFCSP6MT.js";
5
+ import "../chunk-LF5AGJA4.js";
6
6
  import "../chunk-4U55VNC7.js";
7
7
  import "../chunk-G6MHJDVT.js";
8
8
  import "../chunk-CJYCVNW2.js";
9
- import "../chunk-FPGXFD2M.js";
9
+ import "../chunk-YD2VAHA6.js";
10
10
  import "../chunk-WYGD2UGN.js";
11
11
  import "../chunk-ZJXSXVFP.js";
12
- import "../chunk-BRGLDWUP.js";
13
- import "../chunk-ZMJQUZQH.js";
12
+ import "../chunk-5MXFW4O3.js";
13
+ import "../chunk-2JSQE3DD.js";
14
14
  import "../chunk-UA5KS2PL.js";
15
15
  export {
16
16
  subclassCodec
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  parseSubclass
3
- } from "../chunk-5KGV6TF7.js";
4
- import "../chunk-J53ERF6K.js";
3
+ } from "../chunk-OFCSP6MT.js";
4
+ import "../chunk-LF5AGJA4.js";
5
5
  import "../chunk-4U55VNC7.js";
6
6
  import "../chunk-G6MHJDVT.js";
7
7
  import "../chunk-CJYCVNW2.js";
8
- import "../chunk-FPGXFD2M.js";
8
+ import "../chunk-YD2VAHA6.js";
9
9
  import "../chunk-WYGD2UGN.js";
10
10
  import "../chunk-ZJXSXVFP.js";
11
- import "../chunk-BRGLDWUP.js";
12
- import "../chunk-ZMJQUZQH.js";
11
+ import "../chunk-5MXFW4O3.js";
12
+ import "../chunk-2JSQE3DD.js";
13
13
  import "../chunk-UA5KS2PL.js";
14
14
  export {
15
15
  parseSubclass
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  subclassEntitySchema
3
- } from "../chunk-J53ERF6K.js";
3
+ } from "../chunk-LF5AGJA4.js";
4
4
  import "../chunk-G6MHJDVT.js";
5
5
  import "../chunk-CJYCVNW2.js";
6
- import "../chunk-FPGXFD2M.js";
6
+ import "../chunk-YD2VAHA6.js";
7
7
  import "../chunk-WYGD2UGN.js";
8
8
  import "../chunk-ZJXSXVFP.js";
9
- import "../chunk-BRGLDWUP.js";
10
- import "../chunk-ZMJQUZQH.js";
9
+ import "../chunk-5MXFW4O3.js";
10
+ import "../chunk-2JSQE3DD.js";
11
11
  import "../chunk-UA5KS2PL.js";
12
12
  export {
13
13
  subclassEntitySchema
@@ -88,6 +88,8 @@ export interface EntityFilter {
88
88
  list?: string;
89
89
  level?: number;
90
90
  edition?: string;
91
+ /** D2b-A: true keeps only spells a note marks `ritual` (Pact of the Tome's rituals). */
92
+ ritual?: boolean;
91
93
  }
92
94
  export interface InlineOption {
93
95
  value: string;
@@ -116,6 +118,9 @@ export type Choice = {
116
118
  entity_type: string;
117
119
  from?: string[];
118
120
  where?: EntityFilter;
121
+ /** D2b-A: the pick names a TARGET (the cantrip a blast invocation's rider reaches), not a grant: nothing it picks
122
+ * becomes the character's own (a spell, a feat, a feature). */
123
+ target?: true;
119
124
  } | {
120
125
  kind: "select-proficiency";
121
126
  id: string;
@@ -27,6 +27,12 @@ export type FeatureEffect = ({
27
27
  skills: string[];
28
28
  ability: Ability;
29
29
  minimum?: number;
30
+ } & Qualified) | ({
31
+ kind: "save-bonus";
32
+ ability: Ability;
33
+ minimum?: number;
34
+ saves?: Ability[];
35
+ inactive_while?: "incapacitated" | "unconscious";
30
36
  } & Qualified) | ({
31
37
  kind: "half-proficiency";
32
38
  skills?: string[];
@@ -1,3 +1,4 @@
1
+ import type { Choice } from "./choice.js";
1
2
  import type { FeatureEffect } from "./feature-effect.js";
2
3
  import type { ActionCost, ResetTrigger, ResourceConsumption } from "./resource.js";
3
4
  import type { Duration } from "../schemas/duration-schema.js";
@@ -165,4 +166,8 @@ export interface OptionalFeatureEntity {
165
166
  options?: OptionRow[];
166
167
  /** This member infuses an existing object; its effect is an item-vocabulary overlay (spec §4.2). */
167
168
  infuse?: InfuseBlock;
169
+ /** D2b-A (design §2.2 step 1): the member's OWN choices (Lessons of the First Ones' Origin feat, Superior Technique's
170
+ * maneuver, Pact of the Tome's cantrips and rituals), in the same `Choice` vocabulary features and feats use. Absent,
171
+ * the engine derives them from the raw keys the note already carries (`memberChoices`, `pc.member-choices.ts`). */
172
+ choices?: Choice[];
168
173
  }
@@ -43,8 +43,8 @@ export interface PoolGrant {
43
43
  * members' `rendering_hint` at resolve time onto `ResolvedPool.layout` (pc/pool-layout.ts), and that
44
44
  * derivation is UNCONDITIONAL: it runs whether or not the declaration carries a `layout`. R4-G4 T5
45
45
  * LANDED the precedence in the plugin: `TabsContainer`'s dynamic-pool-tab loop reads the AUTHORED
46
- * value first, then `ResolvedPool.layout`, then the `spell-like` default, and `PoolTab`'s `LAYOUTS`
47
- * registry routes all four members (an unknown string degrades to `spell-like` and never throws).
46
+ * value first, then `ResolvedPool.layout`. Since PT (spec §9) every pool tab draws one table and the value
47
+ * picks only the tab's HEAD (`poolPresentation`); `spell-like` and `blocks` still parse and are ignored.
48
48
  * R4-G5 CLOSED that list, and NOT by adding values: `pool-selection` and `stance` never get a layout value
49
49
  * (measured, spec §10: the three `stance`-hinted documents are field-identical to three unhinted siblings, and
50
50
  * `pool-selection`'s meaning is delivered by `spell-like` plus the §5 head), and `granted-die-to-ally` is a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archivist-gg/dnd5e",
3
- "version": "0.3.13",
3
+ "version": "0.3.17",
4
4
  "license": "MIT AND CC-BY-4.0",
5
5
  "type": "module",
6
6
  "publishConfig": {