@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
|
@@ -1,54 +1,11 @@
|
|
|
1
1
|
import type { RegisteredEntity } from "@archivist-gg/core";
|
|
2
2
|
import type { Choice, Ability } from "../types/choice.js";
|
|
3
|
-
/**
|
|
4
|
-
* Normalizes the authored two-step "Ability Score Increase or Feat" decision
|
|
5
|
-
* into the flat feat pick the product now uses.
|
|
6
|
-
*
|
|
7
|
-
* This is a PERMANENT compatibility layer, not a migration shim: hand-authored
|
|
8
|
-
* homebrew (e.g. `Compendium/MCDM/Classes/Illrigger.md`, which no bundle copy
|
|
9
|
-
* can ever overwrite) keeps emitting the two-step shape, and `choiceSchema`
|
|
10
|
-
* deliberately keeps accepting it.
|
|
11
|
-
*
|
|
12
|
-
* The lifted choice is the AUTHORED inner one, returned verbatim, so a homebrew
|
|
13
|
-
* variant carrying its own `where` / `count` / `label` survives. When the feat
|
|
14
|
-
* branch carries more than one child choice the whole choice is returned
|
|
15
|
-
* untouched, because lifting would silently drop the sibling.
|
|
16
|
-
*
|
|
17
|
-
* Pure: never mutates its input, never synthesizes a new object.
|
|
18
|
-
*/
|
|
19
3
|
export declare function flattenAsiOrFeat(choice: Choice): Choice;
|
|
20
|
-
/** The structural registry read `resolveLegacyAsiFeat` makes; the ledger's DecisionRegistry and core's EntityRegistry both
|
|
21
|
-
* satisfy it. */
|
|
22
4
|
type FeatSearch = {
|
|
23
5
|
search(query: string, entityType: string, limit: number): RegisteredEntity[];
|
|
24
6
|
};
|
|
25
|
-
/**
|
|
26
|
-
* The legacy ASI-branch allocation a class level SAVED, or null (H234 H4(2), spec §5.2 item 1): the SHEET's predicate,
|
|
27
|
-
* which `collectClassAsiBranch` (pc.recalc.ts) folds per level, and the base of the Builder's {@link convertibleLegacyAsi}.
|
|
28
|
-
*
|
|
29
|
-
* Non-null exactly when `block` is an object whose `feat` is NOT a string and whose `asi` is a non-array object with at
|
|
30
|
-
* least one numeric ability entry; returns a FRESH object of those entries. It ignores `asi-or-feat`, so an explicit
|
|
31
|
-
* `"feat"` branch with no feat picked still folds on the sheet, as it always has.
|
|
32
|
-
*
|
|
33
|
-
* A string `feat` beside an `asi` is R4-P4 Decision B's orphan (the level took the feat branch and the picker never cleared
|
|
34
|
-
* the abandoned branch's child keys): null. Do NOT loosen the test to `"feat" in block` or a `startsWith("feat")` prefix
|
|
35
|
-
* test: the first strands a non-string `feat` (a legacy hand edit) with no fold at all, the second skips every
|
|
36
|
-
* correctly-flattened block. The `typeof … === "string"` test MIRRORS `collectClassFeatAbilityPoints`' own gate, so the two
|
|
37
|
-
* can never both decline on this predicate (they can both decline when the feat slug resolves to no entity: an
|
|
38
|
-
* unresolvable pick grants nothing, by design).
|
|
39
|
-
*/
|
|
40
7
|
export declare function legacyAsiBranch(block: unknown): Partial<Record<Ability, number>> | null;
|
|
41
|
-
/** The BUILDER's predicate (spec §5.2 item 2, Gate 1 M-9): {@link legacyAsiBranch} when `asi-or-feat` is absent or
|
|
42
|
-
* `"asi"`, else null. An explicit `"feat"` branch is a two-step pick in progress (a homebrew non-flattenable two-step keeps
|
|
43
|
-
* `asi-or-feat` as its own row's key), so the Builder neither aliases nor converts it and today's orphan rule applies.
|
|
44
|
-
* The ledger alias and {@link migrateLegacyAsiLevel} both use THIS predicate, so an aliased row never receives an inert
|
|
45
|
-
* write. The sheet's fold keeps the value-agnostic {@link legacyAsiBranch}. */
|
|
46
8
|
export declare function convertibleLegacyAsi(block: unknown): Partial<Record<Ability, number>> | null;
|
|
47
|
-
/** The ASI feat a class answers a legacy level with, deterministically (spec §5.3, Gate 0 M-7). Candidates: the registered
|
|
48
|
-
* feats whose bare slug is `ability-score-improvement` and which carry an `ability-points` choice with a string `id`.
|
|
49
|
-
* Rank: (1) the class entity's slug prefix (the pool collapse's identity rule), (2) the class entity's edition, (3)
|
|
50
|
-
* ascending slug in code-unit order. `childId` is that choice's own `id`, read from the data. Null with no candidate or no
|
|
51
|
-
* class entity. A pure function of (registry, class entity), so the ledger alias and the write path always agree. */
|
|
52
9
|
export declare function resolveLegacyAsiFeat(registry: FeatSearch, classEntity: {
|
|
53
10
|
slug: string;
|
|
54
11
|
edition?: string;
|
|
@@ -56,22 +13,6 @@ export declare function resolveLegacyAsiFeat(registry: FeatSearch, classEntity:
|
|
|
56
13
|
slug: string;
|
|
57
14
|
childId: string;
|
|
58
15
|
} | null;
|
|
59
|
-
/**
|
|
60
|
-
* The level block to store BEFORE a Builder edit applies, or null for "no conversion" (spec §5.2 item 4, §5.5). The plugin's
|
|
61
|
-
* `setChoice` calls it for EVERY write with the edit's key and value (Gate 1 M-8), so the `feat` vocabulary stays here.
|
|
62
|
-
*
|
|
63
|
-
* Null when the key is neither `feat` nor `feat:`-prefixed, when the block is not a convertible legacy level
|
|
64
|
-
* ({@link convertibleLegacyAsi}), or when the class has no ASI feat ({@link resolveLegacyAsiFeat}). Else a NEW object:
|
|
65
|
-
* every key of `block` except `asi-or-feat`, `asi` and `feat:<childId>`, plus `feat: <the ASI slug>`, plus
|
|
66
|
-
* `feat:<childId>: <the legacy allocation>` UNLESS the edit is a SWITCH: `key === "feat"` with any value other than the
|
|
67
|
-
* ASI slug, so a pick of another feat (Gate 1 I-1, ruled option (a)) and the chip removal (null / undefined; final
|
|
68
|
-
* review, Review 3 m6, ruled) both count. A switch writes no `feat:<childId>` at all, so the legacy points and any
|
|
69
|
-
* stale child are dropped and the level's pick stays open (the new feat's own, or the removed ASI's), which is what
|
|
70
|
-
* today's orphan rule does for a switch; a chip removal is therefore not reversible, and re-picking the ASI feat after
|
|
71
|
-
* it starts open. The stepper and a re-pick of the ASI feat keep the full conversion, where the legacy allocation
|
|
72
|
-
* overwrites a stale child. Other keys at the level are kept untouched; the input is never mutated. An over-allocated
|
|
73
|
-
* legacy level is copied verbatim and then clamped by the feat's own rules when the sheet folds it (Gate 1 M-10).
|
|
74
|
-
*/
|
|
75
16
|
export declare function migrateLegacyAsiLevel(block: unknown, key: string, value: unknown, registry: FeatSearch, classEntity: {
|
|
76
17
|
slug: string;
|
|
77
18
|
edition?: string;
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
convertibleLegacyAsi,
|
|
3
|
-
flattenAsiOrFeat,
|
|
4
|
-
legacyAsiBranch,
|
|
5
|
-
migrateLegacyAsiLevel,
|
|
6
|
-
resolveLegacyAsiFeat
|
|
7
|
-
} from "../chunk-LBEXLN6I.js";
|
|
8
|
-
import "../chunk-ZCTUYGNV.js";
|
|
9
|
-
import "../chunk-WELIKLZF.js";
|
|
10
|
-
export {
|
|
11
|
-
convertibleLegacyAsi,
|
|
12
|
-
flattenAsiOrFeat,
|
|
13
|
-
legacyAsiBranch,
|
|
14
|
-
migrateLegacyAsiLevel,
|
|
15
|
-
resolveLegacyAsiFeat
|
|
16
|
-
};
|
|
1
|
+
import{convertibleLegacyAsi,flattenAsiOrFeat,legacyAsiBranch,migrateLegacyAsiLevel,resolveLegacyAsiFeat}from"../chunk-QVWT67WA.js";import"../chunk-63YJPWTM.js";import"../chunk-EVT7MGAC.js";export{convertibleLegacyAsi,flattenAsiOrFeat,legacyAsiBranch,migrateLegacyAsiLevel,resolveLegacyAsiFeat};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { CharacterState, Edition, ConditionEffects } from "./pc.types.js";
|
|
2
2
|
import type { Ability } from "@archivist-gg/dnd5e";
|
|
3
3
|
export declare function computeConditionEffects(state: CharacterState, edition: Edition, _scores: Record<Ability, number>): ConditionEffects;
|
|
4
|
+
export declare function speedConditionNames(state: CharacterState, edition: Edition): string[];
|
package/dist/pc/pc.conditions.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { EntityRegistry } from "@archivist-gg/core";
|
|
2
2
|
import type { EquipmentEntry } from "./pc.types.js";
|
|
3
|
-
/** I2a · containment (spec 2026-09-24-inv-i2a-containment-data-design.md §4). The equipment array stays FLAT; an entry
|
|
4
|
-
* sits inside another through `in: <id>`. What counts as a container is the item's `container` data
|
|
5
|
-
* (isContainerItem), never a name list. */
|
|
6
3
|
export type ContainmentBreak = "equipped" | "missing" | "self" | "unresolved" | "not-container" | "cycle";
|
|
7
4
|
export interface ContainmentView {
|
|
8
5
|
parentOf: ReadonlyArray<number | null>;
|
|
@@ -16,8 +13,6 @@ export interface ContainmentView {
|
|
|
16
13
|
}>;
|
|
17
14
|
}
|
|
18
15
|
export declare function nonEmptyRef(v: unknown): string | null;
|
|
19
|
-
/** `container.holds_items` decides when present; otherwise a weight or item capacity, or weightless contents, make a
|
|
20
|
-
* container. A pack_contents-only block (a pack) and a volume-only block (a liquid holder) are not containers. */
|
|
21
16
|
export declare function isContainerItem(entity: unknown): boolean;
|
|
22
17
|
export declare function idOwners(equipment: readonly EquipmentEntry[]): {
|
|
23
18
|
ownerOfId: Map<string, number>;
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
canMoveInto,
|
|
3
|
-
ensureEntryId,
|
|
4
|
-
entityOfEntry,
|
|
5
|
-
idOwners,
|
|
6
|
-
isContainerItem,
|
|
7
|
-
moveInto,
|
|
8
|
-
nonEmptyRef,
|
|
9
|
-
repairContainment,
|
|
10
|
-
resolveContainment
|
|
11
|
-
} from "../chunk-EJP263OP.js";
|
|
12
|
-
import "../chunk-CM5CWO4K.js";
|
|
13
|
-
import "../chunk-ZCTUYGNV.js";
|
|
14
|
-
export {
|
|
15
|
-
canMoveInto,
|
|
16
|
-
ensureEntryId,
|
|
17
|
-
entityOfEntry,
|
|
18
|
-
idOwners,
|
|
19
|
-
isContainerItem,
|
|
20
|
-
moveInto,
|
|
21
|
-
nonEmptyRef,
|
|
22
|
-
repairContainment,
|
|
23
|
-
resolveContainment
|
|
24
|
-
};
|
|
1
|
+
import{canMoveInto,ensureEntryId,entityOfEntry,idOwners,isContainerItem,moveInto,nonEmptyRef,repairContainment,resolveContainment}from"../chunk-4E2GIWJE.js";import"../chunk-PZ4L2EEG.js";import"../chunk-63YJPWTM.js";export{canMoveInto,ensureEntryId,entityOfEntry,idOwners,isContainerItem,moveInto,nonEmptyRef,repairContainment,resolveContainment};
|
|
@@ -12,97 +12,28 @@ export interface ResolvedOption {
|
|
|
12
12
|
value: string;
|
|
13
13
|
label: string;
|
|
14
14
|
entity?: RegisteredEntity;
|
|
15
|
-
/** The option's own prose (a select-inline InlineOption may supply one — e.g. each
|
|
16
|
-
* Combat Mastery describes what it does). Surfaced by the strip near the chips. */
|
|
17
15
|
description?: string;
|
|
18
|
-
/** True when a `from` slug has no entity behind it — render visible-but-inert. */
|
|
19
16
|
missing?: boolean;
|
|
20
|
-
/** True when this option is a STORED pick that no longer answers to the pool's collapsed candidate list
|
|
21
|
-
* (R4-G5 §3.2.3): a genuine prerequisite-failing pick, since §9.2.3 already rewrote every collapsed twin to
|
|
22
|
-
* its survivor. Stamped by the pool synth from `strandedPicks`, never by `enumerateOptions`, which stays pure
|
|
23
|
-
* over `(choice, ctx, ownerBare)` and cannot see the character. Both builder arms dress such an option with
|
|
24
|
-
* the unresolved (crimson req) marker and the sheet's "prerequisite unmet" wording; the picker modal still
|
|
25
|
-
* lists it as an ordinary candidate. */
|
|
26
17
|
stranded?: boolean;
|
|
27
18
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Status contract: over-selection (n > need) reports `resolved` — the engine
|
|
30
|
-
* never reports an error for too many picks; the picker UI owns cap enforcement.
|
|
31
|
-
* A pick that FOLDS into proficiencies never over-selects, though: {@link capAtCount}
|
|
32
|
-
* keeps its first `count` stored values, in the ledger and the fold alike.
|
|
33
|
-
* Likewise for ability-points `max_per`: the engine only sums total points
|
|
34
|
-
* allocated, so per-ability caps are picker-enforced, not reflected here.
|
|
35
|
-
*/
|
|
36
19
|
export type DecisionStatus = "resolved" | "partial" | "unresolved" | "informational";
|
|
37
20
|
export interface DecisionItem {
|
|
38
21
|
key: string;
|
|
39
22
|
source: FeatureSource;
|
|
40
23
|
level: number;
|
|
41
24
|
featureName: string;
|
|
42
|
-
/**
|
|
43
|
-
* The source feature/trait's own description (race trait, background feature,
|
|
44
|
-
* class feature) — threaded through from the walk that emits the item so the
|
|
45
|
-
* decision strip can render it as a quiet markdown block at the top of the
|
|
46
|
-
* row's nest (smoke r7). Top-level rows only; a child inherits NOTHING from
|
|
47
|
-
* its parent — it carries the sub-choice option's own `description` (when the
|
|
48
|
-
* authored InlineOption supplies one) or none.
|
|
49
|
-
*/
|
|
50
25
|
description?: string;
|
|
51
|
-
/**
|
|
52
|
-
* When `status === "informational"` this is a placeholder sentinel and MUST
|
|
53
|
-
* NOT be rendered — informational items render from `featureName` only
|
|
54
|
-
* (Task 16 contract). For every other status it is the real choice to render.
|
|
55
|
-
*/
|
|
56
26
|
choice: Choice;
|
|
57
27
|
options: ResolvedOption[];
|
|
58
28
|
selected: ChoiceValue | undefined;
|
|
59
29
|
status: DecisionStatus;
|
|
60
|
-
/**
|
|
61
|
-
* True when this choice has nothing left to grant: every proficiency it could
|
|
62
|
-
* have offered is one the character ALREADY holds (on an `expertise` skill row,
|
|
63
|
-
* already holds AT EXPERTISE), so the exclusion filter (spec §5, widened to
|
|
64
|
-
* those rows by R4-G3b §7 F4) emptied its pool. Such a row is complete, not an
|
|
65
|
-
* open obligation the user has no way to discharge.
|
|
66
|
-
*
|
|
67
|
-
* Deliberately NOT a bare `options.length === 0`. FOUR other shapes reach
|
|
68
|
-
* zero options and are genuinely still open: a from-LESS `domain:"save"`
|
|
69
|
-
* choice (no pool exists at all · the enumerator's `??` fallback has no save
|
|
70
|
-
* branch, and a save choice that authors `from` does enumerate it), a
|
|
71
|
-
* select-entity whose registry holds no candidates (an empty vault), an
|
|
72
|
-
* authored `from: []`, and a `from_proficient` skill row the R4-G3b §7 F1
|
|
73
|
-
* INCLUSION empties (a fresh L1 Rogue holds no skills yet). Emptied-BY-
|
|
74
|
-
* EXCLUSION is the only one where the character is already whole, so the flag
|
|
75
|
-
* is scoped to select-proficiency in the language and tool domains PLUS
|
|
76
|
-
* `expertise` skill rows (R4-G3b §7 F4; a plain skill row is never excluded
|
|
77
|
-
* and so never satisfied · §14, and saves have no set at all) AND requires the
|
|
78
|
-
* pool to have been non-empty AFTER the F1 INCLUSION ran, not before it ·
|
|
79
|
-
* that fourth shape is the one this clause keeps open, and the next render
|
|
80
|
-
* repopulates it.
|
|
81
|
-
*
|
|
82
|
-
* `false` for every other item, informational ones included.
|
|
83
|
-
*/
|
|
84
30
|
satisfied: boolean;
|
|
85
|
-
/** Present ONLY on a synthesized selection-pool item (R4-G5 §3.2.3): that pool's id and anchor level. It is
|
|
86
|
-
* the TYPED marker every writer keys the pool write canon on (the chips arm, the selection table,
|
|
87
|
-
* `renderLongListBrowse` and `DecisionPickModal`): a pool item persists an ARRAY even at count 1, the shape
|
|
88
|
-
* `PoolTab` writes, while a `feat` or any other pick keeps its string shape. Absent on every other item, so
|
|
89
|
-
* a truthiness test on it IS the discriminator. */
|
|
90
31
|
pool?: {
|
|
91
32
|
id: string;
|
|
92
33
|
anchorLevel: number;
|
|
93
34
|
};
|
|
94
|
-
/** ART-a (spec §5.1, R20): present ONLY on a synthesized pool item whose pool offers a repeatable member: one entry per
|
|
95
|
-
* such member, with its option rows resolved for the per-copy picker (visible candidates only, U-A). */
|
|
96
35
|
repeatable?: RepeatableMember[];
|
|
97
|
-
/**
|
|
98
|
-
* Populated only for the selected branch of a select-inline (the
|
|
99
|
-
* revealed-on-selection rule): a child decision becomes visible once its
|
|
100
|
-
* parent option is chosen. An unresolved child downgrades the parent's
|
|
101
|
-
* status to "partial".
|
|
102
|
-
*/
|
|
103
36
|
children?: DecisionItem[];
|
|
104
|
-
/** D2b-A (design §2.2 step 7): on a child of a pool item, the name of the member the choice belongs to ("Lessons of the
|
|
105
|
-
* First Ones"), so the strip reads "Lessons of the First Ones · Origin feat". Absent everywhere else. */
|
|
106
37
|
parentLabel?: string;
|
|
107
38
|
}
|
|
108
39
|
export interface DecisionLedger {
|
|
@@ -117,48 +48,13 @@ export interface DecisionLedger {
|
|
|
117
48
|
}
|
|
118
49
|
export interface DecisionContext {
|
|
119
50
|
registry: DecisionRegistry;
|
|
120
|
-
/** OPTIONAL visibility predicate. When supplied, ambiguous bare-slug lookups
|
|
121
|
-
* seed VISIBLE entities first, so a hidden compendium can never shadow a
|
|
122
|
-
* visible one that shares a bare slug. Absent (the engine's own tests, any
|
|
123
|
-
* caller that has no notion of hidden compendiums) means deterministic order
|
|
124
|
-
* only — never a behaviour change, because the seeding is total-ordered
|
|
125
|
-
* either way. Threaded plugin-side by the four builder ctx constructors. */
|
|
126
51
|
isEntityVisible?(e: RegisteredEntity): boolean;
|
|
127
52
|
}
|
|
128
|
-
/** `wikilinkTailSlug` MOVED to `entities/slug.ts` in R4-G5 T1, beside `bareEntitySlug`, so `pc.pools.ts` can
|
|
129
|
-
* import it without importing this module (this module imports `pc.pools` for `strandedPicks`; the old
|
|
130
|
-
* direction would be a cycle). The re-export is KEPT because `@archivist-gg/dnd5e/pc/pc.decision-engine` is
|
|
131
|
-
* a published subpath with a plugin importer OF THIS SYMBOL (`components/builder/class-step.ts`, under
|
|
132
|
-
* `packages/obsidian/src/modules/pc/`; the two background surfaces moved to the plugin's `refLabel`, which reads
|
|
133
|
-
* `entities/slug` directly, on 2026-09-25) plus this repo's `pc.resolver.ts` and
|
|
134
|
-
* `tests/wikilink-tail-slug.test.ts`: a public
|
|
135
|
-
* surface, not a migration shim, so the standing "retire every shim" rule does not reach it (spec §17 names the
|
|
136
|
-
* re-export explicitly). */
|
|
137
53
|
export { wikilinkTailSlug };
|
|
138
54
|
declare function matchesFilter(e: RegisteredEntity, where: EntityFilter, ownerBare: string): boolean;
|
|
139
|
-
/** Test-only export of {@link matchesFilter} (Task B2). */
|
|
140
55
|
export declare const __matchesFilterForTest: typeof matchesFilter;
|
|
141
|
-
/** Map a starting-equipment category grant to a nested select-entity child (vocabulary on
|
|
142
|
-
* {@link parseEquipmentCategory}). Weapons filter by weapon_category; armor by armor_category; `shield` is an armor
|
|
143
|
-
* entity in the shield class; a tool category is a MUNDANE item of the category's `type` (magic instruments carry
|
|
144
|
-
* `type: instrument` too).
|
|
145
|
-
*
|
|
146
|
-
* An UNKNOWN category is never guessed. It used to fall through to `weapon_category: "simple"`, which is how the
|
|
147
|
-
* PHB 2024 Bard's "Choose a musical instrument" listed Club, Dagger and Dart. It now yields `from: []`, the
|
|
148
|
-
* engine's existing zero-option shape (an authored empty pool: the row stays open and the strip prints its
|
|
149
|
-
* "No options available" line), and warns ONCE per distinct category. */
|
|
150
56
|
declare function categoryToEntitySelect(category: string, id: string): Choice;
|
|
151
|
-
/** Test-only export of {@link categoryToEntitySelect}. */
|
|
152
57
|
export declare const __categoryToEntitySelectForTest: typeof categoryToEntitySelect;
|
|
153
|
-
/** Walk every decision definition + persisted selection and collect chosen
|
|
154
|
-
* proficiencies. Pure; called by recalc.
|
|
155
|
-
*
|
|
156
|
-
* On the `select-proficiency` arms, values are validated against the decision's
|
|
157
|
-
* option pool via filterToPool: slugs outside `from` are ignored, and a pick
|
|
158
|
-
* matching under canon is kept in the POOL's spelling. The `weapons` arm is the
|
|
159
|
-
* one exception · a `select-entity` pick carries ENTITY slugs, not proficiency
|
|
160
|
-
* slugs, and its `from` is a list of entity slugs, so those values are
|
|
161
|
-
* bare-slugged rather than pool-filtered (R4-G3b §7 F5). */
|
|
162
58
|
export declare function collectChosenProficiencies(resolved: ResolvedCharacter): {
|
|
163
59
|
skills: string[];
|
|
164
60
|
expertise: string[];
|
|
@@ -167,50 +63,17 @@ export declare function collectChosenProficiencies(resolved: ResolvedCharacter):
|
|
|
167
63
|
weapons: string[];
|
|
168
64
|
saves: Ability[];
|
|
169
65
|
};
|
|
170
|
-
/** The single primitive for "what languages/tools does this character actually
|
|
171
|
-
* have": grants + picks + manual adds, MINUS suppressions (spec §4.1).
|
|
172
|
-
*
|
|
173
|
-
* Suppressions are applied INSIDE this function precisely so that no reader can
|
|
174
|
-
* forget them · the sheet panel's display, the builder picker's option
|
|
175
|
-
* exclusion and the "already satisfied" test all read this one function and
|
|
176
|
-
* therefore agree by construction.
|
|
177
|
-
*
|
|
178
|
-
* Built on the grant walk, NEVER on computeProficiencies (spec §4.2): recalc's
|
|
179
|
-
* proficiency fold is missing the race and background grants.
|
|
180
|
-
*
|
|
181
|
-
* ONE argument. `Character.overrides` is non-optional with a schema default, so
|
|
182
|
-
* a second parameter would be redundant and would force an optionality decision
|
|
183
|
-
* at seventeen existing aggregateProficiencies call sites (spec §4.1).
|
|
184
|
-
*
|
|
185
|
-
* SEVENTEEN is a PRE-R4-P3c SNAPSHOT (dnd5e 433cc72 · plugin 90394e9, which this
|
|
186
|
-
* phase never touches), and that is what "existing" means above: the sites that
|
|
187
|
-
* existed when the one-argument decision was taken. It is NOT today's count. Do
|
|
188
|
-
* not re-"correct" it to today's · that number moves on every new test that
|
|
189
|
-
* calls the function, while the cost this sentence is weighing does not.
|
|
190
|
-
*
|
|
191
|
-
* Reproduce the snapshot with `git grep -c "aggregateProficiencies(" <rev>` over
|
|
192
|
-
* *.ts/*.tsx, node_modules and dist excluded: 15 raw lines in dnd5e + 3 in the
|
|
193
|
-
* plugin = 18, minus the DECLARATION in pc.proficiencies.ts = 17 · namely 2
|
|
194
|
-
* production (the plugin's proficiencies-panel and proficiency-edit-modal) + 15
|
|
195
|
-
* in tests (14 in dnd5e, 1 in the plugin's pc-proficiency-edit-modal counting
|
|
196
|
-
* passthrough). Two traps in that census. The plugin's two mock bindings are NOT
|
|
197
|
-
* a subtraction: `aggregateProficiencies:` has no paren, so the pattern never
|
|
198
|
-
* matched them. THIS DOCBLOCK's own backticked mention above IS one, and only
|
|
199
|
-
* from R4-P3c onward · immediately after that phase the same grep returns 20
|
|
200
|
-
* raw, which is 18 call sites once the declaration AND this docblock come off,
|
|
201
|
-
* not the 19 you get by subtracting the declaration alone. */
|
|
202
66
|
export declare function computeEffectiveProficiencies(resolved: ResolvedCharacter): {
|
|
203
67
|
languages: ProficiencyEntry[];
|
|
204
68
|
tools: ProficiencyEntry[];
|
|
205
69
|
};
|
|
70
|
+
export declare function computeSuppressedProficiencies(resolved: ResolvedCharacter): {
|
|
71
|
+
languages: ProficiencyEntry[];
|
|
72
|
+
tools: ProficiencyEntry[];
|
|
73
|
+
};
|
|
206
74
|
export interface OriginAbilityPoints {
|
|
207
75
|
race: Partial<Record<Ability, number>>;
|
|
208
76
|
background: Partial<Record<Ability, number>>;
|
|
209
77
|
}
|
|
210
|
-
/** Pure: folds ORIGIN (race/background) `ability-points` decisions out of
|
|
211
|
-
* origin_choices into per-namespace totals. Values are clamped picker-side
|
|
212
|
-
* already, but clamp again defensively: per-ability max_per, then stop at the
|
|
213
|
-
* points total walking ABILITY_KEYS order. Class-level ASI stays on the
|
|
214
|
-
* legacy choices[lvl].asi path recalc already folds — do not double-count. */
|
|
215
78
|
export declare function collectChosenAbilityPoints(resolved: ResolvedCharacter): OriginAbilityPoints;
|
|
216
79
|
export declare function buildDecisionLedger(resolved: ResolvedCharacter, ctx: DecisionContext): DecisionLedger;
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
__categoryToEntitySelectForTest,
|
|
3
|
-
__matchesFilterForTest,
|
|
4
|
-
buildDecisionLedger,
|
|
5
|
-
collectChosenAbilityPoints,
|
|
6
|
-
collectChosenProficiencies,
|
|
7
|
-
computeEffectiveProficiencies
|
|
8
|
-
} from "../chunk-ONTGZR5T.js";
|
|
9
|
-
import "../chunk-2LULMQTF.js";
|
|
10
|
-
import "../chunk-H5PTKYXL.js";
|
|
11
|
-
import "../chunk-TULQ4FFX.js";
|
|
12
|
-
import "../chunk-TOM66P2P.js";
|
|
13
|
-
import "../chunk-KU3YLF6D.js";
|
|
14
|
-
import "../chunk-HTYMW5CH.js";
|
|
15
|
-
import "../chunk-KSTV7J2U.js";
|
|
16
|
-
import "../chunk-DPUJDOKV.js";
|
|
17
|
-
import "../chunk-LBEXLN6I.js";
|
|
18
|
-
import "../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 {
|
|
35
|
-
wikilinkTailSlug
|
|
36
|
-
} from "../chunk-ZCTUYGNV.js";
|
|
37
|
-
import "../chunk-7Q2VPKCD.js";
|
|
38
|
-
import "../chunk-ZDAEGJH4.js";
|
|
39
|
-
import "../chunk-3TM34RSJ.js";
|
|
40
|
-
import "../chunk-PDJSUH24.js";
|
|
41
|
-
import "../chunk-WELIKLZF.js";
|
|
42
|
-
import "../chunk-4U55VNC7.js";
|
|
43
|
-
import "../chunk-UA5KS2PL.js";
|
|
44
|
-
export {
|
|
45
|
-
__categoryToEntitySelectForTest,
|
|
46
|
-
__matchesFilterForTest,
|
|
47
|
-
buildDecisionLedger,
|
|
48
|
-
collectChosenAbilityPoints,
|
|
49
|
-
collectChosenProficiencies,
|
|
50
|
-
computeEffectiveProficiencies,
|
|
51
|
-
wikilinkTailSlug
|
|
52
|
-
};
|
|
1
|
+
import{__categoryToEntitySelectForTest,__matchesFilterForTest,buildDecisionLedger,collectChosenAbilityPoints,collectChosenProficiencies,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"../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{wikilinkTailSlug}from"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-S5UCI27C.js";import"../chunk-6IC53O3Q.js";import"../chunk-I26FHSI6.js";export{__categoryToEntitySelectForTest,__matchesFilterForTest,buildDecisionLedger,collectChosenAbilityPoints,collectChosenProficiencies,computeEffectiveProficiencies,computeSuppressedProficiencies,wikilinkTailSlug};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canonical key for a defense value (damage type or condition).
|
|
3
|
-
*
|
|
4
|
-
* Deliberately SIMPLER than `toProfSlug` (pc.proficiency-normalize.ts): damage types and conditions carry
|
|
5
|
-
* no apostrophes and no hyphens, so there is no U+2019 fold and no space-to-hyphen step. Do NOT reuse
|
|
6
|
-
* `normKey` · it token-sorts and singularizes for weapon display names and is actively wrong here.
|
|
7
|
-
*
|
|
8
|
-
* The whole point of this function is that ONE normalizer serves every reader and writer on the defenses
|
|
9
|
-
* path. Adding a second is the bug R4-P5 exists to remove.
|
|
10
|
-
*/
|
|
11
1
|
export declare function toDefenseSlug(s: string): string;
|
|
@@ -3,75 +3,17 @@ import type { ActionCost } from "../types/resource.js";
|
|
|
3
3
|
import type { EquipmentEntry, EquipmentEntryState } from "./pc.types.js";
|
|
4
4
|
import { type EntryView } from "./pc.infusions.js";
|
|
5
5
|
export type CustomizableKey = "name" | "charges" | "recovery" | "action" | "range" | "bonus" | "damage_bonus" | "extra_damage" | "ac_bonus" | "resist";
|
|
6
|
-
/** The attack row's cost when the entry stores no `overrides.action` (pc.equipment.ts). */
|
|
7
6
|
export declare const WEAPON_DEFAULT_ACTION_COST: ActionCost;
|
|
8
|
-
/** A weapon, or an item whose `base_item` resolves to a weapon: it fills the main hand and owns an
|
|
9
|
-
* attack row (pc.slotting.ts `defaultSlotForType`). With a view, its rule entity decides (an infused
|
|
10
|
-
* weapon's wrapper routes through its `base_item`). */
|
|
11
7
|
export declare function isWeaponLikeEntry(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): boolean;
|
|
12
|
-
/** The override keys some consumer reads for this entry's type. The Customize card adds every key the
|
|
13
|
-
* entry already STORES (so it can always be cleared); that union is the card's, not this rule's. */
|
|
14
8
|
export declare function customizableOverrideKeys(entry: EquipmentEntry, registry: EntityRegistry | null): Set<CustomizableKey>;
|
|
15
|
-
/** The action cost the sheet shows when no `overrides.action` is stored: the attack row's default for a
|
|
16
|
-
* weapon-like entry; the items row's cost (a view's `action`, the curated cost, or the potion or scroll
|
|
17
|
-
* default) otherwise; else null. With a view, its rule entity decides each read. */
|
|
18
9
|
export declare function defaultActionCost(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): ActionCost | null;
|
|
19
|
-
/** A spell scroll's spell's cost, the registry half of `resolveItemAction`'s scroll default (it has no registry; its
|
|
20
|
-
* two callers do, and pass this as `opts.spellCost`: `defaultActionCost` here and the plugin's Actions collector).
|
|
21
|
-
* The spell is the one the entry sets (`overrides.spell`: a `[[slug]]` wikilink or a bare slug), looked up as the
|
|
22
|
-
* Spells tab looks it up (`collectItemGrantedSpells`); its `casting_time` is read by the ONE casting-time reader. An
|
|
23
|
-
* action, bonus action or reaction is the cost; anything else (a minute or hour cast, no spell set, a spell not
|
|
24
|
-
* installed, no registry) is undefined, so the scroll default falls back to Action. */
|
|
25
10
|
export declare function scrollSpellCost(entry: EquipmentEntry, registry: EntityRegistry | null): ActionCost | undefined;
|
|
26
|
-
/** A charges field's maximum (spec §5.6, U-7 A): an object's `max`, or a positive number (the two item-note shapes,
|
|
27
|
-
* item.schema.ts); an infusion overlay's `charges` has the object shape. */
|
|
28
11
|
export declare function itemChargesMax(entity: unknown): number | undefined;
|
|
29
|
-
/** The recovery rule an item recharges by (spec §5.5, §5.6, U-7 A), in this order: none for an item consumed on use
|
|
30
|
-
* ({@link isConsumedOnUse}: it has no charges to recharge, even over a rule stored before that ruling) or an orphan
|
|
31
|
-
* created entry (its RULE entity is null, nothing folds); an INFUSED view's overlay `charges` (their `recharge`,
|
|
32
|
-
* `dawn` refilling on a long rest); the stored rule; the item note's own `charges.recharge`; else the curated rule
|
|
33
|
-
* for a wikilinked entry. A plain-text entry never picks up a curated rule the Actions row cannot show. */
|
|
34
12
|
export declare function effectiveItemRecovery(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): NonNullable<EquipmentEntryState["recovery"]> | undefined;
|
|
35
|
-
/** Consumed on use (T17 rider C fold, user ruling 2026-09-24): using one spends the entry's QUANTITY, never a charge
|
|
36
|
-
* (a potion, Holy Water, an oil, Alchemist's Fire, Dust of Disappearance, a scroll), so the item has no charges and
|
|
37
|
-
* no recovery anywhere and the sheet shows its quantity only. Data decides, in two places: the curated `consumed`
|
|
38
|
-
* flag of `ITEM_ACTIONS` (no registry needed), else the entity's own data, a `potion` or `scroll` type (the type the
|
|
39
|
-
* potion default of `resolveItemAction` already reads) or a `scroll_level` marker. A plain-text entry is never one:
|
|
40
|
-
* it resolves to no entity, as in every other rule here. */
|
|
41
13
|
export declare function isConsumedOnUse(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): boolean;
|
|
42
|
-
/** The ONE "is a spell scroll" rule (T17 rider GH, carried from rider C's close), by the entity's own data: its `scroll`
|
|
43
|
-
* type or its `scroll_level` marker. A scroll is consumed on use ({@link isConsumedOnUse}). Read value-based, with no
|
|
44
|
-
* rarity gate: null, a non-object or an entity with neither field is no scroll. An entry reaches it through its resolved
|
|
45
|
-
* entity, so with no registry, or for a plain-text entry, nothing is a scroll. */
|
|
46
14
|
export declare function isScrollEntity(entity: unknown): boolean;
|
|
47
|
-
/** A scroll the sheet can CAST: it carries the `scroll_level` marker, the level its spell is cast at (0 = cantrip). Its
|
|
48
|
-
* use is that cast (the Spells tab spends it), so the Actions row offers it no Use of its own. A scroll typed `scroll`
|
|
49
|
-
* with no marker (the 2014 SRD spell scrolls) names no level: it is not castable, and its Actions row keeps the plain
|
|
50
|
-
* Use every other item consumed on use has (T17 rider GH). */
|
|
51
15
|
export declare function isCastableScroll(entity: unknown): boolean;
|
|
52
|
-
/** The charge pair an item shows, the twin of {@link effectiveItemRecovery}. Its sources, in this order (spec §5.5,
|
|
53
|
-
* §5.6, U-7 A):
|
|
54
|
-
* 1. none for an item consumed on use (its quantity is what it has, {@link isConsumedOnUse}, even over a pair stored
|
|
55
|
-
* before that ruling), and none for an orphan created entry (its view's RULE entity is null: nothing folds);
|
|
56
|
-
* 2. an INFUSED view whose overlay has `charges`: they live in the MARKER, `infusion.charges.current` (absent = full,
|
|
57
|
-
* clamped to the overlay max), never in `state`;
|
|
58
|
-
* 3. the stored pair as stored (a legacy `{0, 0}` included, so it can still be cleared);
|
|
59
|
-
* 4. the item note's OWN `charges` (an object's `max`, or a number) as a FULL pair: every item reads its own data;
|
|
60
|
-
* 5. the curated `max_charges` of a wikilinked entry as a FULL pair, the fallback for notes without data;
|
|
61
|
-
* else none. An item with no stored charges is full, the rest plan's own reading. Every surface that shows or spends
|
|
62
|
-
* an item's charges reads this (through `entryCharges` once it holds the view), and so does the rest plan, so a wand
|
|
63
|
-
* is listed wherever its charges are and a potion nowhere. */
|
|
64
16
|
export declare function effectiveItemCharges(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): NonNullable<EquipmentEntryState["charges"]> | undefined;
|
|
65
|
-
/** The Armor Class an armour or shield entry gives (T17 T-25), by the terms `computeAC` (pc.equipment.ts) adds for it:
|
|
66
|
-
* the slot's own terms ({@link slotAcTerms}: the armour's AC, through `base_item` for a magic armour, `effectiveArmor`,
|
|
67
|
-
* and the entry's `overrides.ac_bonus`), and the item's own unconditional `bonuses.ac` (a +2 armour's +2). A shield's `value` is what it
|
|
68
|
-
* ADDS; an armour's is the AC it sets, plus Dex where `addDex` says so. What the item gives WORN: the engine applies
|
|
69
|
-
* these only while it is equipped (the bonus only while attuned where attunement is required), and a conditional
|
|
70
|
-
* `bonuses.ac` is left out, its conditions being the character's. Every surface that shows an entry's AC reads this, so
|
|
71
|
-
* a magic armour never shows its base armour's AC; the consumer-agreement test holds it to the engine's own sum. Null
|
|
72
|
-
* for an entry that is neither (a weapon, a ring, an unresolved link, plain text) and without a registry. With the
|
|
73
|
-
* entry's view (ART-a, spec §5.3) the rule entity is read: an infused armor or shield gives its base's terms plus the
|
|
74
|
-
* wrapper's scaled `bonuses.ac`, the ONE slot term `computeAC` merges for it. */
|
|
75
17
|
export declare function effectiveItemArmorClass(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): {
|
|
76
18
|
value: number;
|
|
77
19
|
shield: boolean;
|
|
@@ -1,40 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
WEAPON_DEFAULT_ACTION_COST,
|
|
3
|
-
customizableOverrideKeys,
|
|
4
|
-
defaultActionCost,
|
|
5
|
-
effectiveItemArmorClass,
|
|
6
|
-
effectiveItemCharges,
|
|
7
|
-
effectiveItemRecovery,
|
|
8
|
-
isCastableScroll,
|
|
9
|
-
isConsumedOnUse,
|
|
10
|
-
isScrollEntity,
|
|
11
|
-
isWeaponLikeEntry,
|
|
12
|
-
itemChargesMax,
|
|
13
|
-
scrollSpellCost
|
|
14
|
-
} from "../chunk-3VZZDKRA.js";
|
|
15
|
-
import "../chunk-W6GC6OKK.js";
|
|
16
|
-
import "../chunk-B3DP42OM.js";
|
|
17
|
-
import "../chunk-IUAAXXNO.js";
|
|
18
|
-
import "../chunk-IHE6KVC3.js";
|
|
19
|
-
import "../chunk-LHZXYFBU.js";
|
|
20
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
21
|
-
import "../chunk-LVQLWRCU.js";
|
|
22
|
-
import "../chunk-CM5CWO4K.js";
|
|
23
|
-
import "../chunk-ZCTUYGNV.js";
|
|
24
|
-
import "../chunk-3TM34RSJ.js";
|
|
25
|
-
import "../chunk-PDJSUH24.js";
|
|
26
|
-
import "../chunk-WELIKLZF.js";
|
|
27
|
-
export {
|
|
28
|
-
WEAPON_DEFAULT_ACTION_COST,
|
|
29
|
-
customizableOverrideKeys,
|
|
30
|
-
defaultActionCost,
|
|
31
|
-
effectiveItemArmorClass,
|
|
32
|
-
effectiveItemCharges,
|
|
33
|
-
effectiveItemRecovery,
|
|
34
|
-
isCastableScroll,
|
|
35
|
-
isConsumedOnUse,
|
|
36
|
-
isScrollEntity,
|
|
37
|
-
isWeaponLikeEntry,
|
|
38
|
-
itemChargesMax,
|
|
39
|
-
scrollSpellCost
|
|
40
|
-
};
|
|
1
|
+
import{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,scrollSpellCost}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{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,scrollSpellCost};
|
|
@@ -10,33 +10,13 @@ interface ProficienciesForQuery {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function emptyAppliedBonuses(): AppliedBonuses;
|
|
12
12
|
export declare function computeAppliedBonuses(resolved: ResolvedCharacter, _profs: ProficienciesForQuery, registry: EntityRegistry, warnings: string[]): AppliedBonuses;
|
|
13
|
-
|
|
14
|
-
* `computeAttacks` below. Exported for the overlay effect-slug guard
|
|
15
|
-
* (`tests/srd-canonical/overlay-effect-slugs.test.ts`), which validates
|
|
16
|
-
* authored `proficiency_type: weapon` values by asking this function whether
|
|
17
|
-
* any SRD weapon comes out proficient. Note `pc.proficiency-query.ts`'s
|
|
18
|
-
* `isProficientWithWeapon` is a near-twin with NO production callers · it
|
|
19
|
-
* differs on the third arm (it compares only the base category, this one also
|
|
20
|
-
* accepts the full hyphenated form), so guards wanting runtime fidelity must
|
|
21
|
-
* use THIS one. */
|
|
13
|
+
export declare function pactWeaponIndexes(resolved: Pick<ResolvedCharacter, "pactWeapon" | "definition">, registry?: EntityRegistry | null): Set<number> | null;
|
|
22
14
|
export declare function isWeaponSlugProficient(weapon: WeaponEntity, weaponSlug: string, profs: ProficienciesForQuery): boolean;
|
|
23
|
-
/** The die and ability set an `unarmed-strike` effect (or its synthetic) resolved for this character (R4-G6b §5.1). */
|
|
24
15
|
export interface UnarmedStrikeSpec {
|
|
25
16
|
dice?: string;
|
|
26
17
|
abilities?: Ability[];
|
|
27
18
|
}
|
|
28
|
-
/** The always-present Unarmed Strike row (R4-G6b §5.1): 1 + the modifier bludgeoning, 5 ft., always proficient. With a
|
|
29
|
-
* DIE the damage string reproduces the OUTPUT of `buildAttackRow`'s `formatDice` (a closure over `dmgFlat` that cannot
|
|
30
|
-
* be called): the flat part's `^\+0$` strip equals the whole-string `\+0$` strip for every modifier, so a die reads
|
|
31
|
-
* `1d6-1`. With NO die the base is the number 1, and a signed suffix on a number is unevaluated arithmetic (`1-1`,
|
|
32
|
-
* `1+3`), so the flat base prints EVALUATED and floored at 0: `String(Math.max(0, 1 + mod))` (R4-G7 T8 RIDER-10; the
|
|
33
|
-
* user's Q-3 "1 + STR" is the formula, the evaluated number its display). The
|
|
34
|
-
* ability is STR unless the spec lists others; the highest modifier wins and a LATER candidate wins a tie, so a
|
|
35
|
-
* listed DEX beats STR on a tie (the shipped finesse idiom `mods.dex >= mods.str`). Called from recalc, which owns
|
|
36
|
-
* the walk that produces `spec`; never from `computeAttacks`, so the row is present with or without a registry.
|
|
37
|
-
* The `subLabel` is an ENGINE string, printed as it ships: the sheet humanizes a weapon's category tokens, and
|
|
38
|
-
* this row carries no weapon, so `Unarmed` is capitalised here beside `Unarmed Strike`, `5 ft.` and `bludgeoning`
|
|
39
|
-
* rather than in a renderer (R4-G6b live rider R-1). */
|
|
40
19
|
export declare function buildUnarmedRow(mods: Record<Ability, number>, proficiencyBonus: number, spec?: UnarmedStrikeSpec): AttackRow;
|
|
20
|
+
export declare function buildFeatureAttackRows(resolved: Pick<ResolvedCharacter, "features">, mods: Record<Ability, number>, profs: ProficienciesForQuery, proficiencyBonus: number, weaponAbilities?: WeaponAbilityOverride[]): AttackRow[];
|
|
41
21
|
export declare function computeSlotsAndAttacks(resolved: ResolvedCharacter, mods: Record<Ability, number>, profs: ProficienciesForQuery, registry: EntityRegistry, warnings: string[], proficiencyBonus: number, weaponAbilities?: WeaponAbilityOverride[], weaponMasteries?: string[], attunementFloor?: number): DerivedEquipment;
|
|
42
22
|
export {};
|
package/dist/pc/pc.equipment.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
buildUnarmedRow,
|
|
3
|
-
computeAppliedBonuses,
|
|
4
|
-
computeSlotsAndAttacks,
|
|
5
|
-
emptyAppliedBonuses,
|
|
6
|
-
isWeaponSlugProficient
|
|
7
|
-
} from "../chunk-JSM6JFZR.js";
|
|
8
|
-
import "../chunk-3LWMFYKS.js";
|
|
9
|
-
import "../chunk-YDGMBMYI.js";
|
|
10
|
-
import "../chunk-EJP263OP.js";
|
|
11
|
-
import "../chunk-RLGQ5PZZ.js";
|
|
12
|
-
import "../chunk-3VZZDKRA.js";
|
|
13
|
-
import "../chunk-W6GC6OKK.js";
|
|
14
|
-
import "../chunk-B3DP42OM.js";
|
|
15
|
-
import "../chunk-IUAAXXNO.js";
|
|
16
|
-
import "../chunk-IHE6KVC3.js";
|
|
17
|
-
import "../chunk-HHBD4SQ6.js";
|
|
18
|
-
import "../chunk-A54HHCWW.js";
|
|
19
|
-
import "../chunk-LHZXYFBU.js";
|
|
20
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
21
|
-
import "../chunk-LVQLWRCU.js";
|
|
22
|
-
import "../chunk-CM5CWO4K.js";
|
|
23
|
-
import "../chunk-ZCTUYGNV.js";
|
|
24
|
-
import "../chunk-3TM34RSJ.js";
|
|
25
|
-
import "../chunk-PDJSUH24.js";
|
|
26
|
-
import "../chunk-WELIKLZF.js";
|
|
27
|
-
export {
|
|
28
|
-
buildUnarmedRow,
|
|
29
|
-
computeAppliedBonuses,
|
|
30
|
-
computeSlotsAndAttacks,
|
|
31
|
-
emptyAppliedBonuses,
|
|
32
|
-
isWeaponSlugProficient
|
|
33
|
-
};
|
|
1
|
+
import{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes}from"../chunk-7UPYRKMF.js";import"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import"../chunk-4E2GIWJE.js";import"../chunk-PQAVMK3T.js";import"../chunk-HCK6IUB3.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../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-NEMX7QGG.js";import"../chunk-56JK6VCL.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-6IC53O3Q.js";export{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes};
|