@archivist-gg/dnd5e 0.3.17 → 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 +4 -27
- package/dist/dnd/amount-text.js +1 -13
- 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 +10 -0
- package/dist/entities/registry-revision.js +1 -0
- 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 +31 -1
- package/dist/feat/feat.schema.js +1 -10
- package/dist/feat/feat.types.d.ts +0 -6
- package/dist/index.js +45 -138113
- 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 +30 -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 +4 -14
- package/dist/pc/pc.additional-spells.js +1 -23
- package/dist/pc/pc.amount-bindings.d.ts +4 -20
- package/dist/pc/pc.amount-bindings.js +1 -23
- 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 +4 -141
- package/dist/pc/pc.decision-engine.js +1 -52
- 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 -40
- package/dist/pc/pc.equipment.d.ts +2 -22
- package/dist/pc/pc.equipment.js +1 -33
- package/dist/pc/pc.feature-effects.d.ts +23 -275
- package/dist/pc/pc.feature-effects.js +1 -26
- 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 -64
- package/dist/pc/pc.item-effects.d.ts +18 -0
- package/dist/pc/pc.member-choices.d.ts +18 -49
- package/dist/pc/pc.member-choices.js +1 -32
- package/dist/pc/pc.parser.js +1 -58
- package/dist/pc/pc.pools.d.ts +7 -10
- package/dist/pc/pc.pools.js +1 -26
- package/dist/pc/pc.proficiencies.d.ts +7 -33
- package/dist/pc/pc.proficiencies.js +1 -107
- package/dist/pc/pc.proficiency-grants.d.ts +0 -26
- package/dist/pc/pc.proficiency-normalize.d.ts +4 -25
- package/dist/pc/pc.proficiency-normalize.js +1 -12
- 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 -946
- package/dist/pc/pc.resolver.d.ts +0 -104
- package/dist/pc/pc.resolver.js +1 -59
- 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 -230
- package/dist/pc/pc.schema.d.ts +19 -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 +6 -0
- 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 +85 -344
- 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 +30 -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 +14 -14
- 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-2JSQE3DD.js +0 -206
- package/dist/chunk-2LULMQTF.js +0 -14
- package/dist/chunk-2UDSN6VW.js +0 -18
- package/dist/chunk-3LWMFYKS.js +0 -57
- package/dist/chunk-3MGQFFNE.js +0 -110
- package/dist/chunk-3TM34RSJ.js +0 -23
- package/dist/chunk-3VZZDKRA.js +0 -1014
- package/dist/chunk-4U55VNC7.js +0 -22
- package/dist/chunk-5GKJAUMX.js +0 -59
- package/dist/chunk-5MXFW4O3.js +0 -71
- package/dist/chunk-656QCX4U.js +0 -22
- package/dist/chunk-6EI737IO.js +0 -19
- package/dist/chunk-6GNXYAYP.js +0 -25
- package/dist/chunk-6PXTNCBP.js +0 -133
- package/dist/chunk-6X2NV665.js +0 -33
- package/dist/chunk-7ATNGKBS.js +0 -178
- package/dist/chunk-7Q2VPKCD.js +0 -181
- package/dist/chunk-7QN7XSAK.js +0 -19
- package/dist/chunk-A54HHCWW.js +0 -67
- package/dist/chunk-AZRGFUSR.js +0 -18
- package/dist/chunk-B3DP42OM.js +0 -55
- package/dist/chunk-CJYCVNW2.js +0 -7
- package/dist/chunk-CM5CWO4K.js +0 -735
- package/dist/chunk-DEEHHLAP.js +0 -271
- package/dist/chunk-DOXSFYLH.js +0 -158
- package/dist/chunk-DPUJDOKV.js +0 -365
- package/dist/chunk-EJP263OP.js +0 -186
- package/dist/chunk-EVMUJYUD.js +0 -195
- package/dist/chunk-EYX4JMAU.js +0 -101
- package/dist/chunk-FANQVQ3D.js +0 -89
- package/dist/chunk-FC4IGH5Y.js +0 -18
- package/dist/chunk-G6MHJDVT.js +0 -41
- package/dist/chunk-G6PBI2BU.js +0 -18
- package/dist/chunk-H5PTKYXL.js +0 -101
- package/dist/chunk-HHBD4SQ6.js +0 -24
- package/dist/chunk-HS6FIOLP.js +0 -52
- package/dist/chunk-HTYMW5CH.js +0 -228
- package/dist/chunk-IHE6KVC3.js +0 -13
- package/dist/chunk-IN4M4X7P.js +0 -34
- package/dist/chunk-IUAAXXNO.js +0 -58
- package/dist/chunk-JCMUVZIK.js +0 -133
- package/dist/chunk-JSM6JFZR.js +0 -709
- 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-LF5AGJA4.js +0 -81
- package/dist/chunk-LHZXYFBU.js +0 -94
- package/dist/chunk-LSLSG67V.js +0 -31
- package/dist/chunk-LVQLWRCU.js +0 -15
- package/dist/chunk-MBX25B6D.js +0 -18
- package/dist/chunk-MYY2C5MB.js +0 -233
- package/dist/chunk-OFCSP6MT.js +0 -23
- package/dist/chunk-ONTGZR5T.js +0 -1806
- package/dist/chunk-OOSRUJBI.js +0 -19
- package/dist/chunk-PDJSUH24.js +0 -110
- package/dist/chunk-PKX6TGRE.js +0 -93
- package/dist/chunk-PQZ4LM4Z.js +0 -19
- package/dist/chunk-PTXBIDG7.js +0 -63
- package/dist/chunk-PVCEA4HZ.js +0 -6
- package/dist/chunk-PXVNAY7T.js +0 -84
- package/dist/chunk-QH36K2PU.js +0 -158
- package/dist/chunk-QS5L5YTJ.js +0 -24
- package/dist/chunk-QYZV2MQA.js +0 -97
- package/dist/chunk-QZSWN2KT.js +0 -18
- package/dist/chunk-RLGQ5PZZ.js +0 -16
- package/dist/chunk-RYLXAYIQ.js +0 -18
- package/dist/chunk-S3YUXDSC.js +0 -278
- package/dist/chunk-S7REMWW4.js +0 -21
- package/dist/chunk-T6QIF5XR.js +0 -348
- package/dist/chunk-TOM66P2P.js +0 -38
- package/dist/chunk-TULQ4FFX.js +0 -353
- package/dist/chunk-UA5KS2PL.js +0 -26
- package/dist/chunk-UUBJCNQU.js +0 -187
- package/dist/chunk-UZXG6QSY.js +0 -58
- package/dist/chunk-VPYBK2MG.js +0 -18
- package/dist/chunk-VRV3NNTA.js +0 -161
- package/dist/chunk-VTTA2ALZ.js +0 -16
- package/dist/chunk-W6GC6OKK.js +0 -16
- package/dist/chunk-WELIKLZF.js +0 -256
- 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-Y5VVP73C.js +0 -23
- package/dist/chunk-YBLDE5CG.js +0 -42
- package/dist/chunk-YD2VAHA6.js +0 -159
- package/dist/chunk-YDGMBMYI.js +0 -25
- package/dist/chunk-YHYTW5QA.js +0 -20
- package/dist/chunk-YKL6SHRJ.js +0 -23
- package/dist/chunk-ZCTUYGNV.js +0 -26
- package/dist/chunk-ZDAEGJH4.js +0 -102
- package/dist/chunk-ZJXSXVFP.js +0 -58
- package/dist/chunk-ZUQW5VBZ.js +0 -89
package/dist/pc/pc.infusions.js
CHANGED
|
@@ -1,64 +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-3VZZDKRA.js";
|
|
27
|
-
import "../chunk-W6GC6OKK.js";
|
|
28
|
-
import "../chunk-B3DP42OM.js";
|
|
29
|
-
import "../chunk-IUAAXXNO.js";
|
|
30
|
-
import "../chunk-IHE6KVC3.js";
|
|
31
|
-
import "../chunk-LHZXYFBU.js";
|
|
32
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
33
|
-
import "../chunk-LVQLWRCU.js";
|
|
34
|
-
import "../chunk-CM5CWO4K.js";
|
|
35
|
-
import "../chunk-ZCTUYGNV.js";
|
|
36
|
-
import "../chunk-3TM34RSJ.js";
|
|
37
|
-
import "../chunk-PDJSUH24.js";
|
|
38
|
-
import "../chunk-WELIKLZF.js";
|
|
39
|
-
export {
|
|
40
|
-
buildInfusionContext,
|
|
41
|
-
createEntry,
|
|
42
|
-
eligibleTargets,
|
|
43
|
-
endInfusion,
|
|
44
|
-
entryCharges,
|
|
45
|
-
infuseEntry,
|
|
46
|
-
infusionsEndedByChoice,
|
|
47
|
-
infusionsEndedByClassEdit,
|
|
48
|
-
isItemBound,
|
|
49
|
-
isMarkedEntry,
|
|
50
|
-
markerKey,
|
|
51
|
-
normalizedPickKey,
|
|
52
|
-
optionCandidates,
|
|
53
|
-
parsePickKey,
|
|
54
|
-
poolActiveWords,
|
|
55
|
-
poolCountLabel,
|
|
56
|
-
reconcileChoiceEdit,
|
|
57
|
-
reconcileClassEdit,
|
|
58
|
-
resolveCopyOption,
|
|
59
|
-
resolveEntryEntity,
|
|
60
|
-
resolveOptionRows,
|
|
61
|
-
scaledInfuseItem,
|
|
62
|
-
splitOne,
|
|
63
|
-
withEntryCharges
|
|
64
|
-
};
|
|
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,47 +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
|
-
import type { Character, ChoiceValue, FeatVia, ResolvedCharacter, ResolvedClass } from "./pc.types.js";
|
|
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
|
-
|
|
10
|
+
export declare function memberSpellTargets(member: OptionalFeatureEntity, read: (choiceId: string) => ChoiceValue | undefined): SpellTargets | null;
|
|
11
|
+
export declare function spellsReached(targets: SpellTargets | undefined, spells: ReadonlyArray<Pick<ResolvedSpell, "slug" | "entity">>): string[];
|
|
27
12
|
export interface PoolMemberSite {
|
|
28
13
|
classIndex: number;
|
|
29
|
-
/** The pool's anchor level (the block's key in `choices`). */
|
|
30
14
|
level: number;
|
|
31
15
|
poolId: string;
|
|
32
|
-
/** The stored pick string (a copy of a repeatable note keeps its `slug#param`). */
|
|
33
16
|
pickKey: string;
|
|
34
17
|
member: OptionalFeatureEntity;
|
|
35
18
|
memberSlug: string;
|
|
36
19
|
choices: Choice[];
|
|
37
|
-
/** `<poolId>:<pickKey>:` */
|
|
38
20
|
prefix: string;
|
|
39
|
-
/** The nested pick stored for a member choice id. */
|
|
40
21
|
read: (choiceId: string) => ChoiceValue | undefined;
|
|
41
|
-
/** The anchor block, as stored. */
|
|
42
22
|
block: Record<string, ChoiceValue>;
|
|
43
23
|
}
|
|
44
|
-
/** Structural subset of the registry the raw enumerator reads. */
|
|
45
24
|
export interface MemberRegistry {
|
|
46
25
|
getByTypeAndSlug(entityType: string, slug: string): {
|
|
47
26
|
slug: string;
|
|
@@ -52,39 +31,29 @@ export interface MemberRegistry {
|
|
|
52
31
|
data: Record<string, unknown>;
|
|
53
32
|
}>;
|
|
54
33
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Every pool member site from the RAW character (the resolver's view, before pools resolve): each class's and subclass's
|
|
57
|
-
* declared pools, their anchor levels (`poolAnchorLevel`, the one derivation `resolvePool` uses), the picks stored there,
|
|
58
|
-
* 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
|
|
59
|
-
* orphan nested key is inert.
|
|
60
|
-
*/
|
|
61
34
|
export declare function poolMemberSites(classes: ResolvedClass[], registry: MemberRegistry): PoolMemberSite[];
|
|
62
|
-
/** The same sites read from a RESOLVED character's pools (the ledger's, the proficiency walk's and recalc's view). */
|
|
63
35
|
export declare function poolMemberSitesOf(resolved: Pick<ResolvedCharacter, "pools" | "classes">): PoolMemberSite[];
|
|
64
|
-
/** A feat the character picked, where it was picked, and how its own children are read. */
|
|
65
36
|
export interface FeatPickSite {
|
|
66
37
|
slug: string;
|
|
67
38
|
classIndex: number;
|
|
68
39
|
level: number | null;
|
|
69
40
|
via: FeatVia | null;
|
|
70
|
-
/** A child choice of THIS feat, as stored (`feat:<id>` in the slot's block, or `<prefix>feat:<id>` under a member). */
|
|
71
41
|
read: (childId: string) => ChoiceValue | undefined;
|
|
72
42
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Every feat pick with its own read (design §2.2 step 4): the class-slot picks (`choices[<level>].feat`, children under
|
|
75
|
-
* `feat:<id>`) and the pool-member picks (a member choice of `entity_type: feat`, children under `<prefix>feat:<id>`).
|
|
76
|
-
* The ONE list the four feat readers walk (the resolver's feats and feat spells, the proficiency walk, ability points).
|
|
77
|
-
* `classSlugOf` names a class for the provenance. NOT de-duplicated: a feat taken twice (Magic Initiate, one spell list
|
|
78
|
-
* each) is two sites with two reads; a reader that lists feats de-duplicates by slug itself (first wins).
|
|
79
|
-
*/
|
|
80
43
|
export declare function featPickSites(classEntries: ReadonlyArray<{
|
|
81
44
|
choices?: Character["class"][number]["choices"] | ResolvedClass["choices"];
|
|
82
45
|
}> | undefined, memberSites: PoolMemberSite[], classSlugOf: (classIndex: number) => string | null): FeatPickSite[];
|
|
83
|
-
|
|
46
|
+
export interface RaceFeatSite {
|
|
47
|
+
slug: string;
|
|
48
|
+
via: FeatVia;
|
|
49
|
+
read: (childId: string) => ChoiceValue | undefined;
|
|
50
|
+
}
|
|
51
|
+
export declare function raceFeatSites(race: {
|
|
52
|
+
slug: string;
|
|
53
|
+
choices?: unknown;
|
|
54
|
+
traits?: ReadonlyArray<{
|
|
55
|
+
choices?: unknown;
|
|
56
|
+
}>;
|
|
57
|
+
} | null | undefined, originChoices: Readonly<Record<string, ChoiceValue>> | undefined): RaceFeatSite[];
|
|
84
58
|
export declare function featOfSite(site: FeatPickSite, feats: ReadonlyArray<FeatEntity>): FeatEntity | undefined;
|
|
85
|
-
/**
|
|
86
|
-
* The nested keys an array write to `key` orphans (design §2.2 step 8): every `<key>:<k>:*` whose `k` was stored before
|
|
87
|
-
* and is not in `next`. Pure; the writer deletes them in the same write, so a re-pick never resurrects an old answer.
|
|
88
|
-
* A key that is not a pool (no array stored) orphans nothing.
|
|
89
|
-
*/
|
|
90
59
|
export declare function nestedPickKeysToPrune(block: Record<string, unknown> | undefined, key: string, next: readonly string[]): string[];
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
featOfSite,
|
|
3
|
-
featPickSites,
|
|
4
|
-
isTargetChoice,
|
|
5
|
-
memberChoices,
|
|
6
|
-
nestedPickKeysToPrune,
|
|
7
|
-
poolMemberSites,
|
|
8
|
-
poolMemberSitesOf
|
|
9
|
-
} from "../chunk-HTYMW5CH.js";
|
|
10
|
-
import "../chunk-3VZZDKRA.js";
|
|
11
|
-
import "../chunk-W6GC6OKK.js";
|
|
12
|
-
import "../chunk-B3DP42OM.js";
|
|
13
|
-
import "../chunk-IUAAXXNO.js";
|
|
14
|
-
import "../chunk-IHE6KVC3.js";
|
|
15
|
-
import "../chunk-LHZXYFBU.js";
|
|
16
|
-
import "../chunk-YBLDE5CG.js";
|
|
17
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
18
|
-
import "../chunk-LVQLWRCU.js";
|
|
19
|
-
import "../chunk-CM5CWO4K.js";
|
|
20
|
-
import "../chunk-ZCTUYGNV.js";
|
|
21
|
-
import "../chunk-3TM34RSJ.js";
|
|
22
|
-
import "../chunk-PDJSUH24.js";
|
|
23
|
-
import "../chunk-WELIKLZF.js";
|
|
24
|
-
export {
|
|
25
|
-
featOfSite,
|
|
26
|
-
featPickSites,
|
|
27
|
-
isTargetChoice,
|
|
28
|
-
memberChoices,
|
|
29
|
-
nestedPickKeysToPrune,
|
|
30
|
-
poolMemberSites,
|
|
31
|
-
poolMemberSitesOf
|
|
32
|
-
};
|
|
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-T6QIF5XR.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,26 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
levelPrereqMax,
|
|
3
|
-
poolAnchorLevel,
|
|
4
|
-
resolveAllPools,
|
|
5
|
-
resolvePool,
|
|
6
|
-
strandedPicks
|
|
7
|
-
} from "../chunk-3VZZDKRA.js";
|
|
8
|
-
import "../chunk-W6GC6OKK.js";
|
|
9
|
-
import "../chunk-B3DP42OM.js";
|
|
10
|
-
import "../chunk-IUAAXXNO.js";
|
|
11
|
-
import "../chunk-IHE6KVC3.js";
|
|
12
|
-
import "../chunk-LHZXYFBU.js";
|
|
13
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
14
|
-
import "../chunk-LVQLWRCU.js";
|
|
15
|
-
import "../chunk-CM5CWO4K.js";
|
|
16
|
-
import "../chunk-ZCTUYGNV.js";
|
|
17
|
-
import "../chunk-3TM34RSJ.js";
|
|
18
|
-
import "../chunk-PDJSUH24.js";
|
|
19
|
-
import "../chunk-WELIKLZF.js";
|
|
20
|
-
export {
|
|
21
|
-
levelPrereqMax,
|
|
22
|
-
poolAnchorLevel,
|
|
23
|
-
resolveAllPools,
|
|
24
|
-
resolvePool,
|
|
25
|
-
strandedPicks
|
|
26
|
-
};
|
|
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};
|
|
@@ -1,45 +1,14 @@
|
|
|
1
1
|
import type { ResolvedCharacter } from "./pc.types.js";
|
|
2
|
+
import type { WeaponEntity } from "@archivist-gg/dnd5e/weapon/weapon.types";
|
|
3
|
+
import { type ProficiencyKind } from "./pc.proficiency-normalize.js";
|
|
2
4
|
import { type ProficiencyEntry, type ProficiencyGrant } from "./pc.proficiency-grants.js";
|
|
3
|
-
/** Re-exported for the plugin: both types are DECLARED in the leaf so that
|
|
4
|
-
* pc.decision-engine can reference them without importing this module, which
|
|
5
|
-
* would close a cycle (spec §4.3). */
|
|
6
5
|
export type { ProficiencyEntry, ProficiencyOrigin } from "./pc.proficiency-grants.js";
|
|
7
|
-
/** Every bucket carries provenance (spec §7.1). `languages`/`tools` ARE
|
|
8
|
-
* {@link computeEffectiveProficiencies}' output, unmodified · `armor`/`weapons`
|
|
9
|
-
* are composed below from the raw grant walk, because they have no vocabulary
|
|
10
|
-
* constant to canonicalize against (spec §3.3's second rule) · and for `weapons`
|
|
11
|
-
* that grant walk is followed by the chosen `select-entity{weapon}` picks
|
|
12
|
-
* (R4-G3b §7 F5), which land with origin `pick`. */
|
|
13
6
|
export interface ProficiencyAggregate {
|
|
14
7
|
armor: ProficiencyEntry[];
|
|
15
8
|
weapons: ProficiencyEntry[];
|
|
16
9
|
tools: ProficiencyEntry[];
|
|
17
10
|
languages: ProficiencyEntry[];
|
|
18
11
|
}
|
|
19
|
-
/** Normalized intermediate of every proficiency/language source the DISPLAY path
|
|
20
|
-
* reads, in one place. Among the ENTITY branches only the class one is a live
|
|
21
|
-
* proficiency source today (race/bg/feat `.proficiencies` object fields do not
|
|
22
|
-
* exist on those entities); race languages, bg tool/lang, and feat grants read
|
|
23
|
-
* their real fields, and the four `effect*` buckets carry what a feature's
|
|
24
|
-
* `kind: "proficiency"` effects grant · that is the live path a 2014 race trait
|
|
25
|
-
* actually uses (R4-P3c). Chosen picks come from the single decision walk in
|
|
26
|
-
* pc.decision-engine so display can never diverge from the persisted picks.
|
|
27
|
-
*
|
|
28
|
-
* Every grant bucket carries `{value, source}` rather than a bare value: the
|
|
29
|
-
* walk holds the granting entity and the aggregate needs it to fill
|
|
30
|
-
* `ProficiencyEntry.sources` for armor and weapons (spec §7.1). The
|
|
31
|
-
* language/tool grant buckets are still surfaced here for completeness, but
|
|
32
|
-
* the aggregate no longer reads them · languages and tools come from
|
|
33
|
-
* computeEffectiveProficiencies, which does its own grant walk so that
|
|
34
|
-
* suppressions and manual adds can never be skipped by a second composer.
|
|
35
|
-
*
|
|
36
|
-
* These names are RE-DECLARED by hand rather than inherited: this interface
|
|
37
|
-
* does not `extends ProficiencyGrants`, so a bucket added to the grant walk
|
|
38
|
-
* stays invisible here until it is added here too. `collectProficiencySources`
|
|
39
|
-
* spreads the grants object, so an undeclared bucket still flows at RUNTIME ·
|
|
40
|
-
* the compiler is the only thing that notices, and only where the field is
|
|
41
|
-
* read. Nothing iterates these objects with Object.keys/values/entries, so a
|
|
42
|
-
* declaration gap is inert rather than corrupting; it is still a gap. */
|
|
43
12
|
export interface ProficiencySources {
|
|
44
13
|
classArmor: ProficiencyGrant[];
|
|
45
14
|
classWeaponFixed: ProficiencyGrant[];
|
|
@@ -62,3 +31,8 @@ export interface ProficiencySources {
|
|
|
62
31
|
}
|
|
63
32
|
export declare function collectProficiencySources(resolved: ResolvedCharacter): ProficiencySources;
|
|
64
33
|
export declare function aggregateProficiencies(resolved: ResolvedCharacter): ProficiencyAggregate;
|
|
34
|
+
export declare function proficiencyOverview(resolved: ResolvedCharacter, kind: ProficiencyKind): {
|
|
35
|
+
effective: ProficiencyEntry[];
|
|
36
|
+
removed: ProficiencyEntry[];
|
|
37
|
+
};
|
|
38
|
+
export declare function weaponCoveredBy(effective: readonly ProficiencyEntry[], weapon: Pick<WeaponEntity, "category" | "properties" | "range" | "slug">): ProficiencyEntry | undefined;
|
|
@@ -1,107 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
collectChosenProficiencies,
|
|
3
|
-
collectProficiencyGrants,
|
|
4
|
-
computeEffectiveProficiencies
|
|
5
|
-
} from "../chunk-ONTGZR5T.js";
|
|
6
|
-
import "../chunk-2LULMQTF.js";
|
|
7
|
-
import "../chunk-H5PTKYXL.js";
|
|
8
|
-
import "../chunk-TULQ4FFX.js";
|
|
9
|
-
import "../chunk-TOM66P2P.js";
|
|
10
|
-
import "../chunk-KU3YLF6D.js";
|
|
11
|
-
import "../chunk-HTYMW5CH.js";
|
|
12
|
-
import "../chunk-KSTV7J2U.js";
|
|
13
|
-
import "../chunk-DPUJDOKV.js";
|
|
14
|
-
import "../chunk-LBEXLN6I.js";
|
|
15
|
-
import {
|
|
16
|
-
proficiencyLabel,
|
|
17
|
-
toProfSlug
|
|
18
|
-
} from "../chunk-RLGQ5PZZ.js";
|
|
19
|
-
import "../chunk-3VZZDKRA.js";
|
|
20
|
-
import "../chunk-W6GC6OKK.js";
|
|
21
|
-
import "../chunk-B3DP42OM.js";
|
|
22
|
-
import "../chunk-IUAAXXNO.js";
|
|
23
|
-
import "../chunk-YHYTW5QA.js";
|
|
24
|
-
import "../chunk-VRV3NNTA.js";
|
|
25
|
-
import "../chunk-PVCEA4HZ.js";
|
|
26
|
-
import "../chunk-IHE6KVC3.js";
|
|
27
|
-
import "../chunk-LHZXYFBU.js";
|
|
28
|
-
import "../chunk-YBLDE5CG.js";
|
|
29
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
30
|
-
import "../chunk-LVQLWRCU.js";
|
|
31
|
-
import "../chunk-CM5CWO4K.js";
|
|
32
|
-
import "../chunk-EVMUJYUD.js";
|
|
33
|
-
import "../chunk-VTTA2ALZ.js";
|
|
34
|
-
import "../chunk-ZCTUYGNV.js";
|
|
35
|
-
import "../chunk-7Q2VPKCD.js";
|
|
36
|
-
import "../chunk-ZDAEGJH4.js";
|
|
37
|
-
import "../chunk-3TM34RSJ.js";
|
|
38
|
-
import "../chunk-PDJSUH24.js";
|
|
39
|
-
import "../chunk-WELIKLZF.js";
|
|
40
|
-
import "../chunk-4U55VNC7.js";
|
|
41
|
-
import "../chunk-UA5KS2PL.js";
|
|
42
|
-
|
|
43
|
-
// src/pc/pc.proficiencies.ts
|
|
44
|
-
function collectProficiencySources(resolved) {
|
|
45
|
-
const g = collectProficiencyGrants(resolved);
|
|
46
|
-
const chosen = collectChosenProficiencies(resolved);
|
|
47
|
-
return {
|
|
48
|
-
...g,
|
|
49
|
-
chosenLanguages: chosen.languages,
|
|
50
|
-
chosenTools: chosen.tools,
|
|
51
|
-
chosenWeapons: chosen.weapons
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function aggregateProficiencies(resolved) {
|
|
55
|
-
const src = collectProficiencySources(resolved);
|
|
56
|
-
const effective = computeEffectiveProficiencies(resolved);
|
|
57
|
-
return {
|
|
58
|
-
// Walk order defines `sources` order (spec §4.1): class before feats, and
|
|
59
|
-
// for weapons the class `fixed` names before the class categories, matching
|
|
60
|
-
// the insertion order of the bucket this replaced, exactly.
|
|
61
|
-
//
|
|
62
|
-
// Effect buckets go LAST: first-seen wins the dedupe key, so an existing
|
|
63
|
-
// class or feat grant keeps its shipped spelling and label and the effect
|
|
64
|
-
// only appends its source name. Reordering these silently relabels rows.
|
|
65
|
-
//
|
|
66
|
-
// The chosen weapon PICKS are the second argument, so they are seeded after
|
|
67
|
-
// every grant bucket: a weapon both granted and picked stays ONE row that
|
|
68
|
-
// keeps origin `grant` and its granting source(s) (R4-G3b §7 F5 · the same
|
|
69
|
-
// grants-then-picks order computeEffectiveProficiencies uses for the
|
|
70
|
-
// language and tool buckets). Armor passes none.
|
|
71
|
-
armor: composeGrantEntries([src.classArmor, src.featArmor, src.effectArmor]),
|
|
72
|
-
weapons: composeGrantEntries([src.classWeaponFixed, src.classWeaponCategories, src.featWeapons, src.effectWeapons], src.chosenWeapons),
|
|
73
|
-
tools: effective.tools,
|
|
74
|
-
languages: effective.languages
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
function composeGrantEntries(buckets, picks = []) {
|
|
78
|
-
const byKey = /* @__PURE__ */ new Map();
|
|
79
|
-
for (const bucket of buckets) {
|
|
80
|
-
for (const g of bucket) {
|
|
81
|
-
const key = toProfSlug(g.value);
|
|
82
|
-
const existing = byKey.get(key);
|
|
83
|
-
if (!existing) {
|
|
84
|
-
byKey.set(key, {
|
|
85
|
-
value: g.value,
|
|
86
|
-
label: prettyName(g.value),
|
|
87
|
-
sources: [g.source],
|
|
88
|
-
origin: "grant"
|
|
89
|
-
});
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
if (!existing.sources.includes(g.source)) existing.sources.push(g.source);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
for (const v of picks) {
|
|
96
|
-
const k = toProfSlug(v);
|
|
97
|
-
if (!byKey.has(k)) byKey.set(k, { value: v, label: prettyName(v), sources: [], origin: "pick" });
|
|
98
|
-
}
|
|
99
|
-
return [...byKey.values()].sort((a, b) => a.label < b.label ? -1 : a.label > b.label ? 1 : 0);
|
|
100
|
-
}
|
|
101
|
-
function prettyName(slug) {
|
|
102
|
-
return proficiencyLabel(slug);
|
|
103
|
-
}
|
|
104
|
-
export {
|
|
105
|
-
aggregateProficiencies,
|
|
106
|
-
collectProficiencySources
|
|
107
|
-
};
|
|
1
|
+
import{qualifiedGrantCovers}from"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import{collectChosenProficiencies,collectProficiencyGrants,computeEffectiveProficiencies,computeSuppressedProficiencies}from"../chunk-IGVRLGLM.js";import"../chunk-2EOGK6R6.js";import"../chunk-RQZCGXUZ.js";import"../chunk-PQAVMK3T.js";import"../chunk-HCK6IUB3.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import{normKey,proficiencyKey,proficiencyLabel,toProfSlug,weaponProfKey}from"../chunk-VTQ4RWEG.js";import"../chunk-QBA757AU.js";import"../chunk-A7H6LX47.js";import"../chunk-UBUKCRZ3.js";import"../chunk-PZUPZBTN.js";import"../chunk-NI364WV7.js";import"../chunk-QVWT67WA.js";import"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.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-6IC53O3Q.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,25 +1,12 @@
|
|
|
1
1
|
import type { ResolvedCharacter } from "./pc.types.js";
|
|
2
2
|
export type ProficiencyOrigin = "grant" | "pick" | "manual" | "custom";
|
|
3
3
|
export interface ProficiencyEntry {
|
|
4
|
-
/** Canonical slug when the value lands on the domain vocabulary, else the raw string. Spec §3.3. */
|
|
5
4
|
value: string;
|
|
6
|
-
/** Display form. Spec §3.3's first code block (languages/tools) or second (armor/weapons). */
|
|
7
5
|
label: string;
|
|
8
|
-
/** EVERY granting entity's display name, in walk order: class, race,
|
|
9
|
-
* background, feats, then feature EFFECTS last (R4-P3c · both composers order
|
|
10
|
-
* the effect bucket last so a first-seen entity grant keeps its own label). */
|
|
11
6
|
sources: string[];
|
|
12
7
|
origin: ProficiencyOrigin;
|
|
13
|
-
/** R4-G4 §9: tool expertise rides the grant channel (the ONE channel the panel
|
|
14
|
-
* and the modal read); the manual tri `overrides.tools.proficiency` (spec §9.3,
|
|
15
|
-
* Tier B) is its second writer, applied in `computeEffectiveProficiencies`.
|
|
16
|
-
* ABSENT rather than `false` on a plain entry. */
|
|
17
8
|
expertise?: boolean;
|
|
18
9
|
}
|
|
19
|
-
/** One granted value plus the display name of the entity that granted it.
|
|
20
|
-
* `expertise` is present (and `true`) only when the granting effect authored it
|
|
21
|
-
* (R4-G4 §9.2), so a plain grant keeps the exact two-key shape every pre-phase
|
|
22
|
-
* reader was written against. */
|
|
23
10
|
export interface ProficiencyGrant {
|
|
24
11
|
value: string;
|
|
25
12
|
source: string;
|
|
@@ -42,17 +29,4 @@ export interface ProficiencyGrants {
|
|
|
42
29
|
effectTools: ProficiencyGrant[];
|
|
43
30
|
effectLanguages: ProficiencyGrant[];
|
|
44
31
|
}
|
|
45
|
-
/** Every FIXED proficiency/language a character's entities grant, each paired
|
|
46
|
-
* with the display name of the entity that granted it. Walk order is
|
|
47
|
-
* class → race → background → feats, and that order defines `sources` ordering
|
|
48
|
-
* downstream (spec §4.1).
|
|
49
|
-
*
|
|
50
|
-
* This module is a LEAF on purpose: it must import nothing from the decision
|
|
51
|
-
* engine module, so that the engine can import it without a cycle. NOT enforced
|
|
52
|
-
* by any test or lint rule · a previous comment claimed a grep guard that has
|
|
53
|
-
* never existed. It is a convention, and this phase adds a feature-effects
|
|
54
|
-
* import that is cycle-free by inspection, not by tooling.
|
|
55
|
-
* The walk returns raw `{value, source}` buckets and nothing else · no
|
|
56
|
-
* humanizing, no sorting, no dedupe. Label composition stays with the
|
|
57
|
-
* module-private `prettyName` in `pc.proficiencies.ts` (spec §7.1). */
|
|
58
32
|
export declare function collectProficiencyGrants(resolved: ResolvedCharacter): ProficiencyGrants;
|
|
@@ -1,29 +1,8 @@
|
|
|
1
|
-
/** Normalized token-set key for matching class weapon DISPLAY names ("hand crossbows")
|
|
2
|
-
* against weapon-entity names ("Crossbow, hand"). EXACT equality on the key; verified
|
|
3
|
-
* collision-free across the SRD weapon set. Strip-"s" singularizer does not handle
|
|
4
|
-
* irregular plurals; no SRD weapon triggers that. */
|
|
5
1
|
export declare const normKey: (s: string) => string;
|
|
6
|
-
/** Canonical proficiency slug: lowercase, curly apostrophe folded to ASCII,
|
|
7
|
-
* whitespace collapsed to hyphens. Universally idempotent (one pass removes all
|
|
8
|
-
* whitespace) and the IDENTITY over ALL_SKILL_SLUGS / ALL_LANGUAGES / ALL_TOOLS,
|
|
9
|
-
* which are already canonical. The fold list is deliberately U+2019-only: no SRD
|
|
10
|
-
* tool name contains any other non-ASCII character. */
|
|
11
2
|
export declare const toProfSlug: (s: string) => string;
|
|
12
|
-
/** Apostrophe-safe title case: capitalizes only at start-of-string or after
|
|
13
|
-
* whitespace, never after `'` (so "smith's-tools" reads "Smith's Tools", not
|
|
14
|
-
* "Smith'S Tools"). Intentionally the same body as the plugin's humanizeSlug.
|
|
15
|
-
* The divergence that matters is one level up: prettyName is
|
|
16
|
-
* humanizeProficiency(toProfSlug(x)), and the U+2019 fold lives in toProfSlug.
|
|
17
|
-
* Do NOT "simplify" prettyName to a bare humanizer call · that reintroduces
|
|
18
|
-
* the duplicate-row defect (one proficiency rendering as two rows). */
|
|
19
3
|
export declare const humanizeProficiency: (s: string) => string;
|
|
20
|
-
/** The display label for one AUTHORED proficiency value that no vocabulary canonicalizes (R4-G7 T8 RIDER-14).
|
|
21
|
-
* The rule reads the value's SHAPE, never a word list:
|
|
22
|
-
* - a value with no whitespace is a slug ("thieves'-tools", "heavy"), and a phrase with no uppercase letter
|
|
23
|
-
* ("hand crossbows") carries no authored casing and shares its slug's `toProfSlug` key: both keep today's
|
|
24
|
-
* `humanizeProficiency(toProfSlug(raw))` (the fold and the apostrophe rule of the composition above);
|
|
25
|
-
* - a phrase that carries authored uppercase is PROSE ("Martial weapons that have the Light property",
|
|
26
|
-
* "... the 2H or H property") and prints as authored: U+2019 folded to ASCII, whitespace trimmed and collapsed,
|
|
27
|
-
* the first character capitalised, every other letter untouched. Title-casing it word by word lower-cased
|
|
28
|
-
* `2H` to `2h` and read "That Have The Light Property". */
|
|
29
4
|
export declare const proficiencyLabel: (raw: string) => string;
|
|
5
|
+
export type ProficiencyKind = "armor" | "weapons" | "tools" | "languages";
|
|
6
|
+
export declare const weaponProfKey: (raw: string) => string;
|
|
7
|
+
export declare const armorProfKey: (raw: string) => string;
|
|
8
|
+
export declare const proficiencyKey: (kind: ProficiencyKind, raw: string) => string;
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
humanizeProficiency,
|
|
3
|
-
normKey,
|
|
4
|
-
proficiencyLabel,
|
|
5
|
-
toProfSlug
|
|
6
|
-
} from "../chunk-RLGQ5PZZ.js";
|
|
7
|
-
export {
|
|
8
|
-
humanizeProficiency,
|
|
9
|
-
normKey,
|
|
10
|
-
proficiencyLabel,
|
|
11
|
-
toProfSlug
|
|
12
|
-
};
|
|
1
|
+
import{armorProfKey,humanizeProficiency,normKey,proficiencyKey,proficiencyLabel,toProfSlug,weaponProfKey}from"../chunk-VTQ4RWEG.js";export{armorProfKey,humanizeProficiency,normKey,proficiencyKey,proficiencyLabel,toProfSlug,weaponProfKey};
|
|
@@ -6,19 +6,6 @@ interface ProficienciesForQuery {
|
|
|
6
6
|
weapons: ProficiencySet;
|
|
7
7
|
tools: ProficiencySet;
|
|
8
8
|
}
|
|
9
|
-
/** NOT the live weapon gate · that is `isWeaponSlugProficient` in
|
|
10
|
-
* `pc.equipment.ts`, reached from `computeAttacks`. The two are near-twins,
|
|
11
|
-
* NOT aliases: that function's docblock records where their matching diverges,
|
|
12
|
-
* so anything asserting runtime behaviour must call it, not this one. */
|
|
13
9
|
export declare function isProficientWithWeapon(weapon: WeaponEntity, profs: ProficienciesForQuery): boolean;
|
|
14
|
-
/** No live armor gate exists at all · nothing in the product gates on armor
|
|
15
|
-
* proficiency today (`computeAppliedBonuses` takes `_profs` and ignores it),
|
|
16
|
-
* so this has no production caller either. Do NOT read that as "the
|
|
17
|
-
* `.specific` branch is dead": `normalizeArmorProf` in `pc.recalc.ts` routes
|
|
18
|
-
* an authored `armor: { specific: [...] }` block straight into it. No SRD
|
|
19
|
-
* entity uses that object form for armor yet, but `weapons:` and `tools:`
|
|
20
|
-
* already do in the same `proficiencies:` block, so it is one plausible
|
|
21
|
-
* keystroke away · and the function is published API besides. Trimming that
|
|
22
|
-
* branch could silently regress either. */
|
|
23
10
|
export declare function isProficientWithArmor(armor: ArmorEntity, profs: ProficienciesForQuery): boolean;
|
|
24
11
|
export {};
|