@archivist-gg/dnd5e 0.3.24 → 0.3.26
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 +1 -1
- package/dist/background/background.parser.js +1 -1
- package/dist/background/background.schema.js +1 -1
- package/dist/{chunk-6LCNV26D.js → chunk-4SYAKWY4.js} +1 -1
- package/dist/{chunk-RL4VY2AL.js → chunk-5XDCM6YK.js} +1 -1
- package/dist/{chunk-HR5MKCP2.js → chunk-6R46KYGU.js} +1 -1
- package/dist/{chunk-XQMKH4R4.js → chunk-72PRMZRD.js} +1 -1
- package/dist/chunk-757KM22B.js +1 -0
- package/dist/chunk-CCAVZANF.js +1 -0
- package/dist/{chunk-A7H6LX47.js → chunk-CEHL7PPC.js} +1 -1
- package/dist/{chunk-BPKG6RZ7.js → chunk-CNMHADNV.js} +1 -1
- package/dist/{chunk-BGX36NPE.js → chunk-CSTAQQGX.js} +1 -1
- package/dist/{chunk-OTFNINUY.js → chunk-DTB7YBMZ.js} +1 -1
- package/dist/{chunk-7UPYRKMF.js → chunk-E3MS4M3N.js} +1 -1
- package/dist/{chunk-5FEXHY4U.js → chunk-E7KFJLDR.js} +1 -1
- package/dist/{chunk-RDXQAZBA.js → chunk-EPA24PVZ.js} +1 -1
- package/dist/{chunk-TLXFGGWH.js → chunk-ETDMOGFO.js} +1 -1
- package/dist/chunk-GD7WRCNH.js +1 -0
- package/dist/{chunk-GIOV6JW7.js → chunk-GGQDQSIF.js} +1 -1
- package/dist/{chunk-334WLI7V.js → chunk-GIQLIBC7.js} +1 -1
- package/dist/{chunk-QFIGPOFW.js → chunk-HX7WBOKR.js} +1 -1
- package/dist/chunk-J3RP5C7L.js +1 -0
- package/dist/chunk-J5GL6FLP.js +1 -0
- package/dist/{chunk-PZUPZBTN.js → chunk-KEXSF3CH.js} +1 -1
- package/dist/{chunk-N3RYJ7RE.js → chunk-L2DXF7YS.js} +1 -1
- package/dist/{chunk-KBFSJ5WE.js → chunk-LHH5XSEA.js} +1 -1
- package/dist/{chunk-V6NQ547U.js → chunk-NIWLD33X.js} +1 -1
- package/dist/{chunk-2LCGKNVM.js → chunk-NU2Z7MTS.js} +1 -1
- package/dist/{chunk-I4O2FIDT.js → chunk-NYPH7RQN.js} +1 -1
- package/dist/{chunk-WUHTSLG4.js → chunk-NYTR6NJS.js} +1 -1
- package/dist/{chunk-7J5BNH2D.js → chunk-ONCXJMJM.js} +1 -1
- package/dist/{chunk-IOCJIWCV.js → chunk-OTRH62HY.js} +1 -1
- package/dist/{chunk-NI364WV7.js → chunk-PFQPP77Q.js} +1 -1
- package/dist/{chunk-DY6FVAGA.js → chunk-PKIMOVQG.js} +1 -1
- package/dist/{chunk-7AKJBRBD.js → chunk-RHIEOYDX.js} +1 -1
- package/dist/{chunk-DZKSXSJF.js → chunk-SFK57JAA.js} +1 -1
- package/dist/{chunk-KZDDFG4O.js → chunk-VVJXZZ4Z.js} +1 -1
- package/dist/{chunk-QBA757AU.js → chunk-WAUNLUFQ.js} +1 -1
- package/dist/{chunk-RQGTBHJW.js → chunk-XPF53K54.js} +1 -1
- package/dist/{chunk-6ASJ3MVB.js → chunk-ZS5BMNXC.js} +1 -1
- package/dist/chunk-ZVL5FXXO.js +1 -0
- package/dist/class/class.codec.js +1 -1
- package/dist/class/class.parser.js +1 -1
- package/dist/class/class.schema.d.ts +2 -2
- package/dist/class/class.schema.js +1 -1
- package/dist/feat/feat.codec.js +1 -1
- package/dist/feat/feat.parser.js +1 -1
- package/dist/feat/feat.schema.d.ts +24 -3
- package/dist/feat/feat.schema.js +1 -1
- package/dist/index.js +9 -9
- package/dist/item/item.codec.js +1 -1
- package/dist/item/item.parser.js +1 -1
- package/dist/item/item.schema.d.ts +3 -0
- package/dist/item/item.schema.js +1 -1
- package/dist/item/item.types.d.ts +3 -0
- package/dist/monster/monster.parser.js +1 -1
- package/dist/monster/monster.schema.js +1 -1
- package/dist/optional-feature/optional-feature.codec.js +1 -1
- package/dist/optional-feature/optional-feature.parser.js +1 -1
- package/dist/optional-feature/optional-feature.schema.d.ts +23 -2
- package/dist/optional-feature/optional-feature.schema.js +1 -1
- package/dist/pc/pc.additional-spells.js +1 -1
- package/dist/pc/pc.amount-bindings.d.ts +3 -3
- package/dist/pc/pc.amount-bindings.js +1 -1
- package/dist/pc/pc.decision-engine.d.ts +6 -0
- package/dist/pc/pc.decision-engine.js +1 -1
- package/dist/pc/pc.entry-overrides.d.ts +19 -0
- package/dist/pc/pc.entry-overrides.js +1 -1
- package/dist/pc/pc.equipment.js +1 -1
- package/dist/pc/pc.feature-effects.d.ts +13 -8
- package/dist/pc/pc.feature-effects.js +1 -1
- package/dist/pc/pc.infusions.js +1 -1
- package/dist/pc/pc.item-effects.d.ts +1 -0
- package/dist/pc/pc.item-effects.js +1 -0
- package/dist/pc/pc.member-choices.js +1 -1
- package/dist/pc/pc.parser.js +1 -1
- package/dist/pc/pc.pools.js +1 -1
- package/dist/pc/pc.proficiencies.js +1 -1
- package/dist/pc/pc.proficiency-grants.d.ts +3 -1
- package/dist/pc/pc.recalc.d.ts +1 -0
- package/dist/pc/pc.recalc.js +1 -1
- package/dist/pc/pc.resolver.d.ts +9 -0
- package/dist/pc/pc.resolver.js +1 -1
- package/dist/pc/pc.resource-seed.js +1 -1
- package/dist/pc/pc.resources.js +1 -1
- package/dist/pc/pc.rest.js +1 -1
- package/dist/pc/pc.schema.d.ts +20 -0
- package/dist/pc/pc.schema.js +1 -1
- package/dist/pc/pc.speeds.d.ts +20 -3
- package/dist/pc/pc.spellcasting.js +1 -1
- package/dist/pc/pc.table-column.d.ts +3 -0
- package/dist/pc/pc.table-column.js +1 -1
- package/dist/pc/pc.types.d.ts +5 -0
- package/dist/race/race.codec.js +1 -1
- package/dist/race/race.parser.js +1 -1
- package/dist/race/race.schema.js +1 -1
- package/dist/schemas/choice-schema.js +1 -1
- package/dist/schemas/feature-effect-schema.d.ts +23 -2
- package/dist/schemas/feature-effect-schema.js +1 -1
- package/dist/schemas/feature-schema.js +1 -1
- package/dist/subclass/subclass.codec.js +1 -1
- package/dist/subclass/subclass.parser.js +1 -1
- package/dist/subclass/subclass.schema.js +1 -1
- package/dist/types/feature-effect.d.ts +8 -2
- package/package.json +1 -1
- package/dist/chunk-6IC53O3Q.js +0 -1
- package/dist/chunk-7LPKI27J.js +0 -1
- package/dist/chunk-HCK6IUB3.js +0 -1
- package/dist/chunk-IGVRLGLM.js +0 -1
- package/dist/chunk-MC6PLWRZ.js +0 -1
- package/dist/chunk-PQAVMK3T.js +0 -1
package/dist/item/item.codec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{itemCodec}from"../chunk-
|
|
1
|
+
import{itemCodec}from"../chunk-72PRMZRD.js";import"../chunk-757KM22B.js";import"../chunk-5XDCM6YK.js";import"../chunk-I26FHSI6.js";export{itemCodec};
|
package/dist/item/item.parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseItem}from"../chunk-
|
|
1
|
+
import{parseItem}from"../chunk-757KM22B.js";import"../chunk-5XDCM6YK.js";import"../chunk-I26FHSI6.js";export{parseItem};
|
|
@@ -246,6 +246,9 @@ export declare const itemEntitySchema: z.ZodObject<{
|
|
|
246
246
|
condition: z.ZodOptional<z.ZodString>;
|
|
247
247
|
}, z.core.$strip>>>;
|
|
248
248
|
scroll_level: z.ZodOptional<z.ZodNumber>;
|
|
249
|
+
spell_charge_cost: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
spell_save_dc: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
spell_attack_bonus: z.ZodOptional<z.ZodNumber>;
|
|
249
252
|
unidentified: z.ZodOptional<z.ZodBoolean>;
|
|
250
253
|
masked_category: z.ZodOptional<z.ZodString>;
|
|
251
254
|
modify_speed: z.ZodOptional<z.ZodObject<{
|
package/dist/item/item.schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{conditionSchema,containerSchema,itemEntitySchema}from"../chunk-
|
|
1
|
+
import{conditionSchema,containerSchema,itemEntitySchema}from"../chunk-5XDCM6YK.js";import"../chunk-I26FHSI6.js";export{conditionSchema,containerSchema,itemEntitySchema};
|
|
@@ -146,6 +146,9 @@ export interface ItemEntity {
|
|
|
146
146
|
condition?: string;
|
|
147
147
|
}>;
|
|
148
148
|
scroll_level?: number;
|
|
149
|
+
spell_charge_cost?: number;
|
|
150
|
+
spell_save_dc?: number;
|
|
151
|
+
spell_attack_bonus?: number;
|
|
149
152
|
unidentified?: boolean;
|
|
150
153
|
masked_category?: string;
|
|
151
154
|
modify_speed?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{migrateLegacy,parseMonster}from"../chunk-
|
|
1
|
+
import{migrateLegacy,parseMonster}from"../chunk-ZS5BMNXC.js";import"../chunk-HX7WBOKR.js";import"../chunk-NIWLD33X.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-LHH5XSEA.js";import"../chunk-ZVL5FXXO.js";import"../chunk-I26FHSI6.js";export{migrateLegacy,parseMonster};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MONSTER_KNOWN_KEYS,alignmentEntrySchema,damageQualifierSchema,gearEntrySchema,initiativeSchema,monsterACSchema,monsterCRSchema,monsterHPSchema,monsterSchema,monsterSpeedSchema,monsterSpellcastingSchema,monsterTypeSchema}from"../chunk-
|
|
1
|
+
import{MONSTER_KNOWN_KEYS,alignmentEntrySchema,damageQualifierSchema,gearEntrySchema,initiativeSchema,monsterACSchema,monsterCRSchema,monsterHPSchema,monsterSchema,monsterSpeedSchema,monsterSpellcastingSchema,monsterTypeSchema}from"../chunk-HX7WBOKR.js";import"../chunk-NIWLD33X.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-LHH5XSEA.js";import"../chunk-ZVL5FXXO.js";import"../chunk-I26FHSI6.js";export{MONSTER_KNOWN_KEYS,alignmentEntrySchema,damageQualifierSchema,gearEntrySchema,initiativeSchema,monsterACSchema,monsterCRSchema,monsterHPSchema,monsterSchema,monsterSpeedSchema,monsterSpellcastingSchema,monsterTypeSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{optionalFeatureCodec}from"../chunk-
|
|
1
|
+
import{optionalFeatureCodec}from"../chunk-GGQDQSIF.js";import"../chunk-SFK57JAA.js";import"../chunk-NYPH7RQN.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-LHH5XSEA.js";import"../chunk-ZVL5FXXO.js";import"../chunk-I26FHSI6.js";export{optionalFeatureCodec};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseOptionalFeature}from"../chunk-
|
|
1
|
+
import{parseOptionalFeature}from"../chunk-SFK57JAA.js";import"../chunk-NYPH7RQN.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-LHH5XSEA.js";import"../chunk-ZVL5FXXO.js";import"../chunk-I26FHSI6.js";export{parseOptionalFeature};
|
|
@@ -242,12 +242,29 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
|
|
|
242
242
|
climb: "climb";
|
|
243
243
|
burrow: "burrow";
|
|
244
244
|
}>;
|
|
245
|
-
value: z.ZodNumber
|
|
245
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
246
|
+
equal_to: z.ZodOptional<z.ZodLiteral<"walk">>;
|
|
246
247
|
set: z.ZodOptional<z.ZodBoolean>;
|
|
247
248
|
scales_at: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
248
249
|
level: z.ZodNumber;
|
|
249
250
|
value: z.ZodNumber;
|
|
250
251
|
}, z.core.$strip>>>;
|
|
252
|
+
inactive_while: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
253
|
+
"heavy-armor": "heavy-armor";
|
|
254
|
+
armor: "armor";
|
|
255
|
+
shield: "shield";
|
|
256
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
257
|
+
"heavy-armor": "heavy-armor";
|
|
258
|
+
armor: "armor";
|
|
259
|
+
shield: "shield";
|
|
260
|
+
}>>]>>;
|
|
261
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
262
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
263
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
264
|
+
kind: z.ZodLiteral<"speed-rule">;
|
|
265
|
+
flag: z.ZodEnum<{
|
|
266
|
+
"ignore-armor-strength": "ignore-armor-strength";
|
|
267
|
+
}>;
|
|
251
268
|
condition: z.ZodOptional<z.ZodString>;
|
|
252
269
|
subject: z.ZodOptional<z.ZodString>;
|
|
253
270
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -294,6 +311,7 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
|
|
|
294
311
|
unarmed: "unarmed";
|
|
295
312
|
finesse: "finesse";
|
|
296
313
|
thrown: "thrown";
|
|
314
|
+
heavy: "heavy";
|
|
297
315
|
"pact-weapon": "pact-weapon";
|
|
298
316
|
}>, z.ZodArray<z.ZodEnum<{
|
|
299
317
|
weapon: "weapon";
|
|
@@ -302,6 +320,7 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
|
|
|
302
320
|
unarmed: "unarmed";
|
|
303
321
|
finesse: "finesse";
|
|
304
322
|
thrown: "thrown";
|
|
323
|
+
heavy: "heavy";
|
|
305
324
|
"pact-weapon": "pact-weapon";
|
|
306
325
|
}>>]>>;
|
|
307
326
|
spell_scope: z.ZodOptional<z.ZodObject<{
|
|
@@ -319,11 +338,11 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
|
|
|
319
338
|
kind: z.ZodLiteral<"proficiency">;
|
|
320
339
|
proficiency_type: z.ZodEnum<{
|
|
321
340
|
weapon: "weapon";
|
|
341
|
+
armor: "armor";
|
|
322
342
|
skill: "skill";
|
|
323
343
|
tool: "tool";
|
|
324
344
|
language: "language";
|
|
325
345
|
"saving-throw": "saving-throw";
|
|
326
|
-
armor: "armor";
|
|
327
346
|
}>;
|
|
328
347
|
value: z.ZodString;
|
|
329
348
|
expertise: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -408,6 +427,7 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
|
|
|
408
427
|
unarmed: "unarmed";
|
|
409
428
|
finesse: "finesse";
|
|
410
429
|
thrown: "thrown";
|
|
430
|
+
heavy: "heavy";
|
|
411
431
|
"pact-weapon": "pact-weapon";
|
|
412
432
|
}>, z.ZodArray<z.ZodEnum<{
|
|
413
433
|
weapon: "weapon";
|
|
@@ -416,6 +436,7 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
|
|
|
416
436
|
unarmed: "unarmed";
|
|
417
437
|
finesse: "finesse";
|
|
418
438
|
thrown: "thrown";
|
|
439
|
+
heavy: "heavy";
|
|
419
440
|
"pact-weapon": "pact-weapon";
|
|
420
441
|
}>>]>>;
|
|
421
442
|
condition: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{infuseBlockSchema,optionRowSchema,optionalFeatureEntitySchema}from"../chunk-
|
|
1
|
+
import{infuseBlockSchema,optionRowSchema,optionalFeatureEntitySchema}from"../chunk-NYPH7RQN.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-LHH5XSEA.js";import"../chunk-ZVL5FXXO.js";import"../chunk-I26FHSI6.js";export{infuseBlockSchema,optionRowSchema,optionalFeatureEntitySchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildSpellNameIndex,chosenRaceOptionKeys,collectAdditionalSpells,normalizeSpellRef,prefixOf,raceIsUngated,resolveSpellByName}from"../chunk-
|
|
1
|
+
import{buildSpellNameIndex,chosenRaceOptionKeys,collectAdditionalSpells,normalizeSpellRef,prefixOf,raceIsUngated,resolveSpellByName}from"../chunk-CEHL7PPC.js";import"../chunk-UBUKCRZ3.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-I26FHSI6.js";export{buildSpellNameIndex,chosenRaceOptionKeys,collectAdditionalSpells,normalizeSpellRef,prefixOf,raceIsUngated,resolveSpellByName};
|
|
@@ -5,12 +5,12 @@ import type { DerivedStats, FeatureSource, ResolvedCharacter, ResolvedSpell, Spe
|
|
|
5
5
|
export type AmountDerived = Pick<DerivedStats, "proficiencyBonus" | "mods" | "spellcastingClasses"> & Partial<Pick<DerivedStats, "abilitySpellcasting">>;
|
|
6
6
|
export declare function ownerClassSlug(source: FeatureSource | undefined, resolved: Pick<ResolvedCharacter, "classes">): string | null;
|
|
7
7
|
export declare function amountBindingsFor(owner: FeatureSource | undefined, resolved: Pick<ResolvedCharacter, "classes" | "totalLevel">, derived: AmountDerived): AmountBindings;
|
|
8
|
-
export declare function spellcastingFor(spell: Pick<ResolvedSpell, "source" | "classSlug" | "ability">, derived: AmountDerived): {
|
|
9
|
-
ability: Ability;
|
|
8
|
+
export declare function spellcastingFor(spell: Pick<ResolvedSpell, "source" | "classSlug" | "ability" | "itemCasting">, derived: AmountDerived): {
|
|
9
|
+
ability: Ability | null;
|
|
10
10
|
saveDC: number;
|
|
11
11
|
attackBonus: number;
|
|
12
12
|
} | null;
|
|
13
|
-
export declare function spellAmountBindings(spell: Pick<ResolvedSpell, "source" | "classSlug" | "ability">, resolved: Pick<ResolvedCharacter, "classes" | "totalLevel">, derived: AmountDerived): AmountBindings;
|
|
13
|
+
export declare function spellAmountBindings(spell: Pick<ResolvedSpell, "source" | "classSlug" | "ability" | "itemCasting">, resolved: Pick<ResolvedCharacter, "classes" | "totalLevel">, derived: AmountDerived): AmountBindings;
|
|
14
14
|
export declare function spellRollBonus(spell: Pick<Spell, "damage_roll" | "description">): string | null;
|
|
15
15
|
export declare function addSpellDamageRiders(roll: string, spell: Pick<ResolvedSpell, "slug" | "entity">, derived: Partial<Pick<DerivedStats, "spellDamageRiders">>): string;
|
|
16
16
|
export declare function spellDamageRiderLines(spell: Pick<ResolvedSpell, "slug" | "entity">, derived: Partial<Pick<DerivedStats, "spellDamageRiders">>): Array<Pick<SpellDamageRider, "amount" | "damage_type" | "source" | "condition">>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{addSpellDamageRiders,amountBindingsFor,ownerClassSlug,spellAmountBindings,spellDamageRiderLines,spellRollBonus,spellcastingFor}from"../chunk-
|
|
1
|
+
import{addSpellDamageRiders,amountBindingsFor,ownerClassSlug,spellAmountBindings,spellDamageRiderLines,spellRollBonus,spellcastingFor}from"../chunk-CCAVZANF.js";import"../chunk-PZ3ZZ5H5.js";import"../chunk-KEXSF3CH.js";import"../chunk-PFQPP77Q.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-VIP3FH2O.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{addSpellDamageRiders,amountBindingsFor,ownerClassSlug,spellAmountBindings,spellDamageRiderLines,spellRollBonus,spellcastingFor};
|
|
@@ -63,6 +63,12 @@ export declare function collectChosenProficiencies(resolved: ResolvedCharacter):
|
|
|
63
63
|
weapons: string[];
|
|
64
64
|
saves: Ability[];
|
|
65
65
|
};
|
|
66
|
+
export interface RuleProficiencySources {
|
|
67
|
+
skills: Record<string, string[]>;
|
|
68
|
+
expertise: Record<string, string[]>;
|
|
69
|
+
saves: Partial<Record<Ability, string[]>>;
|
|
70
|
+
}
|
|
71
|
+
export declare function collectRuleProficiencySources(resolved: ResolvedCharacter): RuleProficiencySources;
|
|
66
72
|
export declare function computeEffectiveProficiencies(resolved: ResolvedCharacter): {
|
|
67
73
|
languages: ProficiencyEntry[];
|
|
68
74
|
tools: ProficiencyEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__categoryToEntitySelectForTest,__matchesFilterForTest,buildDecisionLedger,collectChosenAbilityPoints,collectChosenProficiencies,computeEffectiveProficiencies,computeSuppressedProficiencies}from"../chunk-
|
|
1
|
+
import{__categoryToEntitySelectForTest,__matchesFilterForTest,buildDecisionLedger,collectChosenAbilityPoints,collectChosenProficiencies,collectRuleProficiencySources,computeEffectiveProficiencies,computeSuppressedProficiencies}from"../chunk-J5GL6FLP.js";import"../chunk-2EOGK6R6.js";import"../chunk-RQZCGXUZ.js";import"../chunk-GD7WRCNH.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-J3RP5C7L.js";import"../chunk-WAUNLUFQ.js";import"../chunk-CEHL7PPC.js";import"../chunk-UBUKCRZ3.js";import"../chunk-KEXSF3CH.js";import"../chunk-PFQPP77Q.js";import"../chunk-QVWT67WA.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-3LWOVRLA.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import{wikilinkTailSlug}from"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-S5UCI27C.js";import"../chunk-ZVL5FXXO.js";import"../chunk-I26FHSI6.js";export{__categoryToEntitySelectForTest,__matchesFilterForTest,buildDecisionLedger,collectChosenAbilityPoints,collectChosenProficiencies,collectRuleProficiencySources,computeEffectiveProficiencies,computeSuppressedProficiencies,wikilinkTailSlug};
|
|
@@ -13,6 +13,25 @@ export declare function effectiveItemRecovery(entry: EquipmentEntry, registry: E
|
|
|
13
13
|
export declare function isConsumedOnUse(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): boolean;
|
|
14
14
|
export declare function isScrollEntity(entity: unknown): boolean;
|
|
15
15
|
export declare function isCastableScroll(entity: unknown): boolean;
|
|
16
|
+
export declare function settableSpellLevel(entity: unknown): number | null;
|
|
17
|
+
export declare function storesSpell(entity: unknown): boolean;
|
|
18
|
+
export declare function storedSpellNumbers(entity: unknown): {
|
|
19
|
+
saveDC?: number;
|
|
20
|
+
attackBonus?: number;
|
|
21
|
+
} | null;
|
|
22
|
+
export type ItemSpellUse = {
|
|
23
|
+
kind: "consume";
|
|
24
|
+
} | {
|
|
25
|
+
kind: "charges";
|
|
26
|
+
cost: number;
|
|
27
|
+
charges: {
|
|
28
|
+
current: number;
|
|
29
|
+
max: number;
|
|
30
|
+
};
|
|
31
|
+
} | {
|
|
32
|
+
kind: "at-will";
|
|
33
|
+
};
|
|
34
|
+
export declare function itemSpellUse(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): ItemSpellUse | null;
|
|
16
35
|
export declare function effectiveItemCharges(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): NonNullable<EquipmentEntryState["charges"]> | undefined;
|
|
17
36
|
export declare function effectiveItemArmorClass(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): {
|
|
18
37
|
value: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,scrollSpellCost}from"../chunk-
|
|
1
|
+
import{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,itemSpellUse,scrollSpellCost,settableSpellLevel,storedSpellNumbers,storesSpell}from"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,itemSpellUse,scrollSpellCost,settableSpellLevel,storedSpellNumbers,storesSpell};
|
package/dist/pc/pc.equipment.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes}from"../chunk-
|
|
1
|
+
import{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes}from"../chunk-E3MS4M3N.js";import"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import"../chunk-4E2GIWJE.js";import"../chunk-GD7WRCNH.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-J3RP5C7L.js";import"../chunk-WAUNLUFQ.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-NEMX7QGG.js";import"../chunk-56JK6VCL.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-ZVL5FXXO.js";export{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FeatureEffect, SenseType, WeaponScope } from "@archivist-gg/dnd5e/types/feature-effect";
|
|
1
|
+
import type { FeatureEffect, SenseType, SpeedGateWord, WeaponScope } from "@archivist-gg/dnd5e/types/feature-effect";
|
|
2
2
|
import type { Ability } from "@archivist-gg/dnd5e";
|
|
3
3
|
import type { ConditionalCrit, DamageRider, DefenseGrant, DefenseItemSource, FeatureSource, SpeedMode, ResolvedCharacter, ResolvedFeature, RollModifierEntry, SaveOutcomeEntry, SpellDamageRider } from "./pc.types.js";
|
|
4
4
|
export interface WeaponAbilityOverride {
|
|
@@ -6,6 +6,15 @@ export interface WeaponAbilityOverride {
|
|
|
6
6
|
weaponSlugs?: string[];
|
|
7
7
|
pactWeapon?: true;
|
|
8
8
|
}
|
|
9
|
+
export interface SpeedEffectTerm {
|
|
10
|
+
mode: SpeedMode;
|
|
11
|
+
label: string;
|
|
12
|
+
value: number;
|
|
13
|
+
set: boolean;
|
|
14
|
+
condition?: string;
|
|
15
|
+
equalsWalk?: true;
|
|
16
|
+
inactiveWhile?: SpeedGateWord[];
|
|
17
|
+
}
|
|
9
18
|
export interface FeatureEffectTotals {
|
|
10
19
|
initiative_bonus: number;
|
|
11
20
|
initiative_terms: {
|
|
@@ -45,13 +54,8 @@ export interface FeatureEffectTotals {
|
|
|
45
54
|
label: string;
|
|
46
55
|
value: number;
|
|
47
56
|
}[];
|
|
48
|
-
speed_terms:
|
|
49
|
-
|
|
50
|
-
label: string;
|
|
51
|
-
value: number;
|
|
52
|
-
set: boolean;
|
|
53
|
-
condition?: string;
|
|
54
|
-
}[];
|
|
57
|
+
speed_terms: SpeedEffectTerm[];
|
|
58
|
+
ignore_armor_strength: string[];
|
|
55
59
|
speed_walk_set: number;
|
|
56
60
|
attunement_set: number;
|
|
57
61
|
ability_bonus: Partial<Record<Ability, number>>;
|
|
@@ -96,6 +100,7 @@ export interface FeatureEffectsOpts {
|
|
|
96
100
|
activeBuffs?: Set<string>;
|
|
97
101
|
levelFor?: (source: FeatureSource) => number;
|
|
98
102
|
tableDiceFor?: (source: FeatureSource, column: string, level: number) => string | null;
|
|
103
|
+
tableCellFor?: (source: FeatureSource, column: string) => string | null;
|
|
99
104
|
}
|
|
100
105
|
export declare function foldsNow(rf: ResolvedFeature, activeBuffs: Set<string>): boolean;
|
|
101
106
|
export declare function assembleEffectFeatures(resolved: ResolvedCharacter): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assembleEffectFeatures,classifyProficiencyEffect,collectProficiencyEffectGrants,computeFeatureEffects,emptyFeatureEffectTotals,foldsNow,foldsOnSelf,mergeDefenseItems,pushDefenseGrant,selfEffectsOf}from"../chunk-
|
|
1
|
+
import{assembleEffectFeatures,classifyProficiencyEffect,collectProficiencyEffectGrants,computeFeatureEffects,emptyFeatureEffectTotals,foldsNow,foldsOnSelf,mergeDefenseItems,pushDefenseGrant,selfEffectsOf}from"../chunk-GD7WRCNH.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-WAUNLUFQ.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{assembleEffectFeatures,classifyProficiencyEffect,collectProficiencyEffectGrants,computeFeatureEffects,emptyFeatureEffectTotals,foldsNow,foldsOnSelf,mergeDefenseItems,pushDefenseGrant,selfEffectsOf};
|
package/dist/pc/pc.infusions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildInfusionContext,createEntry,eligibleTargets,endInfusion,entryCharges,infuseEntry,infusionsEndedByChoice,infusionsEndedByClassEdit,isItemBound,isMarkedEntry,markerKey,normalizedPickKey,optionCandidates,parsePickKey,poolActiveWords,poolCountLabel,reconcileChoiceEdit,reconcileClassEdit,resolveCopyOption,resolveEntryEntity,resolveOptionRows,scaledInfuseItem,splitOne,withEntryCharges}from"../chunk-
|
|
1
|
+
import{buildInfusionContext,createEntry,eligibleTargets,endInfusion,entryCharges,infuseEntry,infusionsEndedByChoice,infusionsEndedByClassEdit,isItemBound,isMarkedEntry,markerKey,normalizedPickKey,optionCandidates,parsePickKey,poolActiveWords,poolCountLabel,reconcileChoiceEdit,reconcileClassEdit,resolveCopyOption,resolveEntryEntity,resolveOptionRows,scaledInfuseItem,splitOne,withEntryCharges}from"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{buildInfusionContext,createEntry,eligibleTargets,endInfusion,entryCharges,infuseEntry,infusionsEndedByChoice,infusionsEndedByClassEdit,isItemBound,isMarkedEntry,markerKey,normalizedPickKey,optionCandidates,parsePickKey,poolActiveWords,poolCountLabel,reconcileChoiceEdit,reconcileClassEdit,resolveCopyOption,resolveEntryEntity,resolveOptionRows,scaledInfuseItem,splitOne,withEntryCharges};
|
|
@@ -6,6 +6,7 @@ import type { FeatureEffect } from "../types/feature-effect.js";
|
|
|
6
6
|
import { type EntryView, type InfusionContext } from "./pc.infusions.js";
|
|
7
7
|
import type { EquipmentEntry, ResolvedFeature } from "./pc.types.js";
|
|
8
8
|
export declare function itemBenefitsActive(entry: EquipmentEntry, entity: ItemEntity | ArmorEntity | WeaponEntity | null, registry: EntityRegistry | null, view?: EntryView | null): boolean;
|
|
9
|
+
export declare function itemSpellCastable(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): boolean;
|
|
9
10
|
export declare function itemLabel(entry: EquipmentEntry, entity: {
|
|
10
11
|
name?: unknown;
|
|
11
12
|
} | null): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ITEM_ROW_KINDS,buildItemFeatures,itemBenefitsActive,itemLabel,itemRowEffects,itemSpellCastable,readItemEffects}from"../chunk-J3RP5C7L.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-ZVL5FXXO.js";export{ITEM_ROW_KINDS,buildItemFeatures,itemBenefitsActive,itemLabel,itemRowEffects,itemSpellCastable,readItemEffects};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PACT_WEAPON_CHOICE_ID,classPactWeaponPick,featOfSite,featPickSites,isTargetChoice,memberChoices,memberSpellTargets,nestedPickKeysToPrune,pactWeaponPick,poolMemberSites,poolMemberSitesOf,raceFeatSites,spellsReached}from"../chunk-
|
|
1
|
+
import{PACT_WEAPON_CHOICE_ID,classPactWeaponPick,featOfSite,featPickSites,isTargetChoice,memberChoices,memberSpellTargets,nestedPickKeysToPrune,pactWeaponPick,poolMemberSites,poolMemberSitesOf,raceFeatSites,spellsReached}from"../chunk-WAUNLUFQ.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{PACT_WEAPON_CHOICE_ID,classPactWeaponPick,featOfSite,featPickSites,isTargetChoice,memberChoices,memberSpellTargets,nestedPickKeysToPrune,pactWeaponPick,poolMemberSites,poolMemberSitesOf,raceFeatSites,spellsReached};
|
package/dist/pc/pc.parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{characterSchema}from"../chunk-
|
|
1
|
+
import{characterSchema}from"../chunk-E7KFJLDR.js";import"../chunk-KM75CC6Q.js";import{keptSlugForLink}from"../chunk-PZ4L2EEG.js";import"../chunk-63YJPWTM.js";import*as yaml from"js-yaml";function parsePC(source){var _a;let raw;try{raw=yaml.load(source)}catch(e){const msg=e instanceof Error?e.message:String(e);return{success:false,error:`YAML parse error: ${msg}`}}if(!raw||typeof raw!=="object"){return{success:false,error:"Invalid YAML: expected an object"}}const result=characterSchema.safeParse(raw);if(!result.success){const issue=result.error.issues[0];const path=issue.path.length?issue.path.join("."):"(root)";return{success:false,error:`${path}: ${issue.message}`}}const data=result.data;const legacyState=data.state;const legacyCurrency=legacyState.currency;if(legacyCurrency&&!data.currency){data.currency=legacyCurrency}if(legacyCurrency){delete legacyState.currency}if(legacyState.attuned_items){delete legacyState.attuned_items}for(const entry of(_a=data.equipment)!=null?_a:[]){if(typeof entry.item!=="string")continue;const next=migrateRetiredItemLink(entry.item);if(next!==null)entry.item=next}return{success:true,data}}function migrateRetiredItemLink(item){var _a;const m=/^\[\[([^\]|]+)(\|[^\]]*)?\]\]$/.exec(item.trim());const kept=keptSlugForLink(m?m[1]:item);if(kept===void 0)return null;return m?`[[${kept}${(_a=m[2])!=null?_a:""}]]`:kept}export{parsePC};
|
package/dist/pc/pc.pools.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{heldPicks,levelPrereqMax,levelPrereqRefsMet,poolAnchorLevel,resolveAllPools,resolvePool,strandedPicks,withoutStrandedSites}from"../chunk-
|
|
1
|
+
import{heldPicks,levelPrereqMax,levelPrereqRefsMet,poolAnchorLevel,resolveAllPools,resolvePool,strandedPicks,withoutStrandedSites}from"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{heldPicks,levelPrereqMax,levelPrereqRefsMet,poolAnchorLevel,resolveAllPools,resolvePool,strandedPicks,withoutStrandedSites};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{qualifiedGrantCovers}from"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import{collectChosenProficiencies,collectProficiencyGrants,computeEffectiveProficiencies,computeSuppressedProficiencies}from"../chunk-
|
|
1
|
+
import{qualifiedGrantCovers}from"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import{collectChosenProficiencies,collectProficiencyGrants,computeEffectiveProficiencies,computeSuppressedProficiencies}from"../chunk-J5GL6FLP.js";import"../chunk-2EOGK6R6.js";import"../chunk-RQZCGXUZ.js";import"../chunk-GD7WRCNH.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import{normKey,proficiencyKey,proficiencyLabel,toProfSlug,weaponProfKey}from"../chunk-VTQ4RWEG.js";import"../chunk-J3RP5C7L.js";import"../chunk-WAUNLUFQ.js";import"../chunk-CEHL7PPC.js";import"../chunk-UBUKCRZ3.js";import"../chunk-KEXSF3CH.js";import"../chunk-PFQPP77Q.js";import"../chunk-QVWT67WA.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-3LWOVRLA.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-S5UCI27C.js";import"../chunk-ZVL5FXXO.js";import"../chunk-I26FHSI6.js";function collectProficiencySources(resolved){const g=collectProficiencyGrants(resolved);const chosen=collectChosenProficiencies(resolved);return{...g,chosenLanguages:chosen.languages,chosenTools:chosen.tools,chosenWeapons:chosen.weapons}}function aggregateProficiencies(resolved){const{armor,weapons}=composeArmorWeapons(resolved);const effective=computeEffectiveProficiencies(resolved);return{armor:armor.kept,weapons:weapons.kept,tools:effective.tools,languages:effective.languages}}function proficiencyOverview(resolved,kind){if(kind==="armor"||kind==="weapons"){const c=composeArmorWeapons(resolved)[kind];return{effective:c.kept,removed:c.suppressed}}return{effective:computeEffectiveProficiencies(resolved)[kind],removed:computeSuppressedProficiencies(resolved)[kind]}}function weaponCoveredBy(effective,weapon){const cat=typeof weapon.category==="string"?weapon.category:"";const base=cat.split("-")[0];return effective.find(e=>{const key=weaponProfKey(e.value);if((key==="simple"||key==="martial")&&key===base)return true;if(cat&&key===normKey(cat))return true;return qualifiedGrantCovers(e.value,weapon)})}function composeArmorWeapons(resolved){const src=collectProficiencySources(resolved);return{armor:applyKindOverrides(resolved,"armor",composeGrantEntries([src.classArmor,src.featArmor,src.effectArmor])),weapons:applyKindOverrides(resolved,"weapons",composeGrantEntries([src.classWeaponFixed,src.classWeaponCategories,src.featWeapons,src.effectWeapons],src.chosenWeapons))}}function applyKindOverrides(resolved,kind,entries){var _a,_b,_c,_d;const ov=(_b=(_a=resolved.definition)==null?void 0:_a.overrides)==null?void 0:_b[kind];const key=v=>proficiencyKey(kind,v);const all=[...entries];for(const v of(_c=ov==null?void 0:ov.add)!=null?_c:[]){if(!all.some(e=>key(e.value)===key(v)))all.push({value:v,label:prettyName(v),sources:[],origin:"manual"})}const removes=new Set(((_d=ov==null?void 0:ov.remove)!=null?_d:[]).map(key));const byLabel=(a,b)=>a.label<b.label?-1:a.label>b.label?1:0;return{kept:all.filter(e=>!removes.has(key(e.value))).sort(byLabel),suppressed:all.filter(e=>removes.has(key(e.value))).sort(byLabel)}}function composeGrantEntries(buckets,picks=[]){const byKey=new Map;for(const bucket of buckets){for(const g of bucket){const key=toProfSlug(g.value);const existing=byKey.get(key);if(!existing){byKey.set(key,{value:g.value,label:prettyName(g.value),sources:[g.source],origin:"grant"});continue}if(!existing.sources.includes(g.source))existing.sources.push(g.source)}}for(const v of picks){const k=toProfSlug(v);if(!byKey.has(k))byKey.set(k,{value:v,label:prettyName(v),sources:[],origin:"pick"})}return[...byKey.values()].sort((a,b)=>a.label<b.label?-1:a.label>b.label?1:0)}function prettyName(slug){return proficiencyLabel(slug)}export{aggregateProficiencies,collectProficiencySources,proficiencyOverview,weaponCoveredBy};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResolvedCharacter } from "./pc.types.js";
|
|
1
|
+
import type { ResolvedCharacter, FeatureSource } from "./pc.types.js";
|
|
2
2
|
export type ProficiencyOrigin = "grant" | "pick" | "manual" | "custom";
|
|
3
3
|
export interface ProficiencyEntry {
|
|
4
4
|
value: string;
|
|
@@ -29,4 +29,6 @@ export interface ProficiencyGrants {
|
|
|
29
29
|
effectTools: ProficiencyGrant[];
|
|
30
30
|
effectLanguages: ProficiencyGrant[];
|
|
31
31
|
}
|
|
32
|
+
export declare const UNKNOWN_GRANT_SOURCE = "Unknown";
|
|
33
|
+
export declare function grantSourceName(resolved: ResolvedCharacter, kind: FeatureSource["kind"], slug: string): string;
|
|
32
34
|
export declare function collectProficiencyGrants(resolved: ResolvedCharacter): ProficiencyGrants;
|
package/dist/pc/pc.recalc.d.ts
CHANGED
|
@@ -43,4 +43,5 @@ export declare function computeProficiencies(resolved: ResolvedCharacter): {
|
|
|
43
43
|
languages: string[];
|
|
44
44
|
saves: Ability[];
|
|
45
45
|
};
|
|
46
|
+
export declare const HAND_SET_HALF_SOURCE = "Set by you";
|
|
46
47
|
export declare function recalc(resolved: ResolvedCharacter, registry?: EntityRegistry): DerivedStats;
|