@archivist-gg/dnd5e 0.3.9 → 0.3.11
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/{chunk-HLQAFZKQ.js → chunk-2INMRR3Q.js} +2 -2
- package/dist/{chunk-MI7P3NX3.js → chunk-3HX5VLWP.js} +1 -1
- package/dist/{chunk-3UNP3G4D.js → chunk-CHUALUIX.js} +1 -1
- package/dist/{chunk-JSZ4H6AQ.js → chunk-MWCCGPG3.js} +1 -1
- package/dist/{chunk-22MOUU2G.js → chunk-T2SNEJOE.js} +1 -1
- package/dist/{chunk-OYUEUKKF.js → chunk-U3BABVJF.js} +10 -6
- package/dist/chunk-W6GC6OKK.js +16 -0
- package/dist/{chunk-OZP6JFGT.js → chunk-XY6X2APM.js} +3 -1
- package/dist/{chunk-VQAXTIBW.js → chunk-ZDAEGJH4.js} +2 -0
- package/dist/feat/feat.codec.js +3 -3
- package/dist/feat/feat.parser.js +2 -2
- package/dist/feat/feat.schema.js +1 -1
- package/dist/index.js +306 -120
- package/dist/pc/pc.additional-spells.js +3 -3
- package/dist/pc/pc.decision-engine.js +4 -4
- package/dist/pc/pc.proficiencies.js +4 -4
- package/dist/pc/pc.recalc.js +4 -4
- package/dist/pc/pc.resolver.js +4 -4
- package/dist/spell/casting-time.d.ts +22 -0
- package/dist/spell/casting-time.js +6 -0
- package/dist/spell/spell.codec.js +3 -3
- package/dist/spell/spell.filter.d.ts +2 -2
- package/dist/spell/spell.filter.js +7 -19
- package/dist/spell/spell.parser.js +2 -2
- package/dist/spell/spell.scaling.d.ts +34 -10
- package/dist/spell/spell.scaling.js +36 -4
- package/dist/spell/spell.schema.d.ts +1 -0
- package/dist/spell/spell.schema.js +1 -1
- package/dist/spell/spell.types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-YHYTW5QA.js";
|
|
22
22
|
import {
|
|
23
23
|
collectAdditionalSpells
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3HX5VLWP.js";
|
|
25
25
|
import {
|
|
26
26
|
isItemEntity,
|
|
27
27
|
resolveEntityForEntry
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
} from "./chunk-EVMUJYUD.js";
|
|
57
57
|
import {
|
|
58
58
|
mirrorSpellShapes
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-XY6X2APM.js";
|
|
60
60
|
import {
|
|
61
61
|
ABILITY_KEYS
|
|
62
62
|
} from "./chunk-WELIKLZF.js";
|
|
@@ -69,13 +69,17 @@ var featEntitySchema = z.object({
|
|
|
69
69
|
optionalfeature_progression: z.array(progressionSchema).optional(),
|
|
70
70
|
// 4
|
|
71
71
|
resources: z.array(resourceSchema).optional(),
|
|
72
|
-
// closes the feat.types.ts `Feat.resources` schema/type asymmetry (C)
|
|
73
|
-
//
|
|
74
|
-
//
|
|
72
|
+
// closes the feat.types.ts `Feat.resources` schema/type asymmetry (C).
|
|
73
|
+
// CONVERTER carriers since import-5etools cb382b6 (feat-mapper `mapFeatEconomy`): 69 of 287 feat docs,
|
|
74
|
+
// 72 entries (41 `prof`, 29 `1`, Lucky PHB `3`, Boon of Recovery `10` + die d10), ids owner-namespaced
|
|
75
|
+
// `<feat-slug-tail>:<tracker-slug>`; 0 SRD-bundle carriers. The resolver carries them onto the
|
|
76
|
+
// synthesized feat feature, so each draws a tracker. Import resourceSchema.
|
|
75
77
|
action_cost: actionCostEnum.optional(),
|
|
76
|
-
// ruling R-G1b-5 (gate1-r1 f1): a TOP-LEVEL
|
|
77
|
-
// feat (`SRD 2024/Feats/Boon of the Night Spirit.md
|
|
78
|
-
//
|
|
78
|
+
// ruling R-G1b-5 (gate1-r1 f1): a TOP-LEVEL entity key. SRD bundle:
|
|
79
|
+
// one feat per edition (`SRD 2024/Feats/Boon of the Night Spirit.md` bonus-action; SRD 5e Grappler
|
|
80
|
+
// `action` through the `feat_features` overlay since 0.3.11). CONVERTER: 76 of 287 feat docs since
|
|
81
|
+
// import-5etools 1002a6c (31 bonus-action, 34 reaction, 11 action). Top-level at entity level
|
|
82
|
+
// — the ninth SRD-control non-kept row: top-level on the ENTITY, not featureSchema-shaped
|
|
79
83
|
// (finding 14's nine rows split 4 featureSchema / 4 §2.8-arity / this one, which needed its own
|
|
80
84
|
// declaration — gate1-r4 R4-1). `actionCostEnum` is exported from
|
|
81
85
|
// `schemas/resource-schema.ts` (optionalFeatureEntitySchema already imports it). MAPPED since
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/spell/casting-time.ts
|
|
2
|
+
function parseCastingTime(token) {
|
|
3
|
+
var _a;
|
|
4
|
+
const t = (_a = token == null ? void 0 : token.trim()) != null ? _a : "";
|
|
5
|
+
if (!t) return null;
|
|
6
|
+
if (/^(?:1\s*)?reaction\b/i.test(t)) return { kind: "reaction", count: 1 };
|
|
7
|
+
if (/^(?:1\s*)?bonus(?:[\s-]*action)?\b/i.test(t)) return { kind: "bonus", count: 1 };
|
|
8
|
+
if (/^(?:1\s*)?action\b/i.test(t)) return { kind: "action", count: 1 };
|
|
9
|
+
const m = /^(\d+)?[\s-]*(minute|min|hour|hr)s?\b/i.exec(t);
|
|
10
|
+
if (m) return { kind: "time", count: m[1] ? Number(m[1]) : 1, unit: /^h/i.test(m[2]) ? "hour" : "minute" };
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
parseCastingTime
|
|
16
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
spellEntitySchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZDAEGJH4.js";
|
|
4
4
|
|
|
5
5
|
// src/spell/spell.parser.ts
|
|
6
6
|
import { parseYaml, toStringSafe } from "@archivist-gg/core";
|
|
@@ -18,6 +18,7 @@ var KNOWN_KEYS = /* @__PURE__ */ new Set([
|
|
|
18
18
|
"description",
|
|
19
19
|
"at_higher_levels",
|
|
20
20
|
"damage",
|
|
21
|
+
"damage_roll",
|
|
21
22
|
"saving_throw",
|
|
22
23
|
"casting_options",
|
|
23
24
|
// §2 · the fourteen converter keys. This gate and `spellEntitySchema` are independent: a key
|
|
@@ -121,6 +122,7 @@ function parseSpell(source) {
|
|
|
121
122
|
if (raw.description) spell.description = raw.description;
|
|
122
123
|
if (raw.at_higher_levels) spell.at_higher_levels = raw.at_higher_levels.map(String);
|
|
123
124
|
if (raw.damage) spell.damage = { types: raw.damage.types.map(String) };
|
|
125
|
+
if (raw.damage_roll != null) spell.damage_roll = raw.damage_roll;
|
|
124
126
|
if (raw.saving_throw) spell.saving_throw = { ability: raw.saving_throw.ability };
|
|
125
127
|
if (raw.casting_options) {
|
|
126
128
|
spell.casting_options = raw.casting_options.map((opt) => {
|
|
@@ -59,6 +59,8 @@ var spellEntitySchema = z.object({
|
|
|
59
59
|
description: z.string().optional(),
|
|
60
60
|
at_higher_levels: z.array(z.string()).optional(),
|
|
61
61
|
damage: z.object({ types: z.array(z.string()) }).optional(),
|
|
62
|
+
// The base roll at the spell's own level (a cantrip's tier-1 roll); see `Spell.damage_roll`.
|
|
63
|
+
damage_roll: z.string().optional(),
|
|
62
64
|
saving_throw: z.object({ ability: z.string() }).optional(),
|
|
63
65
|
casting_options: z.array(castingOptionSchema).optional(),
|
|
64
66
|
// §2 · the fourteen converter keys this root refused before R4-G2. Doc counts are MEASURED over
|
package/dist/feat/feat.codec.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
featCodec
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-CHUALUIX.js";
|
|
4
|
+
import "../chunk-T2SNEJOE.js";
|
|
5
|
+
import "../chunk-U3BABVJF.js";
|
|
6
6
|
import "../chunk-ZJXSXVFP.js";
|
|
7
7
|
import "../chunk-2M34FLAY.js";
|
|
8
8
|
import "../chunk-XTRDCSJB.js";
|
package/dist/feat/feat.parser.js
CHANGED