@archivist-gg/dnd5e 0.3.19 → 0.3.24
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/LICENSE +48 -21
- package/README.md +26 -48
- package/dist/armor/armor.codec.d.ts +0 -7
- package/dist/armor/armor.codec.js +1 -9
- package/dist/armor/armor.parser.js +1 -8
- package/dist/armor/armor.schema.js +1 -7
- package/dist/armor/armor.types.d.ts +0 -3
- package/dist/background/background.codec.d.ts +0 -6
- package/dist/background/background.codec.js +1 -12
- package/dist/background/background.parser.js +1 -11
- package/dist/background/background.schema.js +1 -12
- package/dist/background/background.types.d.ts +0 -5
- package/dist/chunk-2EOGK6R6.js +1 -0
- package/dist/chunk-2HRRH3WL.js +1 -0
- package/dist/chunk-2LCGKNVM.js +1 -0
- package/dist/chunk-2NUDWOFG.js +1 -0
- package/dist/chunk-334WLI7V.js +1 -0
- package/dist/chunk-3LWOVRLA.js +1 -0
- package/dist/chunk-3QQOATV3.js +1 -0
- package/dist/chunk-4E2GIWJE.js +1 -0
- package/dist/chunk-4GN3GYMP.js +1 -0
- package/dist/chunk-4IAMSRHD.js +1 -0
- package/dist/chunk-4JEF3CET.js +1 -0
- package/dist/chunk-4KVVAENP.js +1 -0
- package/dist/chunk-56JK6VCL.js +1 -0
- package/dist/chunk-5FEXHY4U.js +1 -0
- package/dist/chunk-63YJPWTM.js +1 -0
- package/dist/chunk-6ASJ3MVB.js +1 -0
- package/dist/chunk-6IC53O3Q.js +1 -0
- package/dist/chunk-6LCNV26D.js +1 -0
- package/dist/chunk-6W253VHH.js +1 -0
- package/dist/chunk-7AKJBRBD.js +1 -0
- package/dist/chunk-7EL3GWWJ.js +1 -0
- package/dist/chunk-7FPQJDFD.js +1 -0
- package/dist/chunk-7J5BNH2D.js +1 -0
- package/dist/chunk-7LPKI27J.js +1 -0
- package/dist/chunk-7UPYRKMF.js +1 -0
- package/dist/chunk-A7H6LX47.js +1 -0
- package/dist/chunk-AINRPPLH.js +1 -0
- package/dist/chunk-BC52J4LA.js +1 -0
- package/dist/chunk-BCXGB4HP.js +1 -0
- package/dist/chunk-BGX36NPE.js +1 -0
- package/dist/chunk-BPKG6RZ7.js +1 -0
- package/dist/chunk-BREHZNTL.js +1 -0
- package/dist/chunk-BZ6BGGZS.js +1 -0
- package/dist/chunk-CAPYNIGK.js +1 -0
- package/dist/chunk-CCFIINBA.js +1 -0
- package/dist/chunk-CMIEZQL4.js +1 -0
- package/dist/chunk-DVUXUIPV.js +1 -0
- package/dist/chunk-DY6FVAGA.js +1 -0
- package/dist/chunk-DZITM5AG.js +1 -0
- package/dist/chunk-DZKSXSJF.js +1 -0
- package/dist/chunk-EAARMPCW.js +1 -0
- package/dist/chunk-EVT7MGAC.js +1 -0
- package/dist/chunk-FOLHTMSC.js +1 -0
- package/dist/chunk-GCYUCIDN.js +1 -0
- package/dist/chunk-GIOV6JW7.js +1 -0
- package/dist/chunk-HCK6IUB3.js +1 -0
- package/dist/chunk-HR5MKCP2.js +1 -0
- package/dist/chunk-I26FHSI6.js +1 -0
- package/dist/chunk-I4O2FIDT.js +1 -0
- package/dist/chunk-IGVRLGLM.js +1 -0
- package/dist/chunk-IHPLT2ZT.js +1 -0
- package/dist/chunk-IOCJIWCV.js +1 -0
- package/dist/chunk-JXDX2DKF.js +1 -0
- package/dist/chunk-KBFSJ5WE.js +1 -0
- package/dist/chunk-KM75CC6Q.js +1 -0
- package/dist/chunk-KZDDFG4O.js +1 -0
- package/dist/chunk-LJNT3PJP.js +1 -0
- package/dist/chunk-LR6UMA5V.js +1 -0
- package/dist/chunk-M6RPOLKS.js +1 -0
- package/dist/chunk-MC6PLWRZ.js +1 -0
- package/dist/chunk-MGGKZGLG.js +1 -0
- package/dist/chunk-N3RYJ7RE.js +1 -0
- package/dist/chunk-NEMX7QGG.js +1 -0
- package/dist/chunk-NI364WV7.js +1 -0
- package/dist/chunk-O2QZ73GA.js +1 -0
- package/dist/chunk-O776WL7O.js +1 -0
- package/dist/chunk-OTFNINUY.js +1 -0
- package/dist/chunk-PQAVMK3T.js +1 -0
- package/dist/chunk-PZ3ZZ5H5.js +1 -0
- package/dist/chunk-PZ4L2EEG.js +1 -0
- package/dist/chunk-PZUPZBTN.js +1 -0
- package/dist/chunk-QBA757AU.js +1 -0
- package/dist/chunk-QFIGPOFW.js +1 -0
- package/dist/chunk-QMEKQTUT.js +1 -0
- package/dist/chunk-QVWT67WA.js +1 -0
- package/dist/chunk-RDXQAZBA.js +1 -0
- package/dist/chunk-RE5Z5RNK.js +1 -0
- package/dist/chunk-RL4VY2AL.js +1 -0
- package/dist/chunk-RQGTBHJW.js +1 -0
- package/dist/chunk-RQZCGXUZ.js +1 -0
- package/dist/chunk-S5UCI27C.js +1 -0
- package/dist/chunk-SEOASDO4.js +1 -0
- package/dist/chunk-SU4MEZ5P.js +1 -0
- package/dist/chunk-T55DELVL.js +1 -0
- package/dist/chunk-TKIEPC6F.js +1 -0
- package/dist/chunk-TLXFGGWH.js +1 -0
- package/dist/chunk-UBUKCRZ3.js +1 -0
- package/dist/chunk-V6NQ547U.js +1 -0
- package/dist/chunk-VA3ZWV7C.js +1 -0
- package/dist/chunk-VIP3FH2O.js +1 -0
- package/dist/chunk-VTQ4RWEG.js +1 -0
- package/dist/chunk-WUHTSLG4.js +1 -0
- package/dist/chunk-X22SISGM.js +1 -0
- package/dist/chunk-XKJXT2PN.js +1 -0
- package/dist/chunk-XQMKH4R4.js +1 -0
- package/dist/chunk-YGH7S5ZF.js +1 -0
- package/dist/chunk-ZE46ADXS.js +1 -0
- package/dist/chunk-ZI3FEUX3.js +1 -0
- package/dist/class/class.codec.d.ts +0 -7
- package/dist/class/class.codec.js +1 -18
- package/dist/class/class.parser.js +1 -17
- package/dist/class/class.schema.d.ts +2 -1
- package/dist/class/class.schema.js +1 -15
- package/dist/class/class.slug.d.ts +0 -11
- package/dist/class/class.slug.js +1 -8
- package/dist/class/class.standard-array.d.ts +0 -7
- package/dist/class/class.standard-array.js +1 -20
- package/dist/class/class.types.d.ts +0 -20
- package/dist/condition/condition.codec.d.ts +0 -6
- package/dist/condition/condition.parser.d.ts +0 -10
- package/dist/condition/condition.parser.js +1 -7
- package/dist/condition/condition.schema.d.ts +0 -16
- package/dist/condition/condition.types.d.ts +0 -3
- package/dist/data-srd/index.generated.js +1 -146
- package/dist/dnd/amount-text.d.ts +3 -30
- package/dist/dnd/amount-text.js +1 -15
- package/dist/dnd/constants.d.ts +0 -18
- package/dist/dnd/constants.js +1 -42
- package/dist/dnd/formula-tags.d.ts +0 -2
- package/dist/dnd/formula-tags.js +1 -119
- package/dist/dnd/math.d.ts +0 -26
- package/dist/dnd/math.js +1 -45
- package/dist/dnd/prose-tags.d.ts +1 -15
- package/dist/dnd/prose-tags.js +1 -18
- package/dist/dnd/resource-die.d.ts +0 -4
- package/dist/dnd/resource-die.js +1 -17
- package/dist/dnd/resource-formula.d.ts +0 -43
- package/dist/dnd/resource-formula.js +1 -14
- package/dist/dnd/resource-words.d.ts +0 -2
- package/dist/dnd/resource-words.js +1 -30
- package/dist/dnd/srd-tag-converter.d.ts +0 -21
- package/dist/dnd/srd-tag-converter.js +1 -12
- package/dist/dnd/tag-grammar.js +1 -12
- package/dist/dnd/warn-once.js +1 -8
- package/dist/encounter/encounter.ai-schema.js +1 -8
- package/dist/entities/base-item-resolver.d.ts +0 -26
- package/dist/entities/base-item-resolver.js +1 -11
- package/dist/entities/registry-revision.d.ts +0 -15
- package/dist/entities/registry-revision.js +1 -10
- package/dist/entities/slug.d.ts +1 -31
- package/dist/entities/slug.js +1 -12
- package/dist/entities/wikilink-display.d.ts +0 -2
- package/dist/entities/wikilink-display.js +1 -10
- package/dist/feat/feat.category-codes.d.ts +1 -26
- package/dist/feat/feat.category-codes.js +1 -14
- package/dist/feat/feat.codec.d.ts +0 -6
- package/dist/feat/feat.codec.js +1 -12
- package/dist/feat/feat.parser.js +1 -11
- package/dist/feat/feat.schema.d.ts +22 -1
- package/dist/feat/feat.schema.js +1 -10
- package/dist/feat/feat.types.d.ts +0 -6
- package/dist/index.js +45 -141495
- package/dist/inline-tag-parser.js +1 -6
- package/dist/item/item.actions-map.d.ts +4 -63
- package/dist/item/item.actions-map.js +1 -10
- package/dist/item/item.ai-schema.js +1 -6
- package/dist/item/item.attunement.d.ts +0 -14
- package/dist/item/item.attunement.js +1 -6
- package/dist/item/item.bonuses.js +1 -10
- package/dist/item/item.codec.js +1 -9
- package/dist/item/item.conditions.d.ts +0 -7
- package/dist/item/item.conditions.js +1 -11
- package/dist/item/item.conditions.types.d.ts +0 -2
- package/dist/item/item.cost.js +1 -29
- package/dist/item/item.enrichment.js +1 -9
- package/dist/item/item.icon.d.ts +0 -8
- package/dist/item/item.icon.js +1 -211
- package/dist/item/item.parser.js +1 -8
- package/dist/item/item.schema.d.ts +2 -0
- package/dist/item/item.schema.js +1 -11
- package/dist/item/item.types.d.ts +2 -28
- package/dist/monster/monster.ai-schema.js +1 -6
- package/dist/monster/monster.codec.d.ts +0 -10
- package/dist/monster/monster.enrichment.js +1 -19
- package/dist/monster/monster.format.d.ts +0 -69
- package/dist/monster/monster.format.js +1 -78
- package/dist/monster/monster.parser.d.ts +0 -4
- package/dist/monster/monster.parser.js +1 -15
- package/dist/monster/monster.resolve.d.ts +0 -4
- package/dist/monster/monster.schema.d.ts +0 -9
- package/dist/monster/monster.schema.js +1 -34
- package/dist/monster/monster.types.d.ts +0 -3
- package/dist/monster/monster.types.js +1 -1
- package/dist/optional-feature/optional-feature.codec.d.ts +0 -11
- package/dist/optional-feature/optional-feature.codec.js +1 -13
- package/dist/optional-feature/optional-feature.parser.js +1 -12
- package/dist/optional-feature/optional-feature.schema.d.ts +21 -1
- package/dist/optional-feature/optional-feature.schema.js +1 -15
- package/dist/pack.d.ts +0 -9
- package/dist/pc/conditions.constants.js +1 -6
- package/dist/pc/decision-recognizer.js +1 -8
- package/dist/pc/pc.additional-spells.d.ts +0 -24
- package/dist/pc/pc.additional-spells.js +1 -26
- package/dist/pc/pc.amount-bindings.d.ts +0 -25
- package/dist/pc/pc.amount-bindings.js +1 -28
- package/dist/pc/pc.asi-flatten.d.ts +0 -59
- package/dist/pc/pc.asi-flatten.js +1 -16
- package/dist/pc/pc.conditions.d.ts +1 -0
- package/dist/pc/pc.conditions.js +1 -6
- package/dist/pc/pc.containment.d.ts +0 -5
- package/dist/pc/pc.containment.js +1 -24
- package/dist/pc/pc.decision-engine.d.ts +0 -145
- package/dist/pc/pc.decision-engine.js +1 -55
- package/dist/pc/pc.defense-normalize.d.ts +0 -10
- package/dist/pc/pc.defense-normalize.js +1 -6
- package/dist/pc/pc.entry-overrides.d.ts +0 -58
- package/dist/pc/pc.entry-overrides.js +1 -41
- package/dist/pc/pc.equipment.d.ts +2 -22
- package/dist/pc/pc.equipment.js +1 -34
- package/dist/pc/pc.feature-effects.d.ts +22 -281
- package/dist/pc/pc.feature-effects.js +1 -39
- package/dist/pc/pc.formula-context.js +1 -11
- package/dist/pc/pc.infusions.d.ts +0 -65
- package/dist/pc/pc.infusions.js +1 -65
- package/dist/pc/pc.item-effects.d.ts +18 -0
- package/dist/pc/pc.member-choices.d.ts +3 -66
- package/dist/pc/pc.member-choices.js +1 -39
- package/dist/pc/pc.parser.js +1 -58
- package/dist/pc/pc.pools.d.ts +7 -10
- package/dist/pc/pc.pools.js +1 -27
- package/dist/pc/pc.proficiencies.d.ts +0 -40
- package/dist/pc/pc.proficiencies.js +1 -156
- package/dist/pc/pc.proficiency-grants.d.ts +0 -26
- package/dist/pc/pc.proficiency-normalize.d.ts +0 -35
- package/dist/pc/pc.proficiency-normalize.js +1 -18
- package/dist/pc/pc.proficiency-query.d.ts +0 -13
- package/dist/pc/pc.proficiency-query.js +1 -27
- package/dist/pc/pc.recalc.d.ts +7 -131
- package/dist/pc/pc.recalc.js +1 -1042
- package/dist/pc/pc.resolver.d.ts +0 -107
- package/dist/pc/pc.resolver.js +1 -60
- package/dist/pc/pc.resource-seed.d.ts +0 -8
- package/dist/pc/pc.resource-seed.js +1 -42
- package/dist/pc/pc.resources.d.ts +1 -59
- package/dist/pc/pc.resources.js +1 -23
- package/dist/pc/pc.rest.d.ts +1 -20
- package/dist/pc/pc.rest.js +1 -231
- package/dist/pc/pc.schema.d.ts +0 -2
- package/dist/pc/pc.schema.js +1 -9
- package/dist/pc/pc.slotting.d.ts +0 -29
- package/dist/pc/pc.slotting.js +1 -28
- package/dist/pc/pc.speeds.d.ts +19 -0
- package/dist/pc/pc.spell-scope.d.ts +0 -16
- package/dist/pc/pc.spellcasting.d.ts +0 -70
- package/dist/pc/pc.spellcasting.js +1 -28
- package/dist/pc/pc.table-column.d.ts +0 -22
- package/dist/pc/pc.table-column.js +1 -18
- package/dist/pc/pc.tool-picks.d.ts +0 -27
- package/dist/pc/pc.tool-picks.js +1 -18
- package/dist/pc/pc.types.d.ts +54 -374
- package/dist/pc/pc.weapon-grant.d.ts +0 -6
- package/dist/pc/pool-layout.d.ts +0 -39
- package/dist/pc/pool-layout.js +1 -18
- package/dist/pc/resource-equivalents.d.ts +2 -40
- package/dist/pc/roll-scope.js +1 -8
- package/dist/pc/roll-tag-labels.d.ts +0 -32
- package/dist/pc/roll-tag-labels.js +1 -17
- package/dist/pc/spell-source.d.ts +0 -11
- package/dist/pc/spell-source.js +1 -8
- package/dist/race/race.codec.d.ts +0 -6
- package/dist/race/race.codec.js +1 -15
- package/dist/race/race.parser.js +1 -14
- package/dist/race/race.schema.d.ts +0 -8
- package/dist/race/race.schema.js +1 -14
- package/dist/race/race.structural.d.ts +0 -6
- package/dist/race/race.structural.js +1 -6
- package/dist/race/race.types.d.ts +0 -8
- package/dist/schemas/attack-schema.d.ts +5 -0
- package/dist/schemas/caster-type-schema.d.ts +1 -6
- package/dist/schemas/caster-type-schema.js +1 -6
- package/dist/schemas/choice-schema.js +1 -7
- package/dist/schemas/duration-schema.d.ts +0 -2
- package/dist/schemas/duration-schema.js +1 -6
- package/dist/schemas/entity-extras-schema.d.ts +0 -30
- package/dist/schemas/entity-extras-schema.js +1 -10
- package/dist/schemas/equipment-grant-schema.d.ts +0 -2
- package/dist/schemas/equipment-grant-schema.js +1 -12
- package/dist/schemas/feature-alias.d.ts +0 -27
- package/dist/schemas/feature-effect-schema.d.ts +21 -1
- package/dist/schemas/feature-effect-schema.js +1 -6
- package/dist/schemas/feature-schema.d.ts +0 -6
- package/dist/schemas/feature-schema.js +1 -12
- package/dist/schemas/resource-schema.d.ts +1 -34
- package/dist/schemas/resource-schema.js +1 -12
- package/dist/schemas/selection-pool-schema.js +1 -10
- package/dist/spell/casting-time.d.ts +0 -15
- package/dist/spell/casting-time.js +1 -6
- package/dist/spell/spell.access.d.ts +0 -6
- package/dist/spell/spell.access.js +1 -45
- package/dist/spell/spell.ai-schema.js +1 -6
- package/dist/spell/spell.codec.js +1 -9
- package/dist/spell/spell.enrichment.js +1 -9
- package/dist/spell/spell.filter.d.ts +0 -5
- package/dist/spell/spell.filter.js +1 -75
- package/dist/spell/spell.parser.d.ts +0 -31
- package/dist/spell/spell.parser.js +1 -16
- package/dist/spell/spell.scaling.d.ts +0 -46
- package/dist/spell/spell.scaling.js +1 -79
- package/dist/spell/spell.schema.js +1 -7
- package/dist/spell/spell.types.d.ts +0 -7
- package/dist/srd/retired-items.d.ts +0 -4
- package/dist/srd/retired-items.js +1 -11
- package/dist/srd-store.d.ts +0 -33
- package/dist/subclass/subclass.codec.d.ts +0 -8
- package/dist/subclass/subclass.codec.js +1 -17
- package/dist/subclass/subclass.parser.js +1 -16
- package/dist/subclass/subclass.schema.d.ts +2 -1
- package/dist/subclass/subclass.schema.js +1 -14
- package/dist/subclass/subclass.types.d.ts +0 -3
- package/dist/types/attack.d.ts +2 -0
- package/dist/types/casting-option.d.ts +0 -4
- package/dist/types/choice.d.ts +1 -72
- package/dist/types/choice.js +1 -24
- package/dist/types/edition.d.ts +0 -3
- package/dist/types/equipment-grant.d.ts +1 -27
- package/dist/types/equipment-grant.js +1 -12
- package/dist/types/feature-effect.d.ts +4 -22
- package/dist/types/feature.d.ts +0 -22
- package/dist/types/optional-feature.types.d.ts +1 -31
- package/dist/types/resource.d.ts +1 -21
- package/dist/types/selection-pool.d.ts +0 -24
- package/dist/weapon/weapon-mastery.d.ts +0 -1
- package/dist/weapon/weapon.classify.d.ts +0 -11
- package/dist/weapon/weapon.classify.js +1 -7
- package/dist/weapon/weapon.codec.d.ts +0 -9
- package/dist/weapon/weapon.codec.js +1 -9
- package/dist/weapon/weapon.parser.js +1 -8
- package/dist/weapon/weapon.schema.js +1 -7
- package/dist/weapon/weapon.types.d.ts +0 -3
- package/package.json +3 -3
- package/src/data-srd/ATTRIBUTION.md +1 -1
- package/dist/chunk-2FRUSVZS.js +0 -489
- package/dist/chunk-2LULMQTF.js +0 -14
- package/dist/chunk-3LWMFYKS.js +0 -57
- package/dist/chunk-3SFGWFVQ.js +0 -19
- package/dist/chunk-3SIUAFDQ.js +0 -18
- package/dist/chunk-3TM34RSJ.js +0 -23
- package/dist/chunk-4J6DS3EJ.js +0 -30
- package/dist/chunk-4U55VNC7.js +0 -22
- package/dist/chunk-5GKJAUMX.js +0 -59
- package/dist/chunk-5JXFJ5AU.js +0 -26
- package/dist/chunk-64VNLMSG.js +0 -375
- package/dist/chunk-656QCX4U.js +0 -22
- package/dist/chunk-6GNXYAYP.js +0 -25
- package/dist/chunk-6PXTNCBP.js +0 -133
- package/dist/chunk-6X2NV665.js +0 -33
- package/dist/chunk-7Q2VPKCD.js +0 -181
- package/dist/chunk-7XJHI5H5.js +0 -709
- package/dist/chunk-A54HHCWW.js +0 -67
- package/dist/chunk-B2QHP6UF.js +0 -159
- package/dist/chunk-B3DP42OM.js +0 -55
- package/dist/chunk-BJGOSM76.js +0 -18
- package/dist/chunk-BJWSOQUC.js +0 -133
- package/dist/chunk-CJYCVNW2.js +0 -7
- package/dist/chunk-CM5CWO4K.js +0 -735
- package/dist/chunk-DEEHHLAP.js +0 -271
- package/dist/chunk-DPUJDOKV.js +0 -365
- package/dist/chunk-EJD47JHL.js +0 -1838
- package/dist/chunk-EJP263OP.js +0 -186
- package/dist/chunk-EVMUJYUD.js +0 -195
- package/dist/chunk-EYX4JMAU.js +0 -101
- package/dist/chunk-FC4IGH5Y.js +0 -18
- package/dist/chunk-FJYBLXV7.js +0 -89
- package/dist/chunk-FMUD3LDV.js +0 -19
- package/dist/chunk-FMYWORTP.js +0 -93
- package/dist/chunk-FVXLP7P3.js +0 -18
- package/dist/chunk-G6MHJDVT.js +0 -41
- package/dist/chunk-GVWEFECG.js +0 -18
- package/dist/chunk-HHBD4SQ6.js +0 -24
- package/dist/chunk-HS6FIOLP.js +0 -52
- package/dist/chunk-HY2SRSVM.js +0 -23
- package/dist/chunk-IHE6KVC3.js +0 -13
- package/dist/chunk-IN4M4X7P.js +0 -34
- package/dist/chunk-IUAAXXNO.js +0 -58
- package/dist/chunk-JXWNXIIZ.js +0 -219
- package/dist/chunk-K5NJBTE2.js +0 -18
- package/dist/chunk-KR6JF3BF.js +0 -14
- package/dist/chunk-KSTV7J2U.js +0 -112
- package/dist/chunk-KU3YLF6D.js +0 -106
- package/dist/chunk-LBEXLN6I.js +0 -91
- package/dist/chunk-LHZXYFBU.js +0 -94
- package/dist/chunk-LICYHPI3.js +0 -237
- package/dist/chunk-LNT64X7C.js +0 -81
- package/dist/chunk-LSLSG67V.js +0 -31
- package/dist/chunk-LVQLWRCU.js +0 -15
- package/dist/chunk-MYY2C5MB.js +0 -233
- package/dist/chunk-NKZMQV2C.js +0 -19
- package/dist/chunk-NTU2DXNG.js +0 -355
- package/dist/chunk-NXUY5XQN.js +0 -1062
- package/dist/chunk-NZO7M5GV.js +0 -18
- package/dist/chunk-OOL4KMG2.js +0 -71
- package/dist/chunk-OOSRUJBI.js +0 -19
- package/dist/chunk-PDJSUH24.js +0 -110
- package/dist/chunk-PTXBIDG7.js +0 -63
- package/dist/chunk-PVCEA4HZ.js +0 -6
- package/dist/chunk-QA3YCOML.js +0 -101
- package/dist/chunk-QFWQKS3M.js +0 -110
- package/dist/chunk-QS5L5YTJ.js +0 -24
- package/dist/chunk-QYZV2MQA.js +0 -97
- package/dist/chunk-RD2MID3M.js +0 -292
- package/dist/chunk-S3YUXDSC.js +0 -278
- package/dist/chunk-S7REMWW4.js +0 -21
- package/dist/chunk-TOM66P2P.js +0 -38
- package/dist/chunk-TRBGC4ZG.js +0 -112
- package/dist/chunk-UA5KS2PL.js +0 -26
- package/dist/chunk-UJCK5IW4.js +0 -187
- package/dist/chunk-UNYR5GLI.js +0 -23
- package/dist/chunk-UZXG6QSY.js +0 -58
- package/dist/chunk-VN5DLURA.js +0 -158
- package/dist/chunk-VP5TIXDK.js +0 -178
- package/dist/chunk-VPYBK2MG.js +0 -18
- package/dist/chunk-VTTA2ALZ.js +0 -16
- package/dist/chunk-W6GC6OKK.js +0 -16
- package/dist/chunk-WELIKLZF.js +0 -256
- package/dist/chunk-WOHX7YTH.js +0 -165
- package/dist/chunk-WSVMLNTO.js +0 -31
- package/dist/chunk-WYGD2UGN.js +0 -14
- package/dist/chunk-XCFC7LGF.js +0 -122
- package/dist/chunk-XJ2F2WO6.js +0 -8
- package/dist/chunk-XTEFPUSN.js +0 -23
- package/dist/chunk-YBLDE5CG.js +0 -42
- package/dist/chunk-YDGMBMYI.js +0 -25
- package/dist/chunk-YHYTW5QA.js +0 -20
- package/dist/chunk-ZCTUYGNV.js +0 -26
- package/dist/chunk-ZDAEGJH4.js +0 -102
- package/dist/chunk-ZJXSXVFP.js +0 -58
- package/dist/chunk-ZOWKWMD2.js +0 -18
- package/dist/chunk-ZUQW5VBZ.js +0 -89
|
@@ -5,7 +5,6 @@ import type { ArmorEntity } from "../armor/armor.types.js";
|
|
|
5
5
|
import type { WeaponEntity } from "../weapon/weapon.types.js";
|
|
6
6
|
import type { ItemEntity } from "../item/item.types.js";
|
|
7
7
|
import type { Character, EquipmentEntry, ResolvedCharacter } from "./pc.types.js";
|
|
8
|
-
/** The known-counter word (spec §4.5): the pool's `count.label`, else "Known". Applied at read, never a zod default. */
|
|
9
8
|
export declare function poolCountLabel(pool: {
|
|
10
9
|
countLabel?: string;
|
|
11
10
|
}): string;
|
|
@@ -17,30 +16,22 @@ export interface PoolActiveWords {
|
|
|
17
16
|
createLabel: string;
|
|
18
17
|
createVerb: string;
|
|
19
18
|
}
|
|
20
|
-
/** The at-once counter's words (spec §4.5), defaults applied at read; null when the pool declares no `active`. */
|
|
21
19
|
export declare function poolActiveWords(pool: {
|
|
22
20
|
active?: PoolActive;
|
|
23
21
|
}): PoolActiveWords | null;
|
|
24
|
-
/** A stored pick split on its FIRST '#' (spec §4.4): `<note slug>#<param>` is a copy of a repeatable note. */
|
|
25
22
|
export declare function parsePickKey(stored: string): {
|
|
26
23
|
slugPart: string;
|
|
27
24
|
param: string | null;
|
|
28
25
|
};
|
|
29
|
-
/** The comparison key (spec §4.4): `bare(note)#param` for a copy of a repeatable note, `bare(note)` for any other pick. */
|
|
30
26
|
export declare function normalizedPickKey(stored: string, repeatable: boolean): string;
|
|
31
|
-
/** A marker's `by`, normalized the same way: a copy when it holds '#'. */
|
|
32
27
|
export declare function markerKey(by: string): string;
|
|
33
|
-
/** Derived, never authored (spec §4.1): a member that infuses an object, or a repeatable member whose rows create items. */
|
|
34
28
|
export declare function isItemBound(note: Pick<OptionalFeatureEntity, "infuse" | "repeatable" | "options">): boolean;
|
|
35
29
|
export type OptionStatus = "ok" | "needs-choice" | "not-installed" | "level" | "invalid";
|
|
36
|
-
/** A copy's resolved option (spec §4.6): its row, the resolved item's FULL slug (a `learn` copy, or a `create` copy's
|
|
37
|
-
* `item` row), and its status. */
|
|
38
30
|
export interface CopyOption {
|
|
39
31
|
row: OptionRow | null;
|
|
40
32
|
item?: string;
|
|
41
33
|
status: OptionStatus;
|
|
42
34
|
}
|
|
43
|
-
/** The registry subset option resolution reads (structurally `PoolRegistry` and `DecisionRegistry`). */
|
|
44
35
|
export interface ItemLookup {
|
|
45
36
|
search(q: string, t: string, n: number): RegisteredEntity[];
|
|
46
37
|
getByTypeAndSlug(t: string, s: string): RegisteredEntity | undefined;
|
|
@@ -50,9 +41,6 @@ export interface CandidateOptions {
|
|
|
50
41
|
isEntityVisible?: (e: RegisteredEntity) => boolean;
|
|
51
42
|
exclude?: readonly string[];
|
|
52
43
|
}
|
|
53
|
-
/** One option row as the pickers read it (R20): `candidates` are VISIBLE full slugs in the §5.8 order (U-A). PT (spec §4,
|
|
54
|
-
* §6.5): `type` and `rarity` (lower-case) name the row's item, read from its first candidate (else its first installed
|
|
55
|
-
* item, visible or not), a `filter` row from its filter; `charges` are that item's own; null when nothing says. */
|
|
56
44
|
export interface ResolvedOptionRow {
|
|
57
45
|
key: string;
|
|
58
46
|
name: string;
|
|
@@ -68,31 +56,21 @@ export interface ResolvedOptionRow {
|
|
|
68
56
|
recharge?: string;
|
|
69
57
|
} | null;
|
|
70
58
|
}
|
|
71
|
-
/** The per-copy picker's data for one repeatable member of a pool (spec §5.1, R20). */
|
|
72
59
|
export interface RepeatableMember {
|
|
73
60
|
noteSlug: string;
|
|
74
61
|
itemChoice: "learn" | "create";
|
|
75
62
|
rows: ResolvedOptionRow[];
|
|
76
63
|
}
|
|
77
|
-
/** The picker list for a row (spec §5.8, U-A): VISIBLE notes only, the character's edition first, the SRD books before
|
|
78
|
-
* importer books, then the full slug; one per bare slug; rows already replicated (by name or bare slug) left out. */
|
|
79
64
|
export declare function optionCandidates(row: OptionRow, registry: ItemLookup, opts?: CandidateOptions): string[];
|
|
80
|
-
/** Every row of a repeatable note as the pickers read it (R20): its candidates, and whether its items are installed,
|
|
81
|
-
* installed only in hidden books (absent from every list, U-A), or not installed at all. */
|
|
82
65
|
export declare function resolveOptionRows(note: Pick<OptionalFeatureEntity, "options">, registry: ItemLookup, opts?: CandidateOptions): ResolvedOptionRow[];
|
|
83
|
-
/** A copy's option (spec §5.8): validation by row identity, BLIND to visibility (Gate 1 C3, U-A). A `learn` param passes
|
|
84
|
-
* through the retired-item map first; the stored key is never rewritten (Gate 1 m5). `edition` orders the installed
|
|
85
|
-
* notes a `create` copy's `item` row falls back to when the row's own slug is not installed. */
|
|
86
66
|
export declare function resolveCopyOption(note: OptionalFeatureEntity, param: string | null, ctx: {
|
|
87
67
|
classLevel: number;
|
|
88
68
|
registry: ItemLookup;
|
|
89
69
|
edition?: string;
|
|
90
70
|
}): CopyOption;
|
|
91
|
-
/** One marked equipment entry's view (spec §4.6). The DISPLAY identity is not stored: it is the entry's own resolution. */
|
|
92
71
|
export interface EntryView {
|
|
93
72
|
index: number;
|
|
94
73
|
kind: "infused" | "created";
|
|
95
|
-
/** The RULE entity (spec §5.4): the wrapper (infused) or the real item (created); null for an orphan or duplicate created entry. */
|
|
96
74
|
entity: ArmorEntity | WeaponEntity | ItemEntity | null;
|
|
97
75
|
entityType: string | null;
|
|
98
76
|
key: string;
|
|
@@ -101,7 +79,6 @@ export interface EntryView {
|
|
|
101
79
|
classIndex: number;
|
|
102
80
|
noteSlug: string;
|
|
103
81
|
noteName: string;
|
|
104
|
-
/** The infusing or creating member's name (ART-c's sub-line part reads it). */
|
|
105
82
|
sourceLabel: string;
|
|
106
83
|
}
|
|
107
84
|
export interface InfusionCounter {
|
|
@@ -119,44 +96,25 @@ export interface InfusionContext {
|
|
|
119
96
|
reason: InfusionFlagReason;
|
|
120
97
|
}>;
|
|
121
98
|
}
|
|
122
|
-
/** The overlay at the OWNING class level (spec §5.3 "Scaling"): `scales_at` rows at or below it replace keys, in level order. */
|
|
123
99
|
export declare function scaledInfuseItem(infuse: InfuseBlock, classLevel: number): InfuseItem;
|
|
124
|
-
/** The RULE entity of an equipment entry (spec §5.4): its view when it has one (null for an orphan or duplicate created
|
|
125
|
-
* entry), else the entry's own resolution. The ONE resolver every dnd5e fold reads (grep gate). `infusions` is the
|
|
126
|
-
* character's context, or ONE view (an entry-level helper's caller holds just that entry's view), or nothing. */
|
|
127
100
|
export declare function resolveEntryEntity(entry: EquipmentEntry, index: number, registry: EntityRegistry, infusions?: Pick<InfusionContext, "views"> | EntryView | null): {
|
|
128
101
|
entity: ArmorEntity | WeaponEntity | ItemEntity | null;
|
|
129
102
|
entityType: string | null;
|
|
130
103
|
};
|
|
131
|
-
/** Views, counters and flags (spec §5.4). Undefined, at no cost, for a character with no item-bound pool and no marker. */
|
|
132
104
|
export declare function buildInfusionContext(character: Character, resolved: ResolvedCharacter, registry: EntityRegistry): InfusionContext | undefined;
|
|
133
|
-
/** The charge pair's reader (spec §5.5): an infused view's overlay charges live in the MARKER (`infusion.charges.current`,
|
|
134
|
-
* absent = full); anything else is `effectiveItemCharges` (stored, the note's own data, the curated map). */
|
|
135
105
|
export declare function entryCharges(entry: EquipmentEntry, view: EntryView | null | undefined, registry: EntityRegistry | null): {
|
|
136
106
|
current: number;
|
|
137
107
|
max: number;
|
|
138
108
|
} | undefined;
|
|
139
|
-
/** The charge pair's writer (spec §5.5): an infused view whose overlay has charges writes `infusion.charges.current`,
|
|
140
|
-
* clamped to 0..max, and never `state`; any other entry writes `state.charges` as today (`setItemCharges`): the stored
|
|
141
|
-
* max kept, else seeded from the item's own max ({@link effectiveItemCharges}: the note's data, then the curated map),
|
|
142
|
-
* else the new value; `current` clamped to 0..max. Returns a NEW entry. */
|
|
143
109
|
export declare function withEntryCharges(entry: EquipmentEntry, view: EntryView | null | undefined, current: number, registry: EntityRegistry | null): EquipmentEntry;
|
|
144
|
-
/** The reseed predicate (spec §5.7, Gate 0 M2, Gate 1 I10): the Builder's starting-equipment reseed,
|
|
145
|
-
* `setBuilderEquipmentMode` and `finishBuild` never replace, remove or duplicate an entry carrying `infusion`. */
|
|
146
110
|
export declare function isMarkedEntry(entry: EquipmentEntry): boolean;
|
|
147
|
-
/** One object off a stack (spec §5.7, Gate 1 m3): the source keeps qty - 1 and its hand; the new x1 keeps only
|
|
148
|
-
* `item`, `in` and `overrides`, unequipped, so a split never moves a hand slot. */
|
|
149
111
|
export declare function splitOne(equipment: readonly EquipmentEntry[], index: number): EquipmentEntry[];
|
|
150
|
-
/** One ended marker (spec §5.7, R18): `index` is the entry's position in the RETURNED array for an infused end (the
|
|
151
|
-
* entry stays) and -1 for a created one (it is removed); `item` (the entry's link or text) names it for a
|
|
152
|
-
* confirmation. The read-only twins `infusionsEndedByChoice` and `infusionsEndedByClassEdit` give the CURRENT index. */
|
|
153
112
|
export interface EndedEntry {
|
|
154
113
|
index: number;
|
|
155
114
|
key: string;
|
|
156
115
|
kind: "infused" | "created";
|
|
157
116
|
item: string;
|
|
158
117
|
}
|
|
159
|
-
/** A writer's result (spec §5.7): a NEW equipment array and the markers the write ended. */
|
|
160
118
|
export interface EquipmentWrite {
|
|
161
119
|
equipment: EquipmentEntry[];
|
|
162
120
|
ended: EndedEntry[];
|
|
@@ -168,17 +126,7 @@ export type InfusionWrite = ({
|
|
|
168
126
|
ok: false;
|
|
169
127
|
reason: InfuseRefusal;
|
|
170
128
|
};
|
|
171
|
-
/** Ends one marker (spec §5.7, Gate 0 I3). Infused: the marker goes, `attuned` too when the base needs none (the entry's
|
|
172
|
-
* own resolution: arms b, b′ and c never need it, an arm d magic base may). Created: its children move to its own
|
|
173
|
-
* parent (or lose `in` at the top level), then it is removed. Every end path calls this; a marker's charges live in
|
|
174
|
-
* the marker (spec §5.5), so they go with it. */
|
|
175
129
|
export declare function endInfusion(equipment: readonly EquipmentEntry[], index: number, registry: EntityRegistry): EquipmentWrite;
|
|
176
|
-
/** Infuse one object (spec §5.7): refusals in the order `not-owned`, `not-infusing`, `stranded`, `choice-required` /
|
|
177
|
-
* `bad-choice` (a damage type, dnd5e's own list, and one of the note's `choice.options` when it lists them),
|
|
178
|
-
* `no-target`, `marked`, `magic-base` / `target-kind`; a stacked target is split first (`splitOne`) and the new x1 takes
|
|
179
|
-
* the marker; "A new object" is offered for EVERY infusing member (R23); then the same key's other marker and the pool's
|
|
180
|
-
* oldest over the cap end. `seq` is max + 1 over the INPUT equipment (an ended seq is never reused); charges start at the
|
|
181
|
-
* scaled overlay's max. */
|
|
182
130
|
export declare function infuseEntry(character: Character, resolved: ResolvedCharacter, registry: EntityRegistry, req: {
|
|
183
131
|
key: string;
|
|
184
132
|
target: number | {
|
|
@@ -187,11 +135,6 @@ export declare function infuseEntry(character: Character, resolved: ResolvedChar
|
|
|
187
135
|
choice?: string;
|
|
188
136
|
isEntityVisible?: (e: RegisteredEntity) => boolean;
|
|
189
137
|
}): InfusionWrite;
|
|
190
|
-
/** Create one item from a creating copy (spec §5.7): `not-owned`; `not-creating` (not a repeatable member whose rows
|
|
191
|
-
* create items); `stranded` (the note, or its copy's option at `level`); `invalid-item` (any other status, or an item
|
|
192
|
-
* that is not installed or satisfies neither the copy's row nor equals its `option.item`: validation by row identity,
|
|
193
|
-
* §5.8). The same key's created entry and the pool's oldest over the cap end; the new entry is appended unequipped,
|
|
194
|
-
* x1, `kind: created`, with `seq` over the INPUT equipment. */
|
|
195
138
|
export declare function createEntry(character: Character, resolved: ResolvedCharacter, registry: EntityRegistry, req: {
|
|
196
139
|
key: string;
|
|
197
140
|
item: string;
|
|
@@ -202,10 +145,7 @@ type ChoiceEdit = {
|
|
|
202
145
|
choiceKey: string;
|
|
203
146
|
next: readonly string[];
|
|
204
147
|
};
|
|
205
|
-
/** Read-only (U-9): the markers `reconcileChoiceEdit` would end, with their CURRENT indices, for the confirmation. */
|
|
206
148
|
export declare function infusionsEndedByChoice(character: Character, resolved: ResolvedCharacter, _registry: EntityRegistry, req: ChoiceEdit): EndedEntry[];
|
|
207
|
-
/** Un-picking an infusion or a copy ends its markers in the same write (spec §5.7, Gate 0 I4): created items leave by the
|
|
208
|
-
* approved end path. Null when nothing ends. */
|
|
209
149
|
export declare function reconcileChoiceEdit(character: Character, resolved: ResolvedCharacter, registry: EntityRegistry, req: ChoiceEdit): EquipmentWrite | null;
|
|
210
150
|
type ClassEdit = {
|
|
211
151
|
classIndex: number;
|
|
@@ -214,13 +154,8 @@ type ClassEdit = {
|
|
|
214
154
|
classIndex: number;
|
|
215
155
|
subclass: string | null;
|
|
216
156
|
};
|
|
217
|
-
/** Read-only (B-8.2): the markers `reconcileClassEdit` would end, with their CURRENT indices, for the confirmation. */
|
|
218
157
|
export declare function infusionsEndedByClassEdit(character: Character, resolved: ResolvedCharacter, _registry: EntityRegistry, req: ClassEdit): EndedEntry[];
|
|
219
|
-
/** Removing a class or changing its subclass ends the markers it owns in the same write ("when the infusion's source is
|
|
220
|
-
* gone, the item ends like an ended infusion"). Null when nothing ends. */
|
|
221
158
|
export declare function reconcileClassEdit(character: Character, resolved: ResolvedCharacter, registry: EntityRegistry, req: ClassEdit): EquipmentWrite | null;
|
|
222
|
-
/** The Infuse picker's list (spec §5.7): the unmarked entries an owned infusing pick's targets admit, nonmagical, each
|
|
223
|
-
* with `stack` when infusing it splits one object off. */
|
|
224
159
|
export declare function eligibleTargets(character: Character, resolved: ResolvedCharacter, registry: EntityRegistry, key: string): Array<{
|
|
225
160
|
index: number;
|
|
226
161
|
stack: boolean;
|
package/dist/pc/pc.infusions.js
CHANGED
|
@@ -1,65 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
buildInfusionContext,
|
|
3
|
-
createEntry,
|
|
4
|
-
eligibleTargets,
|
|
5
|
-
endInfusion,
|
|
6
|
-
entryCharges,
|
|
7
|
-
infuseEntry,
|
|
8
|
-
infusionsEndedByChoice,
|
|
9
|
-
infusionsEndedByClassEdit,
|
|
10
|
-
isItemBound,
|
|
11
|
-
isMarkedEntry,
|
|
12
|
-
markerKey,
|
|
13
|
-
normalizedPickKey,
|
|
14
|
-
optionCandidates,
|
|
15
|
-
parsePickKey,
|
|
16
|
-
poolActiveWords,
|
|
17
|
-
poolCountLabel,
|
|
18
|
-
reconcileChoiceEdit,
|
|
19
|
-
reconcileClassEdit,
|
|
20
|
-
resolveCopyOption,
|
|
21
|
-
resolveEntryEntity,
|
|
22
|
-
resolveOptionRows,
|
|
23
|
-
scaledInfuseItem,
|
|
24
|
-
splitOne,
|
|
25
|
-
withEntryCharges
|
|
26
|
-
} from "../chunk-NXUY5XQN.js";
|
|
27
|
-
import "../chunk-W6GC6OKK.js";
|
|
28
|
-
import "../chunk-B3DP42OM.js";
|
|
29
|
-
import "../chunk-IUAAXXNO.js";
|
|
30
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
31
|
-
import "../chunk-IHE6KVC3.js";
|
|
32
|
-
import "../chunk-LHZXYFBU.js";
|
|
33
|
-
import "../chunk-LVQLWRCU.js";
|
|
34
|
-
import "../chunk-CM5CWO4K.js";
|
|
35
|
-
import "../chunk-4J6DS3EJ.js";
|
|
36
|
-
import "../chunk-ZCTUYGNV.js";
|
|
37
|
-
import "../chunk-3TM34RSJ.js";
|
|
38
|
-
import "../chunk-PDJSUH24.js";
|
|
39
|
-
import "../chunk-WELIKLZF.js";
|
|
40
|
-
export {
|
|
41
|
-
buildInfusionContext,
|
|
42
|
-
createEntry,
|
|
43
|
-
eligibleTargets,
|
|
44
|
-
endInfusion,
|
|
45
|
-
entryCharges,
|
|
46
|
-
infuseEntry,
|
|
47
|
-
infusionsEndedByChoice,
|
|
48
|
-
infusionsEndedByClassEdit,
|
|
49
|
-
isItemBound,
|
|
50
|
-
isMarkedEntry,
|
|
51
|
-
markerKey,
|
|
52
|
-
normalizedPickKey,
|
|
53
|
-
optionCandidates,
|
|
54
|
-
parsePickKey,
|
|
55
|
-
poolActiveWords,
|
|
56
|
-
poolCountLabel,
|
|
57
|
-
reconcileChoiceEdit,
|
|
58
|
-
reconcileClassEdit,
|
|
59
|
-
resolveCopyOption,
|
|
60
|
-
resolveEntryEntity,
|
|
61
|
-
resolveOptionRows,
|
|
62
|
-
scaledInfuseItem,
|
|
63
|
-
splitOne,
|
|
64
|
-
withEntryCharges
|
|
65
|
-
};
|
|
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-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.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};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EntityRegistry } from "@archivist-gg/core";
|
|
2
|
+
import type { ItemEntity } from "@archivist-gg/dnd5e/item/item.types";
|
|
3
|
+
import type { ArmorEntity } from "@archivist-gg/dnd5e/armor/armor.types";
|
|
4
|
+
import type { WeaponEntity } from "@archivist-gg/dnd5e/weapon/weapon.types";
|
|
5
|
+
import type { FeatureEffect } from "../types/feature-effect.js";
|
|
6
|
+
import { type EntryView, type InfusionContext } from "./pc.infusions.js";
|
|
7
|
+
import type { EquipmentEntry, ResolvedFeature } from "./pc.types.js";
|
|
8
|
+
export declare function itemBenefitsActive(entry: EquipmentEntry, entity: ItemEntity | ArmorEntity | WeaponEntity | null, registry: EntityRegistry | null, view?: EntryView | null): boolean;
|
|
9
|
+
export declare function itemLabel(entry: EquipmentEntry, entity: {
|
|
10
|
+
name?: unknown;
|
|
11
|
+
} | null): string;
|
|
12
|
+
export declare const ITEM_ROW_KINDS: ReadonlySet<FeatureEffect["kind"]>;
|
|
13
|
+
export declare function readItemEffects(entity: unknown): {
|
|
14
|
+
effects: FeatureEffect[];
|
|
15
|
+
invalid: string[];
|
|
16
|
+
};
|
|
17
|
+
export declare function itemRowEffects(entity: unknown): FeatureEffect[];
|
|
18
|
+
export declare function buildItemFeatures(equipment: readonly EquipmentEntry[], registry: EntityRegistry, infusions: InfusionContext | undefined, warnings: string[]): ResolvedFeature[];
|
|
@@ -1,63 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* D2b-A · nested choices on pool members (design §2.2, user rulings 2026-09-27: GENERAL and RECURSIVE).
|
|
3
|
-
*
|
|
4
|
-
* A pool member (an invocation, a maneuver, a fighting-style option, ...) may carry its own choices: Lessons of the First
|
|
5
|
-
* Ones' Origin feat, Superior Technique's maneuver, Blessed and Druidic Warrior's cantrips, Pact of the Tome's cantrips
|
|
6
|
-
* and rituals, the three blasts' cantrip. A nested pick lives in the pool's ANCHOR block under
|
|
7
|
-
* `<poolId>:<pickKey>:<choiceId>` (a nested feat's own children under `<poolId>:<pickKey>:feat:<childId>`, the decision
|
|
8
|
-
* engine's prefix chaining), keyed by the stored pick string, so reordering or adding picks never moves it.
|
|
9
|
-
*
|
|
10
|
-
* The choices are the member's authored `choices`; absent (every note in the vault today), they are DERIVED at read time
|
|
11
|
-
* from the raw keys the notes already carry (`feat_progression`, `optionalfeature_progression`, `additional_spells`
|
|
12
|
-
* with `choose`, a `spell-choose` prerequisite), so existing notes work with no re-import. Authored `choices` win.
|
|
13
|
-
*/
|
|
14
1
|
import type { Character, ChoiceValue, FeatVia, ResolvedCharacter, ResolvedClass, ResolvedSpell, SpellTargets } from "./pc.types.js";
|
|
15
2
|
import type { Choice } from "@archivist-gg/dnd5e/types/choice";
|
|
16
3
|
import type { OptionalFeatureEntity } from "@archivist-gg/dnd5e/types/optional-feature.types";
|
|
17
4
|
import type { FeatEntity } from "@archivist-gg/dnd5e/feat/feat.types";
|
|
18
|
-
/** Whether `ch` names a target rather than granting what it picks (the data flag `target: true`, which the spell-choose
|
|
19
|
-
* derivation below writes and an authored note may carry). */
|
|
20
5
|
export declare function isTargetChoice(ch: Choice): boolean;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*/
|
|
6
|
+
export declare const PACT_WEAPON_CHOICE_ID = "pact-weapon";
|
|
7
|
+
export declare function pactWeaponPick(sites: ReadonlyArray<Pick<PoolMemberSite, "choices" | "read">>): string | undefined;
|
|
8
|
+
export declare function classPactWeaponPick(character: Pick<Character, "class">, classes: ReadonlyArray<Pick<ResolvedClass, "entity" | "subclass">>): string | undefined;
|
|
25
9
|
export declare function memberChoices(entity: OptionalFeatureEntity | null | undefined): Choice[];
|
|
26
|
-
/**
|
|
27
|
-
* The spells a member's spell-scoped damage rider reaches, as its DATA names them (found live 2026-09-28: Agonizing
|
|
28
|
-
* Blast's Charisma never reached its cantrip): each answer of a spell target pick (`isTargetChoice`, the blasts' cantrip,
|
|
29
|
-
* read through `read`, the member's nested key) and each `spell-known` prerequisite (the 2014 Agonizing Blast's Eldritch
|
|
30
|
-
* Blast). A target pick left unanswered keeps its filter in `open` (see {@link spellsReached}). Null when the member names
|
|
31
|
-
* no spell, so its spell riders reach none.
|
|
32
|
-
*/
|
|
33
10
|
export declare function memberSpellTargets(member: OptionalFeatureEntity, read: (choiceId: string) => ChoiceValue | undefined): SpellTargets | null;
|
|
34
|
-
/**
|
|
35
|
-
* The slugs of the character's `spells` a rider with `targets` reaches, unique, in `spells` order: every spell a ref
|
|
36
|
-
* names (its full slug, else its bare name, so a path link `[[SRD 5e/eldritch-blast]]` finds `srd-5e_spell_eldritch-blast`),
|
|
37
|
-
* and, for each open target pick, its ONE legal answer: the character's own spells that match the pick's filter and roll
|
|
38
|
-
* damage, when exactly one does ("one of your known Warlock cantrips that deals damage" with only Eldritch Blast known).
|
|
39
|
-
* Two or more legal answers are a choice the player has not made, and reach none.
|
|
40
|
-
*/
|
|
41
11
|
export declare function spellsReached(targets: SpellTargets | undefined, spells: ReadonlyArray<Pick<ResolvedSpell, "slug" | "entity">>): string[];
|
|
42
|
-
/** One stored pool pick whose member carries choices, with the block its nested picks live in. */
|
|
43
12
|
export interface PoolMemberSite {
|
|
44
13
|
classIndex: number;
|
|
45
|
-
/** The pool's anchor level (the block's key in `choices`). */
|
|
46
14
|
level: number;
|
|
47
15
|
poolId: string;
|
|
48
|
-
/** The stored pick string (a copy of a repeatable note keeps its `slug#param`). */
|
|
49
16
|
pickKey: string;
|
|
50
17
|
member: OptionalFeatureEntity;
|
|
51
18
|
memberSlug: string;
|
|
52
19
|
choices: Choice[];
|
|
53
|
-
/** `<poolId>:<pickKey>:` */
|
|
54
20
|
prefix: string;
|
|
55
|
-
/** The nested pick stored for a member choice id. */
|
|
56
21
|
read: (choiceId: string) => ChoiceValue | undefined;
|
|
57
|
-
/** The anchor block, as stored. */
|
|
58
22
|
block: Record<string, ChoiceValue>;
|
|
59
23
|
}
|
|
60
|
-
/** Structural subset of the registry the raw enumerator reads. */
|
|
61
24
|
export interface MemberRegistry {
|
|
62
25
|
getByTypeAndSlug(entityType: string, slug: string): {
|
|
63
26
|
slug: string;
|
|
@@ -68,38 +31,18 @@ export interface MemberRegistry {
|
|
|
68
31
|
data: Record<string, unknown>;
|
|
69
32
|
}>;
|
|
70
33
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Every pool member site from the RAW character (the resolver's view, before pools resolve): each class's and subclass's
|
|
73
|
-
* declared pools, their anchor levels (`poolAnchorLevel`, the one derivation `resolvePool` uses), the picks stored there,
|
|
74
|
-
* each resolved to its note (full slug, else bare). A pick with no note, or a note with no choices, yields no site, so an
|
|
75
|
-
* orphan nested key is inert.
|
|
76
|
-
*/
|
|
77
34
|
export declare function poolMemberSites(classes: ResolvedClass[], registry: MemberRegistry): PoolMemberSite[];
|
|
78
|
-
/** The same sites read from a RESOLVED character's pools (the ledger's, the proficiency walk's and recalc's view). */
|
|
79
35
|
export declare function poolMemberSitesOf(resolved: Pick<ResolvedCharacter, "pools" | "classes">): PoolMemberSite[];
|
|
80
|
-
/** A feat the character picked, where it was picked, and how its own children are read. */
|
|
81
36
|
export interface FeatPickSite {
|
|
82
37
|
slug: string;
|
|
83
38
|
classIndex: number;
|
|
84
39
|
level: number | null;
|
|
85
40
|
via: FeatVia | null;
|
|
86
|
-
/** A child choice of THIS feat, as stored (`feat:<id>` in the slot's block, or `<prefix>feat:<id>` under a member). */
|
|
87
41
|
read: (childId: string) => ChoiceValue | undefined;
|
|
88
42
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Every feat pick with its own read (design §2.2 step 4): the class-slot picks (`choices[<level>].feat`, children under
|
|
91
|
-
* `feat:<id>`) and the pool-member picks (a member choice of `entity_type: feat`, children under `<prefix>feat:<id>`).
|
|
92
|
-
* The ONE list the four feat readers walk (the resolver's feats and feat spells, the proficiency walk, ability points).
|
|
93
|
-
* `classSlugOf` names a class for the provenance. NOT de-duplicated: a feat taken twice (Magic Initiate, one spell list
|
|
94
|
-
* each) is two sites with two reads; a reader that lists feats de-duplicates by slug itself (first wins).
|
|
95
|
-
*/
|
|
96
43
|
export declare function featPickSites(classEntries: ReadonlyArray<{
|
|
97
44
|
choices?: Character["class"][number]["choices"] | ResolvedClass["choices"];
|
|
98
45
|
}> | undefined, memberSites: PoolMemberSite[], classSlugOf: (classIndex: number) => string | null): FeatPickSite[];
|
|
99
|
-
/** SRD-G T4 (audit §3b): a feat the character picked through a SPECIES (the SRD 5.2 Human's Versatile: "You gain an
|
|
100
|
-
* Origin feat of your choice"): a `select-entity` of `entity_type: feat` on `race.choices[]` or a trait's `choices[]`,
|
|
101
|
-
* answered under `origin_choices["race:<id>"]`. The feat's OWN children are read under `race:feat:<childId>`, the key
|
|
102
|
-
* the builder's ledger writes them to (a race item's feat children carry the `feat:` prefix, namespace `race`). */
|
|
103
46
|
export interface RaceFeatSite {
|
|
104
47
|
slug: string;
|
|
105
48
|
via: FeatVia;
|
|
@@ -112,11 +55,5 @@ export declare function raceFeatSites(race: {
|
|
|
112
55
|
choices?: unknown;
|
|
113
56
|
}>;
|
|
114
57
|
} | null | undefined, originChoices: Readonly<Record<string, ChoiceValue>> | undefined): RaceFeatSite[];
|
|
115
|
-
/** Look a feat pick up in the resolved feats (by slug, then bare slug). */
|
|
116
58
|
export declare function featOfSite(site: FeatPickSite, feats: ReadonlyArray<FeatEntity>): FeatEntity | undefined;
|
|
117
|
-
/**
|
|
118
|
-
* The nested keys an array write to `key` orphans (design §2.2 step 8): every `<key>:<k>:*` whose `k` was stored before
|
|
119
|
-
* and is not in `next`. Pure; the writer deletes them in the same write, so a re-pick never resurrects an old answer.
|
|
120
|
-
* A key that is not a pool (no array stored) orphans nothing.
|
|
121
|
-
*/
|
|
122
59
|
export declare function nestedPickKeysToPrune(block: Record<string, unknown> | undefined, key: string, next: readonly string[]): string[];
|
|
@@ -1,39 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
featOfSite,
|
|
3
|
-
featPickSites,
|
|
4
|
-
isTargetChoice,
|
|
5
|
-
memberChoices,
|
|
6
|
-
memberSpellTargets,
|
|
7
|
-
nestedPickKeysToPrune,
|
|
8
|
-
poolMemberSites,
|
|
9
|
-
poolMemberSitesOf,
|
|
10
|
-
raceFeatSites,
|
|
11
|
-
spellsReached
|
|
12
|
-
} from "../chunk-RD2MID3M.js";
|
|
13
|
-
import "../chunk-NXUY5XQN.js";
|
|
14
|
-
import "../chunk-W6GC6OKK.js";
|
|
15
|
-
import "../chunk-B3DP42OM.js";
|
|
16
|
-
import "../chunk-IUAAXXNO.js";
|
|
17
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
18
|
-
import "../chunk-IHE6KVC3.js";
|
|
19
|
-
import "../chunk-LHZXYFBU.js";
|
|
20
|
-
import "../chunk-YBLDE5CG.js";
|
|
21
|
-
import "../chunk-LVQLWRCU.js";
|
|
22
|
-
import "../chunk-CM5CWO4K.js";
|
|
23
|
-
import "../chunk-4J6DS3EJ.js";
|
|
24
|
-
import "../chunk-ZCTUYGNV.js";
|
|
25
|
-
import "../chunk-3TM34RSJ.js";
|
|
26
|
-
import "../chunk-PDJSUH24.js";
|
|
27
|
-
import "../chunk-WELIKLZF.js";
|
|
28
|
-
export {
|
|
29
|
-
featOfSite,
|
|
30
|
-
featPickSites,
|
|
31
|
-
isTargetChoice,
|
|
32
|
-
memberChoices,
|
|
33
|
-
memberSpellTargets,
|
|
34
|
-
nestedPickKeysToPrune,
|
|
35
|
-
poolMemberSites,
|
|
36
|
-
poolMemberSitesOf,
|
|
37
|
-
raceFeatSites,
|
|
38
|
-
spellsReached
|
|
39
|
-
};
|
|
1
|
+
import{PACT_WEAPON_CHOICE_ID,classPactWeaponPick,featOfSite,featPickSites,isTargetChoice,memberChoices,memberSpellTargets,nestedPickKeysToPrune,pactWeaponPick,poolMemberSites,poolMemberSitesOf,raceFeatSites,spellsReached}from"../chunk-QBA757AU.js";import"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.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,58 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
characterSchema
|
|
3
|
-
} from "../chunk-NTU2DXNG.js";
|
|
4
|
-
import "../chunk-S7REMWW4.js";
|
|
5
|
-
import {
|
|
6
|
-
keptSlugForLink
|
|
7
|
-
} from "../chunk-CM5CWO4K.js";
|
|
8
|
-
import "../chunk-ZCTUYGNV.js";
|
|
9
|
-
|
|
10
|
-
// src/pc/pc.parser.ts
|
|
11
|
-
import * as yaml from "js-yaml";
|
|
12
|
-
function parsePC(source) {
|
|
13
|
-
var _a;
|
|
14
|
-
let raw;
|
|
15
|
-
try {
|
|
16
|
-
raw = yaml.load(source);
|
|
17
|
-
} catch (e) {
|
|
18
|
-
const msg = e instanceof Error ? e.message : String(e);
|
|
19
|
-
return { success: false, error: `YAML parse error: ${msg}` };
|
|
20
|
-
}
|
|
21
|
-
if (!raw || typeof raw !== "object") {
|
|
22
|
-
return { success: false, error: "Invalid YAML: expected an object" };
|
|
23
|
-
}
|
|
24
|
-
const result = characterSchema.safeParse(raw);
|
|
25
|
-
if (!result.success) {
|
|
26
|
-
const issue = result.error.issues[0];
|
|
27
|
-
const path = issue.path.length ? issue.path.join(".") : "(root)";
|
|
28
|
-
return { success: false, error: `${path}: ${issue.message}` };
|
|
29
|
-
}
|
|
30
|
-
const data = result.data;
|
|
31
|
-
const legacyState = data.state;
|
|
32
|
-
const legacyCurrency = legacyState.currency;
|
|
33
|
-
if (legacyCurrency && !data.currency) {
|
|
34
|
-
data.currency = legacyCurrency;
|
|
35
|
-
}
|
|
36
|
-
if (legacyCurrency) {
|
|
37
|
-
delete legacyState.currency;
|
|
38
|
-
}
|
|
39
|
-
if (legacyState.attuned_items) {
|
|
40
|
-
delete legacyState.attuned_items;
|
|
41
|
-
}
|
|
42
|
-
for (const entry of (_a = data.equipment) != null ? _a : []) {
|
|
43
|
-
if (typeof entry.item !== "string") continue;
|
|
44
|
-
const next = migrateRetiredItemLink(entry.item);
|
|
45
|
-
if (next !== null) entry.item = next;
|
|
46
|
-
}
|
|
47
|
-
return { success: true, data };
|
|
48
|
-
}
|
|
49
|
-
function migrateRetiredItemLink(item) {
|
|
50
|
-
var _a;
|
|
51
|
-
const m = /^\[\[([^\]|]+)(\|[^\]]*)?\]\]$/.exec(item.trim());
|
|
52
|
-
const kept = keptSlugForLink(m ? m[1] : item);
|
|
53
|
-
if (kept === void 0) return null;
|
|
54
|
-
return m ? `[[${kept}${(_a = m[2]) != null ? _a : ""}]]` : kept;
|
|
55
|
-
}
|
|
56
|
-
export {
|
|
57
|
-
parsePC
|
|
58
|
-
};
|
|
1
|
+
import{characterSchema}from"../chunk-5FEXHY4U.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.d.ts
CHANGED
|
@@ -3,25 +3,22 @@ import type { ResolvedCharacter, ResolvedClass, ResolvedPool, ResolvedPoolEntry
|
|
|
3
3
|
import type { SelectionPool } from "@archivist-gg/dnd5e/types/selection-pool";
|
|
4
4
|
import type { OptionalFeatureEntity } from "@archivist-gg/dnd5e/types/optional-feature.types";
|
|
5
5
|
import type { ResourceIndex } from "./pc.resources.js";
|
|
6
|
-
/** Structural subset of EntityRegistry used here (lets tests pass a fake). */
|
|
7
6
|
export interface PoolRegistry {
|
|
8
7
|
search(query: string, entityType: string, limit: number): RegisteredEntity[];
|
|
9
8
|
getByTypeAndSlug(entityType: string, slug: string): RegisteredEntity | undefined;
|
|
10
9
|
}
|
|
11
10
|
export declare function levelPrereqMax(d: OptionalFeatureEntity): number;
|
|
12
|
-
|
|
13
|
-
* carries a value of at least 1, else 1; `columnSeen` says whether any level carried the column at all. ONE derivation
|
|
14
|
-
* shared by `resolvePool` and the nested-choice enumerator (D2b-A, `pc.member-choices.ts`), so the two always agree. */
|
|
11
|
+
export declare function levelPrereqRefsMet(d: OptionalFeatureEntity, rc: Pick<ResolvedClass, "entity" | "subclass">): boolean;
|
|
15
12
|
export declare function poolAnchorLevel(entity: Pick<NonNullable<ResolvedClass["entity"]>, "table">, pool: Pick<SelectionPool, "count">): {
|
|
16
13
|
anchorLevel: number;
|
|
17
14
|
columnSeen: boolean;
|
|
18
15
|
};
|
|
19
16
|
export declare function resolvePool(rc: ResolvedClass, classIndex: number, pool: SelectionPool, registry: PoolRegistry, index: ResourceIndex, edition?: string): ResolvedPool;
|
|
20
17
|
export declare function resolveAllPools(resolved: ResolvedCharacter, registry: PoolRegistry, index: ResourceIndex): ResolvedPool[];
|
|
21
|
-
/** The stored picks that survived resolution but are NOT in the collapsed `available` list, compared by FULL
|
|
22
|
-
* slug: exactly the rule the plugin's `strandedSelections` used before T3 retires it (R4-G5 §3.2.3). Because
|
|
23
|
-
* §9.2.3's resolution rewrites a collapsed twin to its survivor, only a GENUINE prerequisite-failing pick (the
|
|
24
|
-
* one resolved by step 3 from the full scan) can land here, and it keeps its entity so the builder strip and the
|
|
25
|
-
* sheet can both dress it "prerequisite unmet". A granted feature is already excluded from `selected`, so a
|
|
26
|
-
* grant never appears here. Pure over the resolved pool: it reads nothing the resolver did not compute. */
|
|
27
18
|
export declare function strandedPicks(pool: ResolvedPool): ResolvedPoolEntry[];
|
|
19
|
+
export declare function heldPicks(pool: ResolvedPool): ResolvedPoolEntry[];
|
|
20
|
+
export declare function withoutStrandedSites<T extends {
|
|
21
|
+
classIndex: number;
|
|
22
|
+
poolId: string;
|
|
23
|
+
memberSlug: string;
|
|
24
|
+
}>(sites: T[], classes: ResolvedClass[], registry: PoolRegistry, edition?: string): T[];
|
package/dist/pc/pc.pools.js
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
levelPrereqMax,
|
|
3
|
-
poolAnchorLevel,
|
|
4
|
-
resolveAllPools,
|
|
5
|
-
resolvePool,
|
|
6
|
-
strandedPicks
|
|
7
|
-
} from "../chunk-NXUY5XQN.js";
|
|
8
|
-
import "../chunk-W6GC6OKK.js";
|
|
9
|
-
import "../chunk-B3DP42OM.js";
|
|
10
|
-
import "../chunk-IUAAXXNO.js";
|
|
11
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
12
|
-
import "../chunk-IHE6KVC3.js";
|
|
13
|
-
import "../chunk-LHZXYFBU.js";
|
|
14
|
-
import "../chunk-LVQLWRCU.js";
|
|
15
|
-
import "../chunk-CM5CWO4K.js";
|
|
16
|
-
import "../chunk-4J6DS3EJ.js";
|
|
17
|
-
import "../chunk-ZCTUYGNV.js";
|
|
18
|
-
import "../chunk-3TM34RSJ.js";
|
|
19
|
-
import "../chunk-PDJSUH24.js";
|
|
20
|
-
import "../chunk-WELIKLZF.js";
|
|
21
|
-
export {
|
|
22
|
-
levelPrereqMax,
|
|
23
|
-
poolAnchorLevel,
|
|
24
|
-
resolveAllPools,
|
|
25
|
-
resolvePool,
|
|
26
|
-
strandedPicks
|
|
27
|
-
};
|
|
1
|
+
import{heldPicks,levelPrereqMax,levelPrereqRefsMet,poolAnchorLevel,resolveAllPools,resolvePool,strandedPicks,withoutStrandedSites}from"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.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};
|
|
@@ -2,46 +2,13 @@ import type { ResolvedCharacter } from "./pc.types.js";
|
|
|
2
2
|
import type { WeaponEntity } from "@archivist-gg/dnd5e/weapon/weapon.types";
|
|
3
3
|
import { type ProficiencyKind } from "./pc.proficiency-normalize.js";
|
|
4
4
|
import { type ProficiencyEntry, type ProficiencyGrant } from "./pc.proficiency-grants.js";
|
|
5
|
-
/** Re-exported for the plugin: both types are DECLARED in the leaf so that
|
|
6
|
-
* pc.decision-engine can reference them without importing this module, which
|
|
7
|
-
* would close a cycle (spec §4.3). */
|
|
8
5
|
export type { ProficiencyEntry, ProficiencyOrigin } from "./pc.proficiency-grants.js";
|
|
9
|
-
/** Every bucket carries provenance (spec §7.1). `languages`/`tools` ARE
|
|
10
|
-
* {@link computeEffectiveProficiencies}' output, unmodified · `armor`/`weapons`
|
|
11
|
-
* are composed below from the raw grant walk, because they have no vocabulary
|
|
12
|
-
* constant to canonicalize against (spec §3.3's second rule) · and for `weapons`
|
|
13
|
-
* that grant walk is followed by the chosen `select-entity{weapon}` picks
|
|
14
|
-
* (R4-G3b §7 F5), which land with origin `pick`. */
|
|
15
6
|
export interface ProficiencyAggregate {
|
|
16
7
|
armor: ProficiencyEntry[];
|
|
17
8
|
weapons: ProficiencyEntry[];
|
|
18
9
|
tools: ProficiencyEntry[];
|
|
19
10
|
languages: ProficiencyEntry[];
|
|
20
11
|
}
|
|
21
|
-
/** Normalized intermediate of every proficiency/language source the DISPLAY path
|
|
22
|
-
* reads, in one place. Among the ENTITY branches only the class one is a live
|
|
23
|
-
* proficiency source today (race/bg/feat `.proficiencies` object fields do not
|
|
24
|
-
* exist on those entities); race languages, bg tool/lang, and feat grants read
|
|
25
|
-
* their real fields, and the four `effect*` buckets carry what a feature's
|
|
26
|
-
* `kind: "proficiency"` effects grant · that is the live path a 2014 race trait
|
|
27
|
-
* actually uses (R4-P3c). Chosen picks come from the single decision walk in
|
|
28
|
-
* pc.decision-engine so display can never diverge from the persisted picks.
|
|
29
|
-
*
|
|
30
|
-
* Every grant bucket carries `{value, source}` rather than a bare value: the
|
|
31
|
-
* walk holds the granting entity and the aggregate needs it to fill
|
|
32
|
-
* `ProficiencyEntry.sources` for armor and weapons (spec §7.1). The
|
|
33
|
-
* language/tool grant buckets are still surfaced here for completeness, but
|
|
34
|
-
* the aggregate no longer reads them · languages and tools come from
|
|
35
|
-
* computeEffectiveProficiencies, which does its own grant walk so that
|
|
36
|
-
* suppressions and manual adds can never be skipped by a second composer.
|
|
37
|
-
*
|
|
38
|
-
* These names are RE-DECLARED by hand rather than inherited: this interface
|
|
39
|
-
* does not `extends ProficiencyGrants`, so a bucket added to the grant walk
|
|
40
|
-
* stays invisible here until it is added here too. `collectProficiencySources`
|
|
41
|
-
* spreads the grants object, so an undeclared bucket still flows at RUNTIME ·
|
|
42
|
-
* the compiler is the only thing that notices, and only where the field is
|
|
43
|
-
* read. Nothing iterates these objects with Object.keys/values/entries, so a
|
|
44
|
-
* declaration gap is inert rather than corrupting; it is still a gap. */
|
|
45
12
|
export interface ProficiencySources {
|
|
46
13
|
classArmor: ProficiencyGrant[];
|
|
47
14
|
classWeaponFixed: ProficiencyGrant[];
|
|
@@ -64,15 +31,8 @@ export interface ProficiencySources {
|
|
|
64
31
|
}
|
|
65
32
|
export declare function collectProficiencySources(resolved: ResolvedCharacter): ProficiencySources;
|
|
66
33
|
export declare function aggregateProficiencies(resolved: ResolvedCharacter): ProficiencyAggregate;
|
|
67
|
-
/** D4 A: one kind's proficiencies as the picker needs them: `effective` is exactly the sheet's line (the aggregate's
|
|
68
|
-
* bucket), `removed` every grant or pick the user's overrides suppress, keeping its `sources`. Both halves come out of
|
|
69
|
-
* the composers the sheet reads, so the picker and the sheet line cannot disagree. */
|
|
70
34
|
export declare function proficiencyOverview(resolved: ResolvedCharacter, kind: ProficiencyKind): {
|
|
71
35
|
effective: ProficiencyEntry[];
|
|
72
36
|
removed: ProficiencyEntry[];
|
|
73
37
|
};
|
|
74
|
-
/** D4 A: the effective weapon entry that covers `weapon` without naming it, a category (`simple`, `martial`, or the
|
|
75
|
-
* entity's own `martial-melee` form) or a property-qualified grant ("Martial weapons that have the Light property").
|
|
76
|
-
* The same three arms as the live gate, `isWeaponSlugProficient` (pc.equipment.ts), so the picker's dimmed "via" row
|
|
77
|
-
* and the attack row's proficiency agree. Undefined when nothing but the weapon's own entry could cover it. */
|
|
78
38
|
export declare function weaponCoveredBy(effective: readonly ProficiencyEntry[], weapon: Pick<WeaponEntity, "category" | "properties" | "range" | "slug">): ProficiencyEntry | undefined;
|