@archivist-gg/dnd5e 0.3.13 → 0.3.19
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/dist/background/background.codec.js +5 -5
- package/dist/background/background.parser.js +4 -4
- package/dist/background/background.schema.js +3 -3
- package/dist/chunk-3LWMFYKS.js +57 -0
- package/dist/{chunk-4SLOJXJ4.js → chunk-3SFGWFVQ.js} +1 -1
- package/dist/{chunk-Q6UOHCCT.js → chunk-3SIUAFDQ.js} +1 -1
- package/dist/chunk-4J6DS3EJ.js +30 -0
- package/dist/{chunk-RLGQ5PZZ.js → chunk-5JXFJ5AU.js} +11 -1
- package/dist/{chunk-4BZ47YJ4.js → chunk-64VNLMSG.js} +59 -16
- package/dist/{chunk-XY6X2APM.js → chunk-7Q2VPKCD.js} +17 -0
- package/dist/{chunk-Q5XTEYHD.js → chunk-7XJHI5H5.js} +16 -9
- package/dist/{chunk-FPGXFD2M.js → chunk-B2QHP6UF.js} +2 -2
- package/dist/{chunk-HJQNK3J5.js → chunk-B3DP42OM.js} +1 -4
- package/dist/{chunk-MC5YJ4PB.js → chunk-BJGOSM76.js} +1 -1
- package/dist/{chunk-VDPRBUU5.js → chunk-BJWSOQUC.js} +1 -1
- package/dist/{chunk-QEO7LYTG.js → chunk-EJD47JHL.js} +181 -93
- package/dist/{chunk-X7VZY4ON.js → chunk-FJYBLXV7.js} +2 -2
- package/dist/{chunk-QSBJ6NEM.js → chunk-FMUD3LDV.js} +1 -1
- package/dist/{chunk-LVX6TQ3R.js → chunk-FMYWORTP.js} +2 -2
- package/dist/{chunk-PX25R3DK.js → chunk-FVXLP7P3.js} +1 -1
- package/dist/{chunk-XJRNEQPD.js → chunk-GVWEFECG.js} +1 -1
- package/dist/{chunk-R2V5LN3I.js → chunk-HY2SRSVM.js} +1 -1
- package/dist/{chunk-ZMJQUZQH.js → chunk-JXWNXIIZ.js} +24 -0
- package/dist/chunk-KR6JF3BF.js +14 -0
- package/dist/{chunk-DPM6V7YX.js → chunk-LICYHPI3.js} +82 -6
- package/dist/{chunk-J53ERF6K.js → chunk-LNT64X7C.js} +1 -1
- package/dist/{chunk-RQNJXADQ.js → chunk-NKZMQV2C.js} +1 -1
- package/dist/{chunk-UE6LKRXQ.js → chunk-NTU2DXNG.js} +24 -1
- package/dist/{chunk-T5GZBKIQ.js → chunk-NXUY5XQN.js} +168 -33
- package/dist/{chunk-M2OWVAZG.js → chunk-NZO7M5GV.js} +1 -1
- package/dist/{chunk-BRGLDWUP.js → chunk-OOL4KMG2.js} +7 -3
- package/dist/{chunk-MWCCGPG3.js → chunk-OOSRUJBI.js} +3 -2
- package/dist/{chunk-H5PTKYXL.js → chunk-QA3YCOML.js} +1 -1
- package/dist/{chunk-MUIU7RZ3.js → chunk-QFWQKS3M.js} +1 -1
- package/dist/chunk-RD2MID3M.js +292 -0
- package/dist/chunk-TRBGC4ZG.js +112 -0
- package/dist/{chunk-PLOSP4XQ.js → chunk-UJCK5IW4.js} +11 -2
- package/dist/{chunk-5KGV6TF7.js → chunk-UNYR5GLI.js} +1 -1
- package/dist/{chunk-JNNNBEUH.js → chunk-VN5DLURA.js} +7 -2
- package/dist/{chunk-EL6QPF6I.js → chunk-VP5TIXDK.js} +1 -1
- package/dist/chunk-WOHX7YTH.js +165 -0
- package/dist/{chunk-G7ED5H2G.js → chunk-XTEFPUSN.js} +1 -1
- package/dist/{chunk-6ZY3U6BQ.js → chunk-ZOWKWMD2.js} +1 -1
- package/dist/class/class.codec.js +6 -6
- package/dist/class/class.parser.js +5 -5
- package/dist/class/class.schema.d.ts +8 -0
- package/dist/class/class.schema.js +4 -4
- package/dist/class/class.standard-array.d.ts +16 -0
- package/dist/class/class.standard-array.js +20 -0
- package/dist/class/class.types.d.ts +3 -0
- package/dist/dnd/amount-text.d.ts +42 -0
- package/dist/dnd/amount-text.js +15 -0
- package/dist/dnd/resource-words.d.ts +4 -0
- package/dist/dnd/resource-words.js +30 -0
- package/dist/entities/registry-revision.d.ts +25 -0
- package/dist/entities/registry-revision.js +10 -0
- package/dist/feat/feat.codec.js +5 -5
- package/dist/feat/feat.parser.js +4 -4
- package/dist/feat/feat.schema.d.ts +34 -0
- package/dist/feat/feat.schema.js +3 -3
- package/dist/index.js +4027 -383
- package/dist/monster/monster.parser.js +5 -5
- package/dist/monster/monster.schema.js +4 -4
- package/dist/optional-feature/optional-feature.codec.js +5 -4
- package/dist/optional-feature/optional-feature.parser.js +4 -3
- package/dist/optional-feature/optional-feature.schema.d.ts +35 -0
- package/dist/optional-feature/optional-feature.schema.js +3 -2
- package/dist/pc/pc.additional-spells.d.ts +16 -2
- package/dist/pc/pc.additional-spells.js +5 -2
- package/dist/pc/pc.amount-bindings.d.ts +41 -0
- package/dist/pc/pc.amount-bindings.js +28 -0
- package/dist/pc/pc.decision-engine.d.ts +11 -0
- package/dist/pc/pc.decision-engine.js +20 -16
- package/dist/pc/pc.entry-overrides.js +3 -2
- package/dist/pc/pc.equipment.js +7 -5
- package/dist/pc/pc.feature-effects.d.ts +21 -2
- package/dist/pc/pc.feature-effects.js +15 -2
- package/dist/pc/pc.infusions.d.ts +9 -1
- package/dist/pc/pc.infusions.js +3 -2
- package/dist/pc/pc.member-choices.d.ts +122 -0
- package/dist/pc/pc.member-choices.js +39 -0
- package/dist/pc/pc.parser.js +1 -1
- package/dist/pc/pc.pools.d.ts +7 -0
- package/dist/pc/pc.pools.js +5 -2
- package/dist/pc/pc.proficiencies.d.ts +14 -0
- package/dist/pc/pc.proficiencies.js +72 -22
- package/dist/pc/pc.proficiency-normalize.d.ts +14 -0
- package/dist/pc/pc.proficiency-normalize.js +9 -3
- package/dist/pc/pc.proficiency-query.js +7 -1
- package/dist/pc/pc.recalc.js +212 -99
- package/dist/pc/pc.resolver.d.ts +6 -2
- package/dist/pc/pc.resolver.js +16 -14
- package/dist/pc/pc.rest.js +4 -3
- package/dist/pc/pc.schema.d.ts +48 -2
- package/dist/pc/pc.schema.js +1 -1
- package/dist/pc/pc.spell-scope.d.ts +22 -0
- package/dist/pc/pc.tool-picks.js +2 -2
- package/dist/pc/pc.types.d.ts +110 -6
- package/dist/pc/pc.weapon-grant.d.ts +15 -0
- package/dist/pc/pool-layout.d.ts +3 -9
- package/dist/pc/pool-layout.js +1 -3
- package/dist/pc/resource-equivalents.d.ts +44 -0
- package/dist/pc/spell-source.js +4 -9
- package/dist/race/race.codec.js +6 -6
- package/dist/race/race.parser.js +5 -5
- package/dist/race/race.schema.js +4 -4
- package/dist/schemas/choice-schema.js +2 -2
- package/dist/schemas/feature-effect-schema.d.ts +34 -0
- package/dist/schemas/feature-effect-schema.js +1 -1
- package/dist/schemas/feature-schema.js +3 -3
- package/dist/spell/spell.codec.js +2 -2
- package/dist/spell/spell.parser.d.ts +6 -1
- package/dist/spell/spell.parser.js +5 -3
- package/dist/spell/spell.types.d.ts +10 -0
- package/dist/subclass/subclass.codec.js +6 -6
- package/dist/subclass/subclass.parser.js +5 -5
- package/dist/subclass/subclass.schema.js +4 -4
- package/dist/types/choice.d.ts +7 -2
- package/dist/types/feature-effect.d.ts +24 -0
- package/dist/types/optional-feature.types.d.ts +6 -1
- package/dist/types/selection-pool.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
classCodec
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-GVWEFECG.js";
|
|
4
|
+
import "../chunk-XTEFPUSN.js";
|
|
5
5
|
import "../chunk-4U55VNC7.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-UJCK5IW4.js";
|
|
7
7
|
import "../chunk-G6MHJDVT.js";
|
|
8
8
|
import "../chunk-CJYCVNW2.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-B2QHP6UF.js";
|
|
10
10
|
import "../chunk-WYGD2UGN.js";
|
|
11
11
|
import "../chunk-ZJXSXVFP.js";
|
|
12
12
|
import "../chunk-IN4M4X7P.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-OOL4KMG2.js";
|
|
14
|
+
import "../chunk-JXWNXIIZ.js";
|
|
15
15
|
import "../chunk-UA5KS2PL.js";
|
|
16
16
|
export {
|
|
17
17
|
classCodec
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseClass
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-XTEFPUSN.js";
|
|
4
4
|
import "../chunk-4U55VNC7.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-UJCK5IW4.js";
|
|
6
6
|
import "../chunk-G6MHJDVT.js";
|
|
7
7
|
import "../chunk-CJYCVNW2.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-B2QHP6UF.js";
|
|
9
9
|
import "../chunk-WYGD2UGN.js";
|
|
10
10
|
import "../chunk-ZJXSXVFP.js";
|
|
11
11
|
import "../chunk-IN4M4X7P.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-OOL4KMG2.js";
|
|
13
|
+
import "../chunk-JXWNXIIZ.js";
|
|
14
14
|
import "../chunk-UA5KS2PL.js";
|
|
15
15
|
export {
|
|
16
16
|
parseClass
|
|
@@ -22,6 +22,14 @@ export declare const classEntitySchema: z.ZodObject<{
|
|
|
22
22
|
wis: "wis";
|
|
23
23
|
cha: "cha";
|
|
24
24
|
}>>;
|
|
25
|
+
standard_array: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
str: z.ZodNumber;
|
|
27
|
+
dex: z.ZodNumber;
|
|
28
|
+
con: z.ZodNumber;
|
|
29
|
+
int: z.ZodNumber;
|
|
30
|
+
wis: z.ZodNumber;
|
|
31
|
+
cha: z.ZodNumber;
|
|
32
|
+
}, z.core.$strict>>;
|
|
25
33
|
saving_throws: z.ZodArray<z.ZodEnum<{
|
|
26
34
|
str: "str";
|
|
27
35
|
dex: "dex";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
classEntitySchema
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-UJCK5IW4.js";
|
|
4
4
|
import "../chunk-G6MHJDVT.js";
|
|
5
5
|
import "../chunk-CJYCVNW2.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-B2QHP6UF.js";
|
|
7
7
|
import "../chunk-WYGD2UGN.js";
|
|
8
8
|
import "../chunk-ZJXSXVFP.js";
|
|
9
9
|
import "../chunk-IN4M4X7P.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-OOL4KMG2.js";
|
|
11
|
+
import "../chunk-JXWNXIIZ.js";
|
|
12
12
|
import "../chunk-UA5KS2PL.js";
|
|
13
13
|
export {
|
|
14
14
|
classEntitySchema
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D2b-A (A-1, user pick A) · the class's recommended Standard Array, which the Builder's Abilities step suggests.
|
|
3
|
+
*/
|
|
4
|
+
import type { Ability } from "@archivist-gg/dnd5e/types/choice";
|
|
5
|
+
import type { ClassEntity } from "./class.types.js";
|
|
6
|
+
/** Structural subset of the registry this reads. */
|
|
7
|
+
export interface StandardArrayRegistry {
|
|
8
|
+
search(query: string, entityType: string, limit: number): Array<{
|
|
9
|
+
slug: string;
|
|
10
|
+
data: Record<string, unknown>;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
/** The class's own `standard_array`; else, for a 2024 class that carries none (a book class imported before the table
|
|
14
|
+
* was data), the table of its 2024 twin in the registry (the same bare slug, e.g. the SRD 2024 Fighter for the PHB
|
|
15
|
+
* 2024 Fighter). Null for a 2014 class and for a class with no 2024 twin (homebrew): the Builder then suggests nothing. */
|
|
16
|
+
export declare function standardArrayFor(entity: Pick<ClassEntity, "slug" | "edition" | "standard_array">, registry: StandardArrayRegistry | null | undefined): Record<Ability, number> | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
bareEntitySlug
|
|
3
|
+
} from "../chunk-ZCTUYGNV.js";
|
|
4
|
+
|
|
5
|
+
// src/class/class.standard-array.ts
|
|
6
|
+
var isArray = (v) => !!v && typeof v === "object" && ["str", "dex", "con", "int", "wis", "cha"].every((k) => typeof v[k] === "number");
|
|
7
|
+
function standardArrayFor(entity, registry) {
|
|
8
|
+
if (isArray(entity.standard_array)) return entity.standard_array;
|
|
9
|
+
if (entity.edition !== "2024" || !registry) return null;
|
|
10
|
+
const bare = bareEntitySlug(entity.slug);
|
|
11
|
+
for (const e of registry.search("", "class", Number.POSITIVE_INFINITY)) {
|
|
12
|
+
if (e.slug === entity.slug || bareEntitySlug(e.slug) !== bare) continue;
|
|
13
|
+
const d = e.data;
|
|
14
|
+
if (d.edition === "2024" && isArray(d.standard_array)) return d.standard_array;
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
standardArrayFor
|
|
20
|
+
};
|
|
@@ -69,6 +69,9 @@ export interface ClassEntity {
|
|
|
69
69
|
description: string;
|
|
70
70
|
hit_die: string;
|
|
71
71
|
primary_abilities: Ability[];
|
|
72
|
+
/** D2b-A (A-1): the recommended Standard Array for the class, one score per ability (SRD 5.2 "Standard Array by
|
|
73
|
+
* Class"). Absent on 2014 classes and homebrew; the Builder then suggests nothing. */
|
|
74
|
+
standard_array?: Record<Ability, number>;
|
|
72
75
|
saving_throws: Ability[];
|
|
73
76
|
proficiencies: ClassProficiencies;
|
|
74
77
|
skill_choices: SkillChoices;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D2b-A · an AMOUNT that names a modifier prints the number (design §1.2 A, user rulings 2026-09-27).
|
|
3
|
+
*
|
|
4
|
+
* An effect amount, a rider amount or a save DC formula is written in the book's words ("1d8 plus your Wisdom
|
|
5
|
+
* modifier", "your spell save DC") or with a `{token}` ("2d4 + {spell_mod}"). Nothing rendered it as a number: the
|
|
6
|
+
* resource DSL (`resource-formula.ts`) has no dice production and no spellcasting idents. This module reads both at
|
|
7
|
+
* READ time, so existing notes and homebrew need no re-import:
|
|
8
|
+
* 1. `normalizeAmountPhrases` turns the closed phrase table below into tokens;
|
|
9
|
+
* 2. `resolveAmountText` substitutes each `{ident}` with its number and folds: a pure numeric result is evaluated by
|
|
10
|
+
* the resource DSL (so `floor`, `max`, `ceil` keep working) and a trailing "(minimum of N)" is applied;
|
|
11
|
+
* `<dice> +/- <numbers>` folds to one roll ("1d8+3"); anything else keeps its words with the numbers in place
|
|
12
|
+
* ("one roll of your Martial Arts die + 3").
|
|
13
|
+
* The phrase table is the ONE place the book's English is read; an unmapped phrase stays as written.
|
|
14
|
+
*/
|
|
15
|
+
import { type FormulaBindings } from "./resource-formula.js";
|
|
16
|
+
/** The DSL bindings plus the owner's spellcasting modifier and save DC (absent when the owner casts no spells). */
|
|
17
|
+
export interface AmountBindings extends FormulaBindings {
|
|
18
|
+
spell_mod?: number;
|
|
19
|
+
spell_dc?: number;
|
|
20
|
+
}
|
|
21
|
+
/** The book phrases of `text` as tokens, "plus" as "+"; text with no mapped phrase comes back unchanged. */
|
|
22
|
+
export declare function normalizeAmountPhrases(text: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* The amount as the sheet prints it: the phrases and tokens of `text` resolved against `b`. A pure number is
|
|
25
|
+
* evaluated ("13"); a roll plus numbers folds ("1d8+3"); other words keep their place with the numbers in ("the roll + 2
|
|
26
|
+
* (minimum of 1)"). An UNBOUND token prints its short label when the note wrote the token, and a book phrase whose
|
|
27
|
+
* token is unbound keeps the note's own words. Text with no phrase and no token comes back unchanged.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveAmountText(text: string, b: AmountBindings): string;
|
|
30
|
+
/** `roll` with each RESOLVED amount added (a spell's damage riders, already resolved against their owners): dice plus
|
|
31
|
+
* numbers fold to one roll ("2d4+5" and "2" read "2d4+7", "1d10" and "-1" read "1d10-1"); anything that does not fold
|
|
32
|
+
* keeps its words, joined by " + ". No amount returns `roll` unchanged. */
|
|
33
|
+
export declare function addToRoll(roll: string, amounts: readonly string[]): string;
|
|
34
|
+
/** The leading dice roll of a resolved amount ("1d8+3" of "1d8+3 (minimum of 1)"), which the sheet makes rollable; null
|
|
35
|
+
* when the amount does not open with a roll. */
|
|
36
|
+
export declare function diceRollOf(resolved: string): string | null;
|
|
37
|
+
/** The leading roll of `text` as the RAW characters it spans (`raw`, which the caller cuts the text by) and as a notation
|
|
38
|
+
* with no spaces (`notation`, which the roller reads): "2d4 + 2 more" is { raw: "2d4 + 2", notation: "2d4+2" }. */
|
|
39
|
+
export declare function diceRollPrefix(text: string): {
|
|
40
|
+
raw: string;
|
|
41
|
+
notation: string;
|
|
42
|
+
} | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addToRoll,
|
|
3
|
+
diceRollOf,
|
|
4
|
+
diceRollPrefix,
|
|
5
|
+
normalizeAmountPhrases,
|
|
6
|
+
resolveAmountText
|
|
7
|
+
} from "../chunk-WOHX7YTH.js";
|
|
8
|
+
import "../chunk-EVMUJYUD.js";
|
|
9
|
+
export {
|
|
10
|
+
addToRoll,
|
|
11
|
+
diceRollOf,
|
|
12
|
+
diceRollPrefix,
|
|
13
|
+
normalizeAmountPhrases,
|
|
14
|
+
resolveAmountText
|
|
15
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** The resource's name worded for `amount`: the last word singular for one, plural otherwise, when it is a count noun. */
|
|
2
|
+
export declare function resourceCountWord(name: string, amount: number): string;
|
|
3
|
+
/** "<amount> <name worded for it>" ("1 Superiority Die"). */
|
|
4
|
+
export declare function countedResource(amount: number, name: string): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/dnd/resource-words.ts
|
|
2
|
+
var COUNT_NOUNS = [
|
|
3
|
+
["Die", "Dice"],
|
|
4
|
+
["Point", "Points"],
|
|
5
|
+
["Use", "Uses"],
|
|
6
|
+
["Seal", "Seals"],
|
|
7
|
+
["Rage", "Rages"],
|
|
8
|
+
["Cast", "Casts"],
|
|
9
|
+
["Casting", "Castings"],
|
|
10
|
+
["Scroll", "Scrolls"],
|
|
11
|
+
["Charge", "Charges"],
|
|
12
|
+
["Token", "Tokens"],
|
|
13
|
+
["Slot", "Slots"]
|
|
14
|
+
];
|
|
15
|
+
var BY_WORD = new Map(
|
|
16
|
+
COUNT_NOUNS.flatMap((pair) => [[pair[0], pair], [pair[1], pair]])
|
|
17
|
+
);
|
|
18
|
+
function resourceCountWord(name, amount) {
|
|
19
|
+
const at = name.lastIndexOf(" ") + 1;
|
|
20
|
+
const pair = BY_WORD.get(name.slice(at));
|
|
21
|
+
if (!pair) return name;
|
|
22
|
+
return name.slice(0, at) + (amount === 1 ? pair[0] : pair[1]);
|
|
23
|
+
}
|
|
24
|
+
function countedResource(amount, name) {
|
|
25
|
+
return `${amount} ${resourceCountWord(name, amount)}`;
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
countedResource,
|
|
29
|
+
resourceCountWord
|
|
30
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A registry's change generation (PERF, Edgar 2026-09-28): a number that moves on every register, unregister and clear.
|
|
3
|
+
* Core's `EntityRegistry` carries none; the plugin's registry does (`RevisionedEntityRegistry`). Registry-derived data
|
|
4
|
+
* that does not depend on the character (an item index, a sorted bucket) is memoised per (registry, revision), so a
|
|
5
|
+
* write that changes only the character reads the registry zero times.
|
|
6
|
+
*
|
|
7
|
+
* The rule is strict: a registry WITHOUT a numeric `revision` is never cached, so a mock, a plain core registry or any
|
|
8
|
+
* other host always computes afresh and can never read stale data. (The older `registry.count()` memos in
|
|
9
|
+
* `pc.spellcasting.ts` and `spell.access.ts` carry a known gap, an in-place re-registration; this key has none.)
|
|
10
|
+
*/
|
|
11
|
+
export declare function registryRevision(registry: unknown): number | undefined;
|
|
12
|
+
/** `compute()` once per (registry, revision), kept in `cache`; every call when the registry has no revision. */
|
|
13
|
+
export declare function memoByRevision<T>(cache: WeakMap<object, {
|
|
14
|
+
revision: number;
|
|
15
|
+
value: T;
|
|
16
|
+
}>, registry: object, compute: () => T): T;
|
|
17
|
+
/** The registry surface a bucket read needs (structurally core's `EntityRegistry` and every narrower registry type). */
|
|
18
|
+
interface BucketSource<T> {
|
|
19
|
+
search(query: string, entityType: string, limit: number): T[];
|
|
20
|
+
}
|
|
21
|
+
/** `registry.search("", type, Infinity)`, the whole bucket in the registry's own order, read ONCE per registry state
|
|
22
|
+
* (every call when the registry has no revision). The array is SHARED by every caller until the revision moves: read
|
|
23
|
+
* it, never sort or splice it in place. */
|
|
24
|
+
export declare function bucketOf<T>(registry: BucketSource<T>, type: string): readonly T[];
|
|
25
|
+
export {};
|
package/dist/feat/feat.codec.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
featCodec
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-ZOWKWMD2.js";
|
|
4
|
+
import "../chunk-3SFGWFVQ.js";
|
|
5
|
+
import "../chunk-FMYWORTP.js";
|
|
6
6
|
import "../chunk-ZJXSXVFP.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-OOL4KMG2.js";
|
|
8
|
+
import "../chunk-JXWNXIIZ.js";
|
|
9
9
|
import "../chunk-UA5KS2PL.js";
|
|
10
10
|
export {
|
|
11
11
|
featCodec
|
package/dist/feat/feat.parser.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseFeat
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-3SFGWFVQ.js";
|
|
4
|
+
import "../chunk-FMYWORTP.js";
|
|
5
5
|
import "../chunk-ZJXSXVFP.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-OOL4KMG2.js";
|
|
7
|
+
import "../chunk-JXWNXIIZ.js";
|
|
8
8
|
import "../chunk-UA5KS2PL.js";
|
|
9
9
|
export {
|
|
10
10
|
parseFeat
|
|
@@ -88,6 +88,31 @@ export declare const featEntitySchema: z.ZodObject<{
|
|
|
88
88
|
minimum: z.ZodOptional<z.ZodNumber>;
|
|
89
89
|
condition: z.ZodOptional<z.ZodString>;
|
|
90
90
|
subject: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
92
|
+
kind: z.ZodLiteral<"save-bonus">;
|
|
93
|
+
ability: z.ZodEnum<{
|
|
94
|
+
str: "str";
|
|
95
|
+
dex: "dex";
|
|
96
|
+
con: "con";
|
|
97
|
+
int: "int";
|
|
98
|
+
wis: "wis";
|
|
99
|
+
cha: "cha";
|
|
100
|
+
}>;
|
|
101
|
+
minimum: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
saves: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
103
|
+
str: "str";
|
|
104
|
+
dex: "dex";
|
|
105
|
+
con: "con";
|
|
106
|
+
int: "int";
|
|
107
|
+
wis: "wis";
|
|
108
|
+
cha: "cha";
|
|
109
|
+
}>>>;
|
|
110
|
+
inactive_while: z.ZodOptional<z.ZodEnum<{
|
|
111
|
+
incapacitated: "incapacitated";
|
|
112
|
+
unconscious: "unconscious";
|
|
113
|
+
}>>;
|
|
114
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
115
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
91
116
|
}, z.core.$strip>, z.ZodObject<{
|
|
92
117
|
kind: z.ZodLiteral<"half-proficiency">;
|
|
93
118
|
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -181,6 +206,15 @@ export declare const featEntitySchema: z.ZodObject<{
|
|
|
181
206
|
finesse: "finesse";
|
|
182
207
|
thrown: "thrown";
|
|
183
208
|
}>>]>>;
|
|
209
|
+
spell_scope: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
list: z.ZodOptional<z.ZodString>;
|
|
211
|
+
level: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
school: z.ZodOptional<z.ZodString>;
|
|
213
|
+
damage_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
|
+
damage_type_pick: z.ZodOptional<z.ZodString>;
|
|
215
|
+
spells: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
216
|
+
once: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
+
}, z.core.$strict>>;
|
|
184
218
|
condition: z.ZodOptional<z.ZodString>;
|
|
185
219
|
subject: z.ZodOptional<z.ZodString>;
|
|
186
220
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/feat/feat.schema.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
featEntitySchema
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-FMYWORTP.js";
|
|
4
4
|
import "../chunk-ZJXSXVFP.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-OOL4KMG2.js";
|
|
6
|
+
import "../chunk-JXWNXIIZ.js";
|
|
7
7
|
import "../chunk-UA5KS2PL.js";
|
|
8
8
|
export {
|
|
9
9
|
featEntitySchema
|