@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.resolver.d.ts
CHANGED
|
@@ -10,28 +10,6 @@ export interface ResolveResult {
|
|
|
10
10
|
warnings: string[];
|
|
11
11
|
}
|
|
12
12
|
export declare function stripSlug(ref: string | null): string | null;
|
|
13
|
-
/**
|
|
14
|
-
* Resolve a background's `origin_feat` wikilink into a real FeatEntity + a display
|
|
15
|
-
* name, using ONLY the EntityRegistry (no DOM). Lifted from the builder's
|
|
16
|
-
* background-step so the resolver pipeline and the builder share ONE resolution
|
|
17
|
-
* (R2-m7, [[always-retire-shims-edit-all]]). Handles both path-style refs
|
|
18
|
-
* ("[[SRD 2024/Feats/Alert]]") and bare-slug refs ("[[my-feat]]"), plus the 2024
|
|
19
|
-
* parenthetical-variant refs ("[[SRD 2024/Feats/Magic Initiate (Cleric)]]") that
|
|
20
|
-
* resolve to the BASE feat ("magic-initiate") while keeping the full variant
|
|
21
|
-
* string as the display name. Returns null when the ref is empty or resolves to no
|
|
22
|
-
* feat (an unresolvable ref folds nothing into the pipeline).
|
|
23
|
-
*
|
|
24
|
-
* R4-G4 §8: this is a SEVEN-TIER cascade, first hit wins, and the granting
|
|
25
|
-
* BACKGROUND's slug arrives as `ownerSlug` so the compendium-scoped tiers can read
|
|
26
|
-
* its prefix. It replaces the old two-tier "exact slug, else FIRST tail match"
|
|
27
|
-
* lookup, whose two defects were measured on the shipped corpora: a tail match on a
|
|
28
|
-
* DIFFERENT real feat pre-empted the parenthetical strip (PHB 2024
|
|
29
|
-
* "Magic Initiate; Cleric", tail `magic-initiate-cleric`, beat SRD 2024
|
|
30
|
-
* "Magic Initiate" for every 2024 Acolyte / Sage, order-independently), and where
|
|
31
|
-
* several same-NAMED feats exist the registry order decided which one won
|
|
32
|
-
* (`EntityRegistry.search` sorts by lowercased name, so equal names fall through to
|
|
33
|
-
* insertion order).
|
|
34
|
-
*/
|
|
35
13
|
export declare function resolveOriginFeat(entities: EntityRegistry, originFeatRef: string | null | undefined, ownerSlug?: string | null): {
|
|
36
14
|
feat: FeatEntity;
|
|
37
15
|
display: string;
|
|
@@ -39,107 +17,25 @@ export declare function resolveOriginFeat(entities: EntityRegistry, originFeatRe
|
|
|
39
17
|
export declare class PCResolver {
|
|
40
18
|
private readonly entities;
|
|
41
19
|
constructor(entities: EntityRegistry);
|
|
42
|
-
/** Exposed so recalc() can apply equipment bonuses (Pass A / Pass B). */
|
|
43
20
|
get registry(): EntityRegistry;
|
|
44
21
|
resolve(character: Character): ResolveResult;
|
|
45
22
|
}
|
|
46
|
-
/**
|
|
47
|
-
* 2024 Weapon Mastery: unions the persisted `weapon-mastery` picks across every
|
|
48
|
-
* class/level `ClassEntry.choices[level]["weapon-mastery"]`. Returns both the
|
|
49
|
-
* ORIGINAL full picked slugs (`full` — used for exact-match display-name lookup)
|
|
50
|
-
* and their BARE-normalized form (`bare` — e.g. "srd-2024_greatsword" →
|
|
51
|
-
* "greatsword"), each de-duplicated in first-seen order. Bare-authored picks
|
|
52
|
-
* normalize to themselves. Non-string / non-array picks are ignored.
|
|
53
|
-
*/
|
|
54
23
|
export declare function collectChosenWeaponMasteries(character: Character): {
|
|
55
24
|
bare: string[];
|
|
56
25
|
full: string[];
|
|
57
26
|
};
|
|
58
|
-
/**
|
|
59
|
-
* R4-G7 T8 RIDER-23 · every `choices[<level>].feat` pick with the slot it was taken at: the index of its class entry and
|
|
60
|
-
* the level key as a number (`null` when the key is not an integer). De-duplicated by slug in first-seen order (class
|
|
61
|
-
* entries in order, level keys ascending as `Object.entries` yields integer keys), so a feat picked twice keeps its FIRST
|
|
62
|
-
* slot. Slugs are bare (no `[[ ]]`). The resolver's one walk of class.choices for `feat` entries: the slug-only wrapper that
|
|
63
|
-
* mapped it had no production caller after RIDER-23 and was retired in wave D fix round 1.
|
|
64
|
-
*/
|
|
65
27
|
export declare function collectFeatPicks(character: Character): {
|
|
66
28
|
slug: string;
|
|
67
29
|
classIndex: number;
|
|
68
30
|
level: number | null;
|
|
69
31
|
}[];
|
|
70
|
-
/**
|
|
71
|
-
* Feat→spell application (3d). Walks a feat's OWN `choices` to find its spell
|
|
72
|
-
* picks and turns each into a ResolvedSpell. A feat's spells sit behind a
|
|
73
|
-
* `spell-list` select-inline whose CHOSEN branch nests `select-entity{spell}`
|
|
74
|
-
* picks; the chosen spellcasting ability comes from the feat's
|
|
75
|
-
* `spellcasting-ability` select-inline. `read(childId)` yields the persisted pick
|
|
76
|
-
* for a child choice id (origin feat: `origin_choices["background:feat:<id>"]`;
|
|
77
|
-
* class-slot feat: `choices[lvl]["feat:<id>"]`). Unresolvable spell slugs warn and
|
|
78
|
-
* are skipped, mirroring the known-spell loop. classSlug stays null: a feat spell
|
|
79
|
-
* is not owned by a class for DC/ability; the carried `ability` drives its casting.
|
|
80
|
-
*/
|
|
81
32
|
export declare function collectFeatGrantedSpells(feat: FeatEntity, read: (childId: string) => ChoiceValue | undefined, entities: EntityRegistry, warnings: string[]): ResolvedSpell[];
|
|
82
|
-
/**
|
|
83
|
-
* Item→spell application (P4-T3). Walks the character's equipment for entries whose
|
|
84
|
-
* resolved item is a spell scroll (carries the T1 `scroll_level` marker) AND names a
|
|
85
|
-
* chosen spell via `overrides.spell`, turning each into a
|
|
86
|
-
* ResolvedSpell{ source:"item", classSlug:null, prepared:true, alwaysPrepared:true }.
|
|
87
|
-
* The casting `ability` is the character's OWN spellcasting ability when they have
|
|
88
|
-
* one (`ownAbility`, the first caster class's ability), else the per-instance
|
|
89
|
-
* `overrides.spell_ability`, else undefined (a no-ability scroll is left ability-less:
|
|
90
|
-
* the plugin surfaces it without a DC; an ability is NEVER fabricated here).
|
|
91
|
-
* `entryIndex` records the originating equipment index so the segmented dedupe keeps
|
|
92
|
-
* two scrolls of one spell (and a scroll of a class-known spell) as their own rows.
|
|
93
|
-
* Unresolvable spell slugs warn and are skipped, mirroring the known-spell + feat loops.
|
|
94
|
-
* In-memory only: no KnownSpellObject{source:"item"} is injected (its strict schema
|
|
95
|
-
* omits `ability`).
|
|
96
|
-
*/
|
|
97
33
|
export declare function collectItemGrantedSpells(character: Character, ownAbility: Ability | null, entities: EntityRegistry, warnings: string[]): ResolvedSpell[];
|
|
98
|
-
/**
|
|
99
|
-
* Collapses duplicate resolved spells (3d Minor #2 carry-forward + P4-T3 segmented
|
|
100
|
-
* dedupe). A spell can be emitted more than once: it may be BOTH in
|
|
101
|
-
* `character.spells.known` AND a feat pick, or a feat may be taken as both origin +
|
|
102
|
-
* class-slot, or an `additional_spells` grant (R4-G3b §5) may name a spell the character
|
|
103
|
-
* already knows. A class-sourced copy owns a real DC via its `classSlug`, so it always
|
|
104
|
-
* wins over a feat copy of the same slug; otherwise the FIRST-SEEN copy holds the slot.
|
|
105
|
-
* Which copy holds the slot is not the whole answer, though: `alwaysPrepared` is OR-merged
|
|
106
|
-
* onto the winner in BOTH collision orders (R4-G3b §5.2.8), so a hand-added Bless that a
|
|
107
|
-
* subclass later grants stops counting against the prepared limit instead of counting
|
|
108
|
-
* forever. `persisted` crosses the merge as well, in both orders (fix 1b): removability is
|
|
109
|
-
* MEMBERSHIP in `character.spells.known`, so the flag belongs to the SLUG, not to whichever
|
|
110
|
-
* copy won. Nothing else crosses: the winner keeps its own `source` / `classSlug` /
|
|
111
|
-
* `entryIndex`. Insertion order
|
|
112
|
-
* is preserved (a later class copy replaces an earlier feat copy in place), so the
|
|
113
|
-
* Spells section never renders duplicate rows while a legitimately class-known copy is
|
|
114
|
-
* never lost. Item-source spells carry INSTANCE identity: they key by
|
|
115
|
-
* `slug + "#" + entryIndex`, so two scrolls of one spell stay two rows and a scroll of
|
|
116
|
-
* a class-known spell keeps its OWN item row, never collapsing into / being collapsed
|
|
117
|
-
* by a class/feat copy. The class/feat slug-only merge is unchanged.
|
|
118
|
-
*/
|
|
119
34
|
export declare function dedupeResolvedSpells(spells: ResolvedSpell[]): ResolvedSpell[];
|
|
120
|
-
/** Selected select-entity values (optional-features) and selected inline
|
|
121
|
-
* options carrying effects[] become synthesized resolved features (SP2 Plan 3 §9).
|
|
122
|
-
* The actions/resources engines consume these synthesized features, and the
|
|
123
|
-
* effects-application pass (pc.feature-effects.ts → recalc) consumes their
|
|
124
|
-
* effects[]. Scope: class/subclass level choices, plus race/background origin
|
|
125
|
-
* choices (origin_choices keys are namespaced "race:<id>" / "background:<id>"). */
|
|
126
35
|
export declare function collectChosenGrantedFeatures(character: Character, classes: ResolvedClass[], registry: {
|
|
127
36
|
getByTypeAndSlug(type: string, slug: string): {
|
|
128
37
|
data: Record<string, unknown>;
|
|
129
38
|
} | undefined;
|
|
130
39
|
}, race?: RaceEntity | null, background?: BackgroundEntity | null, memberSites?: PoolMemberSite[]): ResolvedFeature[];
|
|
131
|
-
/**
|
|
132
|
-
* `character.additional_features` → ResolvedFeatures (the DM-grant path).
|
|
133
|
-
*
|
|
134
|
-
* Deliberately NOT routed through `walkChoiceGrants`: that converter emits
|
|
135
|
-
* `{id, name, description, effects, action}` and DROPS `uses`, which is correct there because a pool
|
|
136
|
-
* pick's tracker is built separately by `resolveResourceIndex`'s pools loop. A campaign grant has no
|
|
137
|
-
* pool, so nothing would ever build its tracker — the feature would render as a card with no counter.
|
|
138
|
-
* This walk therefore converts `uses` into the feature's own `resources[]`, which
|
|
139
|
-
* `resolveFeatureResources` already indexes, and the grant gets a tracker with no pool involved.
|
|
140
|
-
*
|
|
141
|
-
* A prose `uses.max` (the 4 shipped carriers that have one) yields no resource rather than a broken
|
|
142
|
-
* tracker, matching the pools loop's rule; the feature still renders.
|
|
143
|
-
*/
|
|
144
40
|
export declare function collectAdditionalFeatures(character: Character, entities: EntityRegistry, warnings: string[]): ResolvedFeature[];
|
|
145
41
|
export declare function collectResolvedFeatures(race: RaceEntity | null, classes: ResolvedClass[], background: BackgroundEntity | null, feats: FeatEntity[], featVia?: ReadonlyMap<string, FeatVia>): ResolvedFeature[];
|
package/dist/pc/pc.resolver.js
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
PCResolver,
|
|
3
|
-
collectAdditionalFeatures,
|
|
4
|
-
collectChosenGrantedFeatures,
|
|
5
|
-
collectChosenWeaponMasteries,
|
|
6
|
-
collectFeatGrantedSpells,
|
|
7
|
-
collectFeatPicks,
|
|
8
|
-
collectItemGrantedSpells,
|
|
9
|
-
collectResolvedFeatures,
|
|
10
|
-
dedupeResolvedSpells,
|
|
11
|
-
resolveOriginFeat,
|
|
12
|
-
stripSlug
|
|
13
|
-
} from "../chunk-ONTGZR5T.js";
|
|
14
|
-
import "../chunk-2LULMQTF.js";
|
|
15
|
-
import "../chunk-H5PTKYXL.js";
|
|
16
|
-
import "../chunk-TULQ4FFX.js";
|
|
17
|
-
import "../chunk-TOM66P2P.js";
|
|
18
|
-
import "../chunk-KU3YLF6D.js";
|
|
19
|
-
import "../chunk-HTYMW5CH.js";
|
|
20
|
-
import "../chunk-KSTV7J2U.js";
|
|
21
|
-
import "../chunk-DPUJDOKV.js";
|
|
22
|
-
import "../chunk-LBEXLN6I.js";
|
|
23
|
-
import "../chunk-RLGQ5PZZ.js";
|
|
24
|
-
import "../chunk-3VZZDKRA.js";
|
|
25
|
-
import "../chunk-W6GC6OKK.js";
|
|
26
|
-
import "../chunk-B3DP42OM.js";
|
|
27
|
-
import "../chunk-IUAAXXNO.js";
|
|
28
|
-
import "../chunk-YHYTW5QA.js";
|
|
29
|
-
import "../chunk-VRV3NNTA.js";
|
|
30
|
-
import "../chunk-PVCEA4HZ.js";
|
|
31
|
-
import "../chunk-IHE6KVC3.js";
|
|
32
|
-
import "../chunk-LHZXYFBU.js";
|
|
33
|
-
import "../chunk-YBLDE5CG.js";
|
|
34
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
35
|
-
import "../chunk-LVQLWRCU.js";
|
|
36
|
-
import "../chunk-CM5CWO4K.js";
|
|
37
|
-
import "../chunk-EVMUJYUD.js";
|
|
38
|
-
import "../chunk-VTTA2ALZ.js";
|
|
39
|
-
import "../chunk-ZCTUYGNV.js";
|
|
40
|
-
import "../chunk-7Q2VPKCD.js";
|
|
41
|
-
import "../chunk-ZDAEGJH4.js";
|
|
42
|
-
import "../chunk-3TM34RSJ.js";
|
|
43
|
-
import "../chunk-PDJSUH24.js";
|
|
44
|
-
import "../chunk-WELIKLZF.js";
|
|
45
|
-
import "../chunk-4U55VNC7.js";
|
|
46
|
-
import "../chunk-UA5KS2PL.js";
|
|
47
|
-
export {
|
|
48
|
-
PCResolver,
|
|
49
|
-
collectAdditionalFeatures,
|
|
50
|
-
collectChosenGrantedFeatures,
|
|
51
|
-
collectChosenWeaponMasteries,
|
|
52
|
-
collectFeatGrantedSpells,
|
|
53
|
-
collectFeatPicks,
|
|
54
|
-
collectItemGrantedSpells,
|
|
55
|
-
collectResolvedFeatures,
|
|
56
|
-
dedupeResolvedSpells,
|
|
57
|
-
resolveOriginFeat,
|
|
58
|
-
stripSlug
|
|
59
|
-
};
|
|
1
|
+
import{PCResolver,collectAdditionalFeatures,collectChosenGrantedFeatures,collectChosenWeaponMasteries,collectFeatGrantedSpells,collectFeatPicks,collectItemGrantedSpells,collectResolvedFeatures,dedupeResolvedSpells,resolveOriginFeat,stripSlug}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"../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{PCResolver,collectAdditionalFeatures,collectChosenGrantedFeatures,collectChosenWeaponMasteries,collectFeatGrantedSpells,collectFeatPicks,collectItemGrantedSpells,collectResolvedFeatures,dedupeResolvedSpells,resolveOriginFeat,stripSlug};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
import type { ResolvedCharacter, DerivedStats, FeatureSource } from "./pc.types.js";
|
|
2
2
|
import type { FormulaBindings } from "@archivist-gg/dnd5e/dnd/resource-formula";
|
|
3
|
-
/** Build the DSL bindings for a resource granted via `source`. `class_level`
|
|
4
|
-
* is the character's level in the granting class; for a `subclass` source it
|
|
5
|
-
* is the level in the class that OWNS that subclass, and it falls back to the
|
|
6
|
-
* total level for race/background/feat sources (or when the class isn't found).
|
|
7
|
-
* Also binds `columns` · the numeric values of that (sub)class's table row at
|
|
8
|
-
* `class_level` (empty when there is no table/row), backing the `column('Name')`
|
|
9
|
-
* accessor in the DSL. Ability mods come from the final (post-bonus) derived mods.
|
|
10
|
-
* `class_level` comes from `resourceLevelFor` (pc.resources.ts), the one derivation. */
|
|
11
3
|
export declare function resourceBindings(resolved: ResolvedCharacter, derived: DerivedStats, source: FeatureSource): FormulaBindings;
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resourceLevelFor
|
|
3
|
-
} from "../chunk-KSTV7J2U.js";
|
|
4
|
-
import "../chunk-DPUJDOKV.js";
|
|
5
|
-
import {
|
|
6
|
-
numericColumnsAt
|
|
7
|
-
} from "../chunk-IUAAXXNO.js";
|
|
8
|
-
import "../chunk-LVQLWRCU.js";
|
|
9
|
-
import "../chunk-EVMUJYUD.js";
|
|
10
|
-
import "../chunk-VTTA2ALZ.js";
|
|
11
|
-
import "../chunk-PDJSUH24.js";
|
|
12
|
-
import "../chunk-WELIKLZF.js";
|
|
13
|
-
|
|
14
|
-
// src/pc/pc.resource-seed.ts
|
|
15
|
-
function resourceBindings(resolved, derived, source) {
|
|
16
|
-
var _a, _b, _c, _d;
|
|
17
|
-
const classLevel = resourceLevelFor(source, resolved);
|
|
18
|
-
let table;
|
|
19
|
-
if (source.kind === "class") table = (_b = (_a = resolved.classes.find((c) => {
|
|
20
|
-
var _a2;
|
|
21
|
-
return ((_a2 = c.entity) == null ? void 0 : _a2.slug) === source.slug;
|
|
22
|
-
})) == null ? void 0 : _a.entity) == null ? void 0 : _b.table;
|
|
23
|
-
else if (source.kind === "subclass") table = (_d = (_c = resolved.classes.find((c) => {
|
|
24
|
-
var _a2;
|
|
25
|
-
return ((_a2 = c.subclass) == null ? void 0 : _a2.slug) === source.slug;
|
|
26
|
-
})) == null ? void 0 : _c.subclass) == null ? void 0 : _d.table;
|
|
27
|
-
return {
|
|
28
|
-
level: resolved.totalLevel,
|
|
29
|
-
class_level: classLevel,
|
|
30
|
-
prof: derived.proficiencyBonus,
|
|
31
|
-
str_mod: derived.mods.str,
|
|
32
|
-
dex_mod: derived.mods.dex,
|
|
33
|
-
con_mod: derived.mods.con,
|
|
34
|
-
int_mod: derived.mods.int,
|
|
35
|
-
wis_mod: derived.mods.wis,
|
|
36
|
-
cha_mod: derived.mods.cha,
|
|
37
|
-
columns: numericColumnsAt(table, classLevel)
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
resourceBindings
|
|
42
|
-
};
|
|
1
|
+
import{resourceLevelFor}from"../chunk-PZUPZBTN.js";import"../chunk-NI364WV7.js";import"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import{numericColumnsAt}from"../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-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";function resourceBindings(resolved,derived,source){var _a,_b,_c,_d;const classLevel=resourceLevelFor(source,resolved);let table;if(source.kind==="class")table=(_b=(_a=resolved.classes.find(c=>{var _a2;return((_a2=c.entity)==null?void 0:_a2.slug)===source.slug}))==null?void 0:_a.entity)==null?void 0:_b.table;else if(source.kind==="subclass")table=(_d=(_c=resolved.classes.find(c=>{var _a2;return((_a2=c.subclass)==null?void 0:_a2.slug)===source.slug}))==null?void 0:_c.subclass)==null?void 0:_d.table;return{level:resolved.totalLevel,class_level:classLevel,prof:derived.proficiencyBonus,str_mod:derived.mods.str,dex_mod:derived.mods.dex,con_mod:derived.mods.con,int_mod:derived.mods.int,wis_mod:derived.mods.wis,cha_mod:derived.mods.cha,columns:numericColumnsAt(table,classLevel)}}export{resourceBindings};
|
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
import type { FeatureSource, ResolvedCharacter, ResolvedFeature, ResolvedPool, ResolvedPoolEntry, DerivedStats } from "./pc.types.js";
|
|
2
2
|
import type { ResourceRecovery, ResourceDie, ResourceScaleStep, ResetTrigger } from "../types/resource.js";
|
|
3
|
-
/** The level a resource granted via `source` scales against (R4-G4 §6.2.4, ONE derivation): the
|
|
4
|
-
* character's level in the granting class; for a `subclass` source the level in the class that OWNS
|
|
5
|
-
* that subclass; the total level for race / background / feat sources, or when the class is not found.
|
|
6
|
-
* `resourceBindings` (pc.resource-seed.ts) binds `class_level` through this function, and R4-G4 T3
|
|
7
|
-
* (§6.2.4 / §6.2.5) routed the plugin's three former TOTAL-level reads through it too, so
|
|
8
|
-
* `class_level`, `scales_at` and the die can no longer disagree. T4 added a fourth read, the die label
|
|
9
|
-
* of `renderSpendControl`, and T5 a fifth, the die label of the pool tab's dice head.
|
|
10
|
-
*
|
|
11
|
-
* The units, re-measured 2026-09-06 on the SHIPPED plugin tree with
|
|
12
|
-
* `grep -rn "resourceLevelFor(" packages/obsidian/src`, which returns FOUR lines: FIVE READS reach
|
|
13
|
-
* this function through FOUR call EXPRESSIONS living in FOUR functions across FOUR files. The
|
|
14
|
-
* expressions are the plugin SEED (`seedFeatureUses` in `pc.resource-seed.ts`, for the level it hands
|
|
15
|
-
* `resolveMaxCountAt`), the module-private `resourceLevel(id, ctx)` helper of
|
|
16
|
-
* `components/actions/feature-rows.ts` (which resolves the owner from `resolved.resources` and falls
|
|
17
|
-
* back to the total level when there is none), `renderSpendControl`
|
|
18
|
-
* (`components/actions/spend-control.ts`) and `renderPoolHead` (`components/pool-tab.ts`). The count
|
|
19
|
-
* of READS is one higher than the count of expressions because `resourceLevel` serves TWO
|
|
20
|
-
* `resolveScalingDie` die labels, one in `renderCardResource` and one in `formatFeatureAttackNote`:
|
|
21
|
-
* so THREE of the five reads call this function directly (the seed, the spend control, the pool head)
|
|
22
|
-
* and TWO reach it through `resourceLevel`. Each render-time reader passes the owner its index entry
|
|
23
|
-
* already carries, so a die label and the tracker beside it read the same level. So a
|
|
24
|
-
* Barbarian 5 / Fighter 5 reads the level-5 Rage count, not the level-10 one. */
|
|
25
3
|
export declare function resourceLevelFor(source: FeatureSource, resolved: ResolvedCharacter): number;
|
|
26
4
|
export type ResourceOwner = {
|
|
27
5
|
kind: "feature";
|
|
@@ -50,49 +28,13 @@ export interface ResolvedResource {
|
|
|
50
28
|
scalesAt?: ResourceScaleStep[];
|
|
51
29
|
recovery?: ResolvedRecovery[];
|
|
52
30
|
owner: ResourceOwner;
|
|
53
|
-
/** Which control draws this resource — the declaring note's `rendering_hint`, carried verbatim and
|
|
54
|
-
* never interpreted here. The renderer owns the hint → component table; the engine only delivers the
|
|
55
|
-
* string, so adding a component is a change in ONE table and adding a resource is no code at all. */
|
|
56
31
|
renderingHint?: string;
|
|
57
|
-
/** `band` = also drawn in the header strip. Absent = the Resources tab alone. */
|
|
58
32
|
surface?: "band" | "tab";
|
|
33
|
+
equivalentIds?: readonly string[];
|
|
59
34
|
}
|
|
60
35
|
export type ResourceIndex = ReadonlyMap<string, ResolvedResource>;
|
|
61
|
-
/** KIND first (the schema key; absent = `uses`, UR2), FLAVOUR second (`action` / `reset`): a
|
|
62
|
-
* `spell-slots` entry is ALWAYS manual (the slot picker), whatever its action / reset say; a `uses`
|
|
63
|
-
* entry is a rest restore when its `reset` is `short-rest` or `long-rest` AND it carries no `action`,
|
|
64
|
-
* else manual (R4-G4 §7.2, invariant 12). The other rest-shaped triggers (`either`, `dawn`, `dusk`)
|
|
65
|
-
* read manual here: §7.1's partition of the 33 shipped entries has no carrier among them, and §15
|
|
66
|
-
* keeps the reset VOCABULARY of the rest arm deferred to G8.
|
|
67
|
-
*
|
|
68
|
-
* BOTH arms it routes are LANDED as of R4-G4 T7, and its CALLERS are counted here rather than its
|
|
69
|
-
* grep hits, because a docblock that names the function moves its own grep count. Measured
|
|
70
|
-
* 2026-09-05 on both trees: dnd5e has exactly ONE caller, `toResolvedResource` below, which STAMPS
|
|
71
|
-
* the kind and the flavour onto every entry of every indexed resource, so `pushPartialRecoveries`
|
|
72
|
-
* (pc.rest.ts) reads that stamp to emit the rest arm's partial category and never calls this
|
|
73
|
-
* function itself; the plugin has exactly ONE, `renderRecoveryAction` (blocks/feature-card.ts),
|
|
74
|
-
* which calls it directly and picks the card's arm from the KIND, then the FLAVOUR
|
|
75
|
-
* (`grep -rn "resolveRecovery" packages/obsidian/src` returns THREE lines there: the import, that
|
|
76
|
-
* call and one docblock mention). */
|
|
77
36
|
export declare function resolveRecovery(entry: ResourceRecovery): ResolvedRecovery;
|
|
78
|
-
/** ONE walk over `features[].feature.resources` (the walk `findResourceById` used to do per call). The
|
|
79
|
-
* owner is the DECLARING feature; a duplicate id keeps the FIRST declaration (seeding keeps its own
|
|
80
|
-
* max-of-maxes merge). Reads the features array ONLY. `name` falls back to the owning feature's name,
|
|
81
|
-
* the rule `findResourceById` carried, for resources synthesised from older fixtures that omit it. */
|
|
82
37
|
export declare function resolveFeatureResources(features: ReadonlyArray<ResolvedFeature>): ResourceIndex;
|
|
83
|
-
/** The resource id a pool pick's own tracker uses (spec §5.2): a repeatable copy keys by its pick key, every other pick by its slug.
|
|
84
|
-
* A repeatable (non-item-bound) copy keys its tracker by its KEY, so two copies are two trackers; `param != null` keeps a cast
|
|
85
|
-
* fixture without the field on the slug. ONE rule for both sides: dnd5e seeds by it and the plugin's pick tracker reads by it
|
|
86
|
-
* (ART-c1, R-3 c). */
|
|
87
38
|
export declare function pickResourceId(entry: Pick<ResolvedPoolEntry, "slug" | "key" | "param">): string;
|
|
88
|
-
/** The full index: the feature resources (`resolveFeatureResources`) plus the pool picks' own
|
|
89
|
-
* `uses` (R4-G4 §12, LANDED at T7b). A pure function of `resolved.features` and `resolved.pools`,
|
|
90
|
-
* each guarded `?? []` because the cast fixtures behind the rest suites in both repos carry
|
|
91
|
-
* neither; `computeRestPlan` derives it per call and never reads `resolved.resources`, the
|
|
92
|
-
* resolver stores it on `resolved.resources` after pools resolve, and the resolver suite pins the
|
|
93
|
-
* stored index equal to a fresh derivation. */
|
|
94
39
|
export declare function resolveResourceIndex(resolved: ResolvedCharacter): ResourceIndex;
|
|
95
|
-
/** 8 + prof + mod(ability) when the pool's owning class's subclass carries `spellcasting.ability` AND
|
|
96
|
-
* `resolveSpellcasting` returns null for that class (no caster profile: the Four Elements shape); null
|
|
97
|
-
* otherwise. Reads `subclass.spellcasting.ability` and NEVER `dc_formula` (R4-G4 §11.2). */
|
|
98
40
|
export declare function poolSaveDC(resolved: ResolvedCharacter, derived: DerivedStats, pool: ResolvedPool): number | null;
|
package/dist/pc/pc.resources.js
CHANGED
|
@@ -1,23 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
pickResourceId,
|
|
3
|
-
poolSaveDC,
|
|
4
|
-
resolveFeatureResources,
|
|
5
|
-
resolveRecovery,
|
|
6
|
-
resolveResourceIndex,
|
|
7
|
-
resourceLevelFor
|
|
8
|
-
} from "../chunk-KSTV7J2U.js";
|
|
9
|
-
import "../chunk-DPUJDOKV.js";
|
|
10
|
-
import "../chunk-IUAAXXNO.js";
|
|
11
|
-
import "../chunk-LVQLWRCU.js";
|
|
12
|
-
import "../chunk-EVMUJYUD.js";
|
|
13
|
-
import "../chunk-VTTA2ALZ.js";
|
|
14
|
-
import "../chunk-PDJSUH24.js";
|
|
15
|
-
import "../chunk-WELIKLZF.js";
|
|
16
|
-
export {
|
|
17
|
-
pickResourceId,
|
|
18
|
-
poolSaveDC,
|
|
19
|
-
resolveFeatureResources,
|
|
20
|
-
resolveRecovery,
|
|
21
|
-
resolveResourceIndex,
|
|
22
|
-
resourceLevelFor
|
|
23
|
-
};
|
|
1
|
+
import{pickResourceId,poolSaveDC,resolveFeatureResources,resolveRecovery,resolveResourceIndex,resourceLevelFor}from"../chunk-PZUPZBTN.js";import"../chunk-NI364WV7.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-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{pickResourceId,poolSaveDC,resolveFeatureResources,resolveRecovery,resolveResourceIndex,resourceLevelFor};
|
package/dist/pc/pc.rest.d.ts
CHANGED
|
@@ -2,23 +2,12 @@ import type { EntityRegistry } from "@archivist-gg/core";
|
|
|
2
2
|
import type { ResetTrigger } from "../types/resource.js";
|
|
3
3
|
import type { Character, DerivedStats, EquipmentEntryState, ResolvedCharacter } from "./pc.types.js";
|
|
4
4
|
export type RestType = "short" | "long";
|
|
5
|
-
export type RestCategoryId = "hp-to-max" | "hd-regain" | "spell-slots" | "pact-slots" | "exhaustion" | "hp-modifier-reset" | `feature:${string}` | `item:${number}`
|
|
6
|
-
/** R4-G5 §4.4.2: END an active buff whose carrier declares a structured `duration`. The tail is the STORED
|
|
7
|
-
* `state.active_buffs` key (a class feature's `id` or a pool entry's resolved `slug`). Emitted by
|
|
8
|
-
* `pushBuffEnds` below and read by the plugin's `applyRestResets`, whose `buff:` arm removes that key
|
|
9
|
-
* from `state.active_buffs`. That arm is the plugin half of R4-G5 Task 6: this type is the task's
|
|
10
|
-
* dnd5e hard edge and is committed first. */
|
|
11
|
-
| `buff:${string}`;
|
|
5
|
+
export type RestCategoryId = "hp-to-max" | "hd-regain" | "spell-slots" | "pact-slots" | "exhaustion" | "hp-modifier-reset" | `feature:${string}` | `item:${number}` | `buff:${string}`;
|
|
12
6
|
export interface RestCategory {
|
|
13
7
|
id: RestCategoryId;
|
|
14
8
|
label: string;
|
|
15
9
|
preview: string;
|
|
16
|
-
/** R4-G4 §7.2.2: a PARTIAL restore from a `recovery[]` entry of kind `uses` and flavour `rest` (N uses, or "all"),
|
|
17
|
-
* emitted only when the resource's own `reset` does not already fire at this rest. Absent = the own reset (to 0). */
|
|
18
10
|
restore?: number | "all";
|
|
19
|
-
/** ART-c1 Task 9c (S-4, controller ruling 10): an `item:` category's recharge, the amount its rule restores ("1d6+1",
|
|
20
|
-
* "3", "all") and the charges before the rest. The sheet's rest dialog rolls a DICE amount once when it opens and the
|
|
21
|
-
* rest applies `min(max, current + n)`; this plan stays pure and rolls nothing. */
|
|
22
11
|
recharge?: {
|
|
23
12
|
amount: string;
|
|
24
13
|
current: number;
|
|
@@ -32,21 +21,13 @@ export interface RestPlan {
|
|
|
32
21
|
die: string;
|
|
33
22
|
remaining: number;
|
|
34
23
|
}>;
|
|
35
|
-
/** Internal: per-die HD-regain target captured at plan time so apply is idempotent. */
|
|
36
24
|
hdRegainDist?: Array<{
|
|
37
25
|
die: string;
|
|
38
26
|
targetUsed: number;
|
|
39
27
|
}>;
|
|
40
28
|
}
|
|
41
|
-
/** The persisted item-charge recovery vocabulary (`pc.schema.ts` `equipmentEntryStateSchema.recovery.reset`). */
|
|
42
29
|
export type ItemRecoveryReset = NonNullable<EquipmentEntryState["recovery"]>["reset"];
|
|
43
|
-
/** Every reset a counter can carry: a feature resource's `ResetTrigger` or an item's recovery reset. The two
|
|
44
|
-
* vocabularies share only `dawn`, which means the same thing in both. */
|
|
45
30
|
export type AnyReset = ResetTrigger | ItemRecoveryReset;
|
|
46
|
-
/** The earliest rest that restores `reset` in full, or `null` when none does. A value outside both vocabularies (raw
|
|
47
|
-
* note data reaches here unvalidated) is restored by no rest: an OWN-property lookup, so a prototype key such as
|
|
48
|
-
* `constructor` is not a reset either. */
|
|
49
31
|
export declare function earliestRestoringRest(reset: AnyReset): RestType | null;
|
|
50
|
-
/** Whether a rest of `type` restores `reset` in full: the earliest rest that restores it is no longer than `type`. */
|
|
51
32
|
export declare function restRestores(type: RestType, reset: AnyReset): boolean;
|
|
52
33
|
export declare function computeRestPlan(character: Character, resolved: ResolvedCharacter, derived: DerivedStats, registry: EntityRegistry | null, type: RestType): RestPlan;
|