@archivist-gg/dnd5e 0.3.19 → 0.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +48 -21
- package/README.md +26 -48
- package/dist/armor/armor.codec.d.ts +0 -7
- package/dist/armor/armor.codec.js +1 -9
- package/dist/armor/armor.parser.js +1 -8
- package/dist/armor/armor.schema.js +1 -7
- package/dist/armor/armor.types.d.ts +0 -3
- package/dist/background/background.codec.d.ts +0 -6
- package/dist/background/background.codec.js +1 -12
- package/dist/background/background.parser.js +1 -11
- package/dist/background/background.schema.js +1 -12
- package/dist/background/background.types.d.ts +0 -5
- package/dist/chunk-2EOGK6R6.js +1 -0
- package/dist/chunk-2HRRH3WL.js +1 -0
- package/dist/chunk-2LCGKNVM.js +1 -0
- package/dist/chunk-2NUDWOFG.js +1 -0
- package/dist/chunk-334WLI7V.js +1 -0
- package/dist/chunk-3LWOVRLA.js +1 -0
- package/dist/chunk-3QQOATV3.js +1 -0
- package/dist/chunk-4E2GIWJE.js +1 -0
- package/dist/chunk-4GN3GYMP.js +1 -0
- package/dist/chunk-4IAMSRHD.js +1 -0
- package/dist/chunk-4JEF3CET.js +1 -0
- package/dist/chunk-4KVVAENP.js +1 -0
- package/dist/chunk-56JK6VCL.js +1 -0
- package/dist/chunk-5FEXHY4U.js +1 -0
- package/dist/chunk-63YJPWTM.js +1 -0
- package/dist/chunk-6ASJ3MVB.js +1 -0
- package/dist/chunk-6IC53O3Q.js +1 -0
- package/dist/chunk-6LCNV26D.js +1 -0
- package/dist/chunk-6W253VHH.js +1 -0
- package/dist/chunk-7AKJBRBD.js +1 -0
- package/dist/chunk-7EL3GWWJ.js +1 -0
- package/dist/chunk-7FPQJDFD.js +1 -0
- package/dist/chunk-7J5BNH2D.js +1 -0
- package/dist/chunk-7LPKI27J.js +1 -0
- package/dist/chunk-7UPYRKMF.js +1 -0
- package/dist/chunk-A7H6LX47.js +1 -0
- package/dist/chunk-AINRPPLH.js +1 -0
- package/dist/chunk-BC52J4LA.js +1 -0
- package/dist/chunk-BCXGB4HP.js +1 -0
- package/dist/chunk-BGX36NPE.js +1 -0
- package/dist/chunk-BPKG6RZ7.js +1 -0
- package/dist/chunk-BREHZNTL.js +1 -0
- package/dist/chunk-BZ6BGGZS.js +1 -0
- package/dist/chunk-CAPYNIGK.js +1 -0
- package/dist/chunk-CCFIINBA.js +1 -0
- package/dist/chunk-CMIEZQL4.js +1 -0
- package/dist/chunk-DVUXUIPV.js +1 -0
- package/dist/chunk-DY6FVAGA.js +1 -0
- package/dist/chunk-DZITM5AG.js +1 -0
- package/dist/chunk-DZKSXSJF.js +1 -0
- package/dist/chunk-EAARMPCW.js +1 -0
- package/dist/chunk-EVT7MGAC.js +1 -0
- package/dist/chunk-FOLHTMSC.js +1 -0
- package/dist/chunk-GCYUCIDN.js +1 -0
- package/dist/chunk-GIOV6JW7.js +1 -0
- package/dist/chunk-HCK6IUB3.js +1 -0
- package/dist/chunk-HR5MKCP2.js +1 -0
- package/dist/chunk-I26FHSI6.js +1 -0
- package/dist/chunk-I4O2FIDT.js +1 -0
- package/dist/chunk-IGVRLGLM.js +1 -0
- package/dist/chunk-IHPLT2ZT.js +1 -0
- package/dist/chunk-IOCJIWCV.js +1 -0
- package/dist/chunk-JXDX2DKF.js +1 -0
- package/dist/chunk-KBFSJ5WE.js +1 -0
- package/dist/chunk-KM75CC6Q.js +1 -0
- package/dist/chunk-KZDDFG4O.js +1 -0
- package/dist/chunk-LJNT3PJP.js +1 -0
- package/dist/chunk-LR6UMA5V.js +1 -0
- package/dist/chunk-M6RPOLKS.js +1 -0
- package/dist/chunk-MC6PLWRZ.js +1 -0
- package/dist/chunk-MGGKZGLG.js +1 -0
- package/dist/chunk-N3RYJ7RE.js +1 -0
- package/dist/chunk-NEMX7QGG.js +1 -0
- package/dist/chunk-NI364WV7.js +1 -0
- package/dist/chunk-O2QZ73GA.js +1 -0
- package/dist/chunk-O776WL7O.js +1 -0
- package/dist/chunk-OTFNINUY.js +1 -0
- package/dist/chunk-PQAVMK3T.js +1 -0
- package/dist/chunk-PZ3ZZ5H5.js +1 -0
- package/dist/chunk-PZ4L2EEG.js +1 -0
- package/dist/chunk-PZUPZBTN.js +1 -0
- package/dist/chunk-QBA757AU.js +1 -0
- package/dist/chunk-QFIGPOFW.js +1 -0
- package/dist/chunk-QMEKQTUT.js +1 -0
- package/dist/chunk-QVWT67WA.js +1 -0
- package/dist/chunk-RDXQAZBA.js +1 -0
- package/dist/chunk-RE5Z5RNK.js +1 -0
- package/dist/chunk-RL4VY2AL.js +1 -0
- package/dist/chunk-RQGTBHJW.js +1 -0
- package/dist/chunk-RQZCGXUZ.js +1 -0
- package/dist/chunk-S5UCI27C.js +1 -0
- package/dist/chunk-SEOASDO4.js +1 -0
- package/dist/chunk-SU4MEZ5P.js +1 -0
- package/dist/chunk-T55DELVL.js +1 -0
- package/dist/chunk-TKIEPC6F.js +1 -0
- package/dist/chunk-TLXFGGWH.js +1 -0
- package/dist/chunk-UBUKCRZ3.js +1 -0
- package/dist/chunk-V6NQ547U.js +1 -0
- package/dist/chunk-VA3ZWV7C.js +1 -0
- package/dist/chunk-VIP3FH2O.js +1 -0
- package/dist/chunk-VTQ4RWEG.js +1 -0
- package/dist/chunk-WUHTSLG4.js +1 -0
- package/dist/chunk-X22SISGM.js +1 -0
- package/dist/chunk-XKJXT2PN.js +1 -0
- package/dist/chunk-XQMKH4R4.js +1 -0
- package/dist/chunk-YGH7S5ZF.js +1 -0
- package/dist/chunk-ZE46ADXS.js +1 -0
- package/dist/chunk-ZI3FEUX3.js +1 -0
- package/dist/class/class.codec.d.ts +0 -7
- package/dist/class/class.codec.js +1 -18
- package/dist/class/class.parser.js +1 -17
- package/dist/class/class.schema.d.ts +2 -1
- package/dist/class/class.schema.js +1 -15
- package/dist/class/class.slug.d.ts +0 -11
- package/dist/class/class.slug.js +1 -8
- package/dist/class/class.standard-array.d.ts +0 -7
- package/dist/class/class.standard-array.js +1 -20
- package/dist/class/class.types.d.ts +0 -20
- package/dist/condition/condition.codec.d.ts +0 -6
- package/dist/condition/condition.parser.d.ts +0 -10
- package/dist/condition/condition.parser.js +1 -7
- package/dist/condition/condition.schema.d.ts +0 -16
- package/dist/condition/condition.types.d.ts +0 -3
- package/dist/data-srd/index.generated.js +1 -146
- package/dist/dnd/amount-text.d.ts +3 -30
- package/dist/dnd/amount-text.js +1 -15
- package/dist/dnd/constants.d.ts +0 -18
- package/dist/dnd/constants.js +1 -42
- package/dist/dnd/formula-tags.d.ts +0 -2
- package/dist/dnd/formula-tags.js +1 -119
- package/dist/dnd/math.d.ts +0 -26
- package/dist/dnd/math.js +1 -45
- package/dist/dnd/prose-tags.d.ts +1 -15
- package/dist/dnd/prose-tags.js +1 -18
- package/dist/dnd/resource-die.d.ts +0 -4
- package/dist/dnd/resource-die.js +1 -17
- package/dist/dnd/resource-formula.d.ts +0 -43
- package/dist/dnd/resource-formula.js +1 -14
- package/dist/dnd/resource-words.d.ts +0 -2
- package/dist/dnd/resource-words.js +1 -30
- package/dist/dnd/srd-tag-converter.d.ts +0 -21
- package/dist/dnd/srd-tag-converter.js +1 -12
- package/dist/dnd/tag-grammar.js +1 -12
- package/dist/dnd/warn-once.js +1 -8
- package/dist/encounter/encounter.ai-schema.js +1 -8
- package/dist/entities/base-item-resolver.d.ts +0 -26
- package/dist/entities/base-item-resolver.js +1 -11
- package/dist/entities/registry-revision.d.ts +0 -15
- package/dist/entities/registry-revision.js +1 -10
- package/dist/entities/slug.d.ts +1 -31
- package/dist/entities/slug.js +1 -12
- package/dist/entities/wikilink-display.d.ts +0 -2
- package/dist/entities/wikilink-display.js +1 -10
- package/dist/feat/feat.category-codes.d.ts +1 -26
- package/dist/feat/feat.category-codes.js +1 -14
- package/dist/feat/feat.codec.d.ts +0 -6
- package/dist/feat/feat.codec.js +1 -12
- package/dist/feat/feat.parser.js +1 -11
- package/dist/feat/feat.schema.d.ts +22 -1
- package/dist/feat/feat.schema.js +1 -10
- package/dist/feat/feat.types.d.ts +0 -6
- package/dist/index.js +45 -141495
- package/dist/inline-tag-parser.js +1 -6
- package/dist/item/item.actions-map.d.ts +4 -63
- package/dist/item/item.actions-map.js +1 -10
- package/dist/item/item.ai-schema.js +1 -6
- package/dist/item/item.attunement.d.ts +0 -14
- package/dist/item/item.attunement.js +1 -6
- package/dist/item/item.bonuses.js +1 -10
- package/dist/item/item.codec.js +1 -9
- package/dist/item/item.conditions.d.ts +0 -7
- package/dist/item/item.conditions.js +1 -11
- package/dist/item/item.conditions.types.d.ts +0 -2
- package/dist/item/item.cost.js +1 -29
- package/dist/item/item.enrichment.js +1 -9
- package/dist/item/item.icon.d.ts +0 -8
- package/dist/item/item.icon.js +1 -211
- package/dist/item/item.parser.js +1 -8
- package/dist/item/item.schema.d.ts +2 -0
- package/dist/item/item.schema.js +1 -11
- package/dist/item/item.types.d.ts +2 -28
- package/dist/monster/monster.ai-schema.js +1 -6
- package/dist/monster/monster.codec.d.ts +0 -10
- package/dist/monster/monster.enrichment.js +1 -19
- package/dist/monster/monster.format.d.ts +0 -69
- package/dist/monster/monster.format.js +1 -78
- package/dist/monster/monster.parser.d.ts +0 -4
- package/dist/monster/monster.parser.js +1 -15
- package/dist/monster/monster.resolve.d.ts +0 -4
- package/dist/monster/monster.schema.d.ts +0 -9
- package/dist/monster/monster.schema.js +1 -34
- package/dist/monster/monster.types.d.ts +0 -3
- package/dist/monster/monster.types.js +1 -1
- package/dist/optional-feature/optional-feature.codec.d.ts +0 -11
- package/dist/optional-feature/optional-feature.codec.js +1 -13
- package/dist/optional-feature/optional-feature.parser.js +1 -12
- package/dist/optional-feature/optional-feature.schema.d.ts +21 -1
- package/dist/optional-feature/optional-feature.schema.js +1 -15
- package/dist/pack.d.ts +0 -9
- package/dist/pc/conditions.constants.js +1 -6
- package/dist/pc/decision-recognizer.js +1 -8
- package/dist/pc/pc.additional-spells.d.ts +0 -24
- package/dist/pc/pc.additional-spells.js +1 -26
- package/dist/pc/pc.amount-bindings.d.ts +0 -25
- package/dist/pc/pc.amount-bindings.js +1 -28
- package/dist/pc/pc.asi-flatten.d.ts +0 -59
- package/dist/pc/pc.asi-flatten.js +1 -16
- package/dist/pc/pc.conditions.d.ts +1 -0
- package/dist/pc/pc.conditions.js +1 -6
- package/dist/pc/pc.containment.d.ts +0 -5
- package/dist/pc/pc.containment.js +1 -24
- package/dist/pc/pc.decision-engine.d.ts +0 -145
- package/dist/pc/pc.decision-engine.js +1 -55
- package/dist/pc/pc.defense-normalize.d.ts +0 -10
- package/dist/pc/pc.defense-normalize.js +1 -6
- package/dist/pc/pc.entry-overrides.d.ts +0 -58
- package/dist/pc/pc.entry-overrides.js +1 -41
- package/dist/pc/pc.equipment.d.ts +2 -22
- package/dist/pc/pc.equipment.js +1 -34
- package/dist/pc/pc.feature-effects.d.ts +22 -281
- package/dist/pc/pc.feature-effects.js +1 -39
- package/dist/pc/pc.formula-context.js +1 -11
- package/dist/pc/pc.infusions.d.ts +0 -65
- package/dist/pc/pc.infusions.js +1 -65
- package/dist/pc/pc.item-effects.d.ts +18 -0
- package/dist/pc/pc.member-choices.d.ts +3 -66
- package/dist/pc/pc.member-choices.js +1 -39
- package/dist/pc/pc.parser.js +1 -58
- package/dist/pc/pc.pools.d.ts +7 -10
- package/dist/pc/pc.pools.js +1 -27
- package/dist/pc/pc.proficiencies.d.ts +0 -40
- package/dist/pc/pc.proficiencies.js +1 -156
- package/dist/pc/pc.proficiency-grants.d.ts +0 -26
- package/dist/pc/pc.proficiency-normalize.d.ts +0 -35
- package/dist/pc/pc.proficiency-normalize.js +1 -18
- package/dist/pc/pc.proficiency-query.d.ts +0 -13
- package/dist/pc/pc.proficiency-query.js +1 -27
- package/dist/pc/pc.recalc.d.ts +7 -131
- package/dist/pc/pc.recalc.js +1 -1042
- package/dist/pc/pc.resolver.d.ts +0 -107
- package/dist/pc/pc.resolver.js +1 -60
- package/dist/pc/pc.resource-seed.d.ts +0 -8
- package/dist/pc/pc.resource-seed.js +1 -42
- package/dist/pc/pc.resources.d.ts +1 -59
- package/dist/pc/pc.resources.js +1 -23
- package/dist/pc/pc.rest.d.ts +1 -20
- package/dist/pc/pc.rest.js +1 -231
- package/dist/pc/pc.schema.d.ts +0 -2
- package/dist/pc/pc.schema.js +1 -9
- package/dist/pc/pc.slotting.d.ts +0 -29
- package/dist/pc/pc.slotting.js +1 -28
- package/dist/pc/pc.speeds.d.ts +19 -0
- package/dist/pc/pc.spell-scope.d.ts +0 -16
- package/dist/pc/pc.spellcasting.d.ts +0 -70
- package/dist/pc/pc.spellcasting.js +1 -28
- package/dist/pc/pc.table-column.d.ts +0 -22
- package/dist/pc/pc.table-column.js +1 -18
- package/dist/pc/pc.tool-picks.d.ts +0 -27
- package/dist/pc/pc.tool-picks.js +1 -18
- package/dist/pc/pc.types.d.ts +54 -374
- package/dist/pc/pc.weapon-grant.d.ts +0 -6
- package/dist/pc/pool-layout.d.ts +0 -39
- package/dist/pc/pool-layout.js +1 -18
- package/dist/pc/resource-equivalents.d.ts +2 -40
- package/dist/pc/roll-scope.js +1 -8
- package/dist/pc/roll-tag-labels.d.ts +0 -32
- package/dist/pc/roll-tag-labels.js +1 -17
- package/dist/pc/spell-source.d.ts +0 -11
- package/dist/pc/spell-source.js +1 -8
- package/dist/race/race.codec.d.ts +0 -6
- package/dist/race/race.codec.js +1 -15
- package/dist/race/race.parser.js +1 -14
- package/dist/race/race.schema.d.ts +0 -8
- package/dist/race/race.schema.js +1 -14
- package/dist/race/race.structural.d.ts +0 -6
- package/dist/race/race.structural.js +1 -6
- package/dist/race/race.types.d.ts +0 -8
- package/dist/schemas/attack-schema.d.ts +5 -0
- package/dist/schemas/caster-type-schema.d.ts +1 -6
- package/dist/schemas/caster-type-schema.js +1 -6
- package/dist/schemas/choice-schema.js +1 -7
- package/dist/schemas/duration-schema.d.ts +0 -2
- package/dist/schemas/duration-schema.js +1 -6
- package/dist/schemas/entity-extras-schema.d.ts +0 -30
- package/dist/schemas/entity-extras-schema.js +1 -10
- package/dist/schemas/equipment-grant-schema.d.ts +0 -2
- package/dist/schemas/equipment-grant-schema.js +1 -12
- package/dist/schemas/feature-alias.d.ts +0 -27
- package/dist/schemas/feature-effect-schema.d.ts +21 -1
- package/dist/schemas/feature-effect-schema.js +1 -6
- package/dist/schemas/feature-schema.d.ts +0 -6
- package/dist/schemas/feature-schema.js +1 -12
- package/dist/schemas/resource-schema.d.ts +1 -34
- package/dist/schemas/resource-schema.js +1 -12
- package/dist/schemas/selection-pool-schema.js +1 -10
- package/dist/spell/casting-time.d.ts +0 -15
- package/dist/spell/casting-time.js +1 -6
- package/dist/spell/spell.access.d.ts +0 -6
- package/dist/spell/spell.access.js +1 -45
- package/dist/spell/spell.ai-schema.js +1 -6
- package/dist/spell/spell.codec.js +1 -9
- package/dist/spell/spell.enrichment.js +1 -9
- package/dist/spell/spell.filter.d.ts +0 -5
- package/dist/spell/spell.filter.js +1 -75
- package/dist/spell/spell.parser.d.ts +0 -31
- package/dist/spell/spell.parser.js +1 -16
- package/dist/spell/spell.scaling.d.ts +0 -46
- package/dist/spell/spell.scaling.js +1 -79
- package/dist/spell/spell.schema.js +1 -7
- package/dist/spell/spell.types.d.ts +0 -7
- package/dist/srd/retired-items.d.ts +0 -4
- package/dist/srd/retired-items.js +1 -11
- package/dist/srd-store.d.ts +0 -33
- package/dist/subclass/subclass.codec.d.ts +0 -8
- package/dist/subclass/subclass.codec.js +1 -17
- package/dist/subclass/subclass.parser.js +1 -16
- package/dist/subclass/subclass.schema.d.ts +2 -1
- package/dist/subclass/subclass.schema.js +1 -14
- package/dist/subclass/subclass.types.d.ts +0 -3
- package/dist/types/attack.d.ts +2 -0
- package/dist/types/casting-option.d.ts +0 -4
- package/dist/types/choice.d.ts +1 -72
- package/dist/types/choice.js +1 -24
- package/dist/types/edition.d.ts +0 -3
- package/dist/types/equipment-grant.d.ts +1 -27
- package/dist/types/equipment-grant.js +1 -12
- package/dist/types/feature-effect.d.ts +4 -22
- package/dist/types/feature.d.ts +0 -22
- package/dist/types/optional-feature.types.d.ts +1 -31
- package/dist/types/resource.d.ts +1 -21
- package/dist/types/selection-pool.d.ts +0 -24
- package/dist/weapon/weapon-mastery.d.ts +0 -1
- package/dist/weapon/weapon.classify.d.ts +0 -11
- package/dist/weapon/weapon.classify.js +1 -7
- package/dist/weapon/weapon.codec.d.ts +0 -9
- package/dist/weapon/weapon.codec.js +1 -9
- package/dist/weapon/weapon.parser.js +1 -8
- package/dist/weapon/weapon.schema.js +1 -7
- package/dist/weapon/weapon.types.d.ts +0 -3
- package/package.json +3 -3
- package/src/data-srd/ATTRIBUTION.md +1 -1
- package/dist/chunk-2FRUSVZS.js +0 -489
- package/dist/chunk-2LULMQTF.js +0 -14
- package/dist/chunk-3LWMFYKS.js +0 -57
- package/dist/chunk-3SFGWFVQ.js +0 -19
- package/dist/chunk-3SIUAFDQ.js +0 -18
- package/dist/chunk-3TM34RSJ.js +0 -23
- package/dist/chunk-4J6DS3EJ.js +0 -30
- package/dist/chunk-4U55VNC7.js +0 -22
- package/dist/chunk-5GKJAUMX.js +0 -59
- package/dist/chunk-5JXFJ5AU.js +0 -26
- package/dist/chunk-64VNLMSG.js +0 -375
- package/dist/chunk-656QCX4U.js +0 -22
- package/dist/chunk-6GNXYAYP.js +0 -25
- package/dist/chunk-6PXTNCBP.js +0 -133
- package/dist/chunk-6X2NV665.js +0 -33
- package/dist/chunk-7Q2VPKCD.js +0 -181
- package/dist/chunk-7XJHI5H5.js +0 -709
- package/dist/chunk-A54HHCWW.js +0 -67
- package/dist/chunk-B2QHP6UF.js +0 -159
- package/dist/chunk-B3DP42OM.js +0 -55
- package/dist/chunk-BJGOSM76.js +0 -18
- package/dist/chunk-BJWSOQUC.js +0 -133
- package/dist/chunk-CJYCVNW2.js +0 -7
- package/dist/chunk-CM5CWO4K.js +0 -735
- package/dist/chunk-DEEHHLAP.js +0 -271
- package/dist/chunk-DPUJDOKV.js +0 -365
- package/dist/chunk-EJD47JHL.js +0 -1838
- package/dist/chunk-EJP263OP.js +0 -186
- package/dist/chunk-EVMUJYUD.js +0 -195
- package/dist/chunk-EYX4JMAU.js +0 -101
- package/dist/chunk-FC4IGH5Y.js +0 -18
- package/dist/chunk-FJYBLXV7.js +0 -89
- package/dist/chunk-FMUD3LDV.js +0 -19
- package/dist/chunk-FMYWORTP.js +0 -93
- package/dist/chunk-FVXLP7P3.js +0 -18
- package/dist/chunk-G6MHJDVT.js +0 -41
- package/dist/chunk-GVWEFECG.js +0 -18
- package/dist/chunk-HHBD4SQ6.js +0 -24
- package/dist/chunk-HS6FIOLP.js +0 -52
- package/dist/chunk-HY2SRSVM.js +0 -23
- package/dist/chunk-IHE6KVC3.js +0 -13
- package/dist/chunk-IN4M4X7P.js +0 -34
- package/dist/chunk-IUAAXXNO.js +0 -58
- package/dist/chunk-JXWNXIIZ.js +0 -219
- package/dist/chunk-K5NJBTE2.js +0 -18
- package/dist/chunk-KR6JF3BF.js +0 -14
- package/dist/chunk-KSTV7J2U.js +0 -112
- package/dist/chunk-KU3YLF6D.js +0 -106
- package/dist/chunk-LBEXLN6I.js +0 -91
- package/dist/chunk-LHZXYFBU.js +0 -94
- package/dist/chunk-LICYHPI3.js +0 -237
- package/dist/chunk-LNT64X7C.js +0 -81
- package/dist/chunk-LSLSG67V.js +0 -31
- package/dist/chunk-LVQLWRCU.js +0 -15
- package/dist/chunk-MYY2C5MB.js +0 -233
- package/dist/chunk-NKZMQV2C.js +0 -19
- package/dist/chunk-NTU2DXNG.js +0 -355
- package/dist/chunk-NXUY5XQN.js +0 -1062
- package/dist/chunk-NZO7M5GV.js +0 -18
- package/dist/chunk-OOL4KMG2.js +0 -71
- package/dist/chunk-OOSRUJBI.js +0 -19
- package/dist/chunk-PDJSUH24.js +0 -110
- package/dist/chunk-PTXBIDG7.js +0 -63
- package/dist/chunk-PVCEA4HZ.js +0 -6
- package/dist/chunk-QA3YCOML.js +0 -101
- package/dist/chunk-QFWQKS3M.js +0 -110
- package/dist/chunk-QS5L5YTJ.js +0 -24
- package/dist/chunk-QYZV2MQA.js +0 -97
- package/dist/chunk-RD2MID3M.js +0 -292
- package/dist/chunk-S3YUXDSC.js +0 -278
- package/dist/chunk-S7REMWW4.js +0 -21
- package/dist/chunk-TOM66P2P.js +0 -38
- package/dist/chunk-TRBGC4ZG.js +0 -112
- package/dist/chunk-UA5KS2PL.js +0 -26
- package/dist/chunk-UJCK5IW4.js +0 -187
- package/dist/chunk-UNYR5GLI.js +0 -23
- package/dist/chunk-UZXG6QSY.js +0 -58
- package/dist/chunk-VN5DLURA.js +0 -158
- package/dist/chunk-VP5TIXDK.js +0 -178
- package/dist/chunk-VPYBK2MG.js +0 -18
- package/dist/chunk-VTTA2ALZ.js +0 -16
- package/dist/chunk-W6GC6OKK.js +0 -16
- package/dist/chunk-WELIKLZF.js +0 -256
- package/dist/chunk-WOHX7YTH.js +0 -165
- package/dist/chunk-WSVMLNTO.js +0 -31
- package/dist/chunk-WYGD2UGN.js +0 -14
- package/dist/chunk-XCFC7LGF.js +0 -122
- package/dist/chunk-XJ2F2WO6.js +0 -8
- package/dist/chunk-XTEFPUSN.js +0 -23
- package/dist/chunk-YBLDE5CG.js +0 -42
- package/dist/chunk-YDGMBMYI.js +0 -25
- package/dist/chunk-YHYTW5QA.js +0 -20
- package/dist/chunk-ZCTUYGNV.js +0 -26
- package/dist/chunk-ZDAEGJH4.js +0 -102
- package/dist/chunk-ZJXSXVFP.js +0 -58
- package/dist/chunk-ZOWKWMD2.js +0 -18
- package/dist/chunk-ZUQW5VBZ.js +0 -89
package/dist/pc/pc.rest.js
CHANGED
|
@@ -1,231 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveResourceIndex
|
|
3
|
-
} from "../chunk-KSTV7J2U.js";
|
|
4
|
-
import "../chunk-DPUJDOKV.js";
|
|
5
|
-
import {
|
|
6
|
-
effectiveItemCharges,
|
|
7
|
-
effectiveItemRecovery
|
|
8
|
-
} from "../chunk-NXUY5XQN.js";
|
|
9
|
-
import "../chunk-W6GC6OKK.js";
|
|
10
|
-
import "../chunk-B3DP42OM.js";
|
|
11
|
-
import "../chunk-IUAAXXNO.js";
|
|
12
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
13
|
-
import "../chunk-IHE6KVC3.js";
|
|
14
|
-
import "../chunk-LHZXYFBU.js";
|
|
15
|
-
import "../chunk-LVQLWRCU.js";
|
|
16
|
-
import "../chunk-CM5CWO4K.js";
|
|
17
|
-
import "../chunk-4J6DS3EJ.js";
|
|
18
|
-
import "../chunk-EVMUJYUD.js";
|
|
19
|
-
import "../chunk-VTTA2ALZ.js";
|
|
20
|
-
import "../chunk-ZCTUYGNV.js";
|
|
21
|
-
import "../chunk-3TM34RSJ.js";
|
|
22
|
-
import "../chunk-PDJSUH24.js";
|
|
23
|
-
import "../chunk-WELIKLZF.js";
|
|
24
|
-
|
|
25
|
-
// src/pc/pc.rest.ts
|
|
26
|
-
function resolveItemName(entry, registry) {
|
|
27
|
-
var _a;
|
|
28
|
-
if (!registry) return void 0;
|
|
29
|
-
const ref = entry.item.match(/^\[\[(.+?)\]\]$/);
|
|
30
|
-
const slug = ref ? ref[1] : entry.item;
|
|
31
|
-
return (_a = registry.getBySlug(slug)) == null ? void 0 : _a.name;
|
|
32
|
-
}
|
|
33
|
-
var RESTORED_BY = {
|
|
34
|
-
"short-rest": "short",
|
|
35
|
-
either: "short",
|
|
36
|
-
short: "short",
|
|
37
|
-
"long-rest": "long",
|
|
38
|
-
long: "long",
|
|
39
|
-
dawn: "long",
|
|
40
|
-
dusk: "long",
|
|
41
|
-
turn: null,
|
|
42
|
-
round: null,
|
|
43
|
-
custom: null,
|
|
44
|
-
special: null
|
|
45
|
-
};
|
|
46
|
-
var REST_SPAN = { short: 1, long: 2 };
|
|
47
|
-
function earliestRestoringRest(reset) {
|
|
48
|
-
return Object.prototype.hasOwnProperty.call(RESTORED_BY, reset) ? RESTORED_BY[reset] : null;
|
|
49
|
-
}
|
|
50
|
-
function restRestores(type, reset) {
|
|
51
|
-
const earliest = earliestRestoringRest(reset);
|
|
52
|
-
return earliest !== null && REST_SPAN[earliest] <= REST_SPAN[type];
|
|
53
|
-
}
|
|
54
|
-
function pushPartialRecoveries(cats, character, index, type) {
|
|
55
|
-
var _a, _b;
|
|
56
|
-
for (const [key, fu] of Object.entries((_a = character.state.feature_uses) != null ? _a : {})) {
|
|
57
|
-
if (fu.used <= 0) continue;
|
|
58
|
-
const res = index.get(key);
|
|
59
|
-
if (!((_b = res == null ? void 0 : res.recovery) == null ? void 0 : _b.length)) continue;
|
|
60
|
-
if (restRestores(type, res.reset)) continue;
|
|
61
|
-
const entry = res.recovery.find((r) => r.kind === "uses" && r.flavour === "rest" && restRestores(type, r.entry.reset));
|
|
62
|
-
if (!entry) continue;
|
|
63
|
-
const amount = entry.entry.amount;
|
|
64
|
-
const restore = amount === "all" ? "all" : typeof amount === "number" ? amount : Number(amount);
|
|
65
|
-
if (restore !== "all" && !Number.isFinite(restore)) continue;
|
|
66
|
-
const n = restore === "all" ? fu.used : Math.min(fu.used, restore);
|
|
67
|
-
cats.push({ id: `feature:${key}`, label: res.name, preview: `${n} of ${fu.used} used restored`, restore });
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function pushBuffEnds(cats, character, resolved) {
|
|
71
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
72
|
-
const structured = (d) => !!d && typeof d === "object";
|
|
73
|
-
for (const key of (_a = character.state.active_buffs) != null ? _a : []) {
|
|
74
|
-
let found = false;
|
|
75
|
-
let name = key;
|
|
76
|
-
for (const rf of (_b = resolved.features) != null ? _b : []) {
|
|
77
|
-
if (rf.feature.id === key && structured(rf.feature.duration)) {
|
|
78
|
-
found = true;
|
|
79
|
-
name = (_c = rf.feature.name) != null ? _c : key;
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (!found) {
|
|
84
|
-
for (const pool of (_d = resolved.pools) != null ? _d : []) {
|
|
85
|
-
const entry = [...(_e = pool.selected) != null ? _e : [], ...(_f = pool.grants) != null ? _f : []].find((e) => e.slug === key);
|
|
86
|
-
if (entry && structured(entry.entity.duration)) {
|
|
87
|
-
found = true;
|
|
88
|
-
name = (_g = entry.entity.name) != null ? _g : key;
|
|
89
|
-
break;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (!found) continue;
|
|
94
|
-
cats.push({ id: `buff:${key}`, label: `End ${name}`, preview: "active \u2192 ended" });
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function computeRestPlan(character, resolved, derived, registry, type) {
|
|
98
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
99
|
-
const cats = [];
|
|
100
|
-
let hdRegainDist;
|
|
101
|
-
const index = resolveResourceIndex(resolved);
|
|
102
|
-
const pact = character.state.spell_slots_pact;
|
|
103
|
-
if (pact && pact.used > 0) {
|
|
104
|
-
cats.push({ id: "pact-slots", label: "Pact Magic Slots", preview: "all reset" });
|
|
105
|
-
}
|
|
106
|
-
if (type === "long") {
|
|
107
|
-
if (character.state.hp.current < derived.hp.max) {
|
|
108
|
-
cats.push({
|
|
109
|
-
id: "hp-to-max",
|
|
110
|
-
label: "Hit Points",
|
|
111
|
-
preview: `${character.state.hp.current} \u2192 ${derived.hp.max}`
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
if (character.state.exhaustion > 0) {
|
|
115
|
-
cats.push({
|
|
116
|
-
id: "exhaustion",
|
|
117
|
-
label: "Exhaustion",
|
|
118
|
-
preview: `${character.state.exhaustion} \u2192 ${character.state.exhaustion - 1}`
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
const hpModifier = (_b = (_a = character.overrides) == null ? void 0 : _a.hp) == null ? void 0 : _b.modifier;
|
|
122
|
-
if (hpModifier !== void 0) {
|
|
123
|
-
const signed = hpModifier > 0 ? `+${hpModifier}` : `${hpModifier}`;
|
|
124
|
-
cats.push({
|
|
125
|
-
id: "hp-modifier-reset",
|
|
126
|
-
label: "Max HP Modifier",
|
|
127
|
-
preview: `${signed} \u2192 cleared`
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
const slotsUsed = Object.values((_c = character.state.spell_slots) != null ? _c : {}).reduce((s, slot) => {
|
|
131
|
-
var _a2;
|
|
132
|
-
return s + ((_a2 = slot.used) != null ? _a2 : 0);
|
|
133
|
-
}, 0);
|
|
134
|
-
if (slotsUsed > 0) {
|
|
135
|
-
cats.push({ id: "spell-slots", label: "Spell Slots", preview: "all reset" });
|
|
136
|
-
}
|
|
137
|
-
const totalLevel = (_d = resolved.totalLevel) != null ? _d : 0;
|
|
138
|
-
const regainBudget = Math.max(1, Math.floor(totalLevel / 2));
|
|
139
|
-
const pools = Object.entries((_e = character.state.hit_dice) != null ? _e : {}).map(([die, hd]) => ({ die, used: hd.used, total: hd.total })).filter((p) => p.used > 0).sort((a, b) => b.used - a.used);
|
|
140
|
-
if (pools.length > 0) {
|
|
141
|
-
let left = regainBudget;
|
|
142
|
-
const dist = [];
|
|
143
|
-
for (const p of pools) {
|
|
144
|
-
if (left === 0) break;
|
|
145
|
-
const give = Math.min(p.used, left);
|
|
146
|
-
if (give > 0) dist.push({ die: p.die, give, targetUsed: p.used - give });
|
|
147
|
-
left -= give;
|
|
148
|
-
}
|
|
149
|
-
const totalGive = dist.reduce((s, d) => s + d.give, 0);
|
|
150
|
-
if (totalGive > 0) {
|
|
151
|
-
const detail = dist.map((d) => `${d.die}: +${d.give}`).join(", ");
|
|
152
|
-
cats.push({
|
|
153
|
-
id: "hd-regain",
|
|
154
|
-
label: "Hit Dice",
|
|
155
|
-
preview: `+${totalGive} (${detail})`
|
|
156
|
-
});
|
|
157
|
-
hdRegainDist = dist.map((d) => ({ die: d.die, targetUsed: d.targetUsed }));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
for (const [key, fu] of Object.entries((_f = character.state.feature_uses) != null ? _f : {})) {
|
|
161
|
-
const banked = (_g = character.state.feature_rolls) == null ? void 0 : _g[key];
|
|
162
|
-
const bankedRolls = banked ? banked.filter((v) => v > 0).length : 0;
|
|
163
|
-
if (fu.used <= 0 && bankedRolls <= 0) continue;
|
|
164
|
-
const res = index.get(key);
|
|
165
|
-
if (!restRestores("long", (_h = res == null ? void 0 : res.reset) != null ? _h : "long-rest")) continue;
|
|
166
|
-
const rollsNote = bankedRolls > 0 ? ` \xB7 ${bankedRolls} roll${bankedRolls === 1 ? "" : "s"} cleared` : "";
|
|
167
|
-
cats.push({
|
|
168
|
-
id: `feature:${key}`,
|
|
169
|
-
label: (_i = res == null ? void 0 : res.name) != null ? _i : key,
|
|
170
|
-
preview: `${fu.used}/${fu.max} restored${rollsNote}`
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
pushPartialRecoveries(cats, character, index, "long");
|
|
174
|
-
character.equipment.forEach((entry, idx) => {
|
|
175
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
176
|
-
const view = (_b2 = (_a2 = resolved.infusions) == null ? void 0 : _a2.views.get(idx)) != null ? _b2 : null;
|
|
177
|
-
const rec = effectiveItemRecovery(entry, registry, view);
|
|
178
|
-
const charges = effectiveItemCharges(entry, registry, view);
|
|
179
|
-
if (!rec || !charges) return;
|
|
180
|
-
if (charges.current >= charges.max) return;
|
|
181
|
-
if (!restRestores("long", rec.reset)) return;
|
|
182
|
-
const label = (_e2 = (_d2 = (_c2 = entry.overrides) == null ? void 0 : _c2.name) != null ? _d2 : resolveItemName(entry, registry)) != null ? _e2 : entry.item;
|
|
183
|
-
cats.push({
|
|
184
|
-
id: `item:${idx}`,
|
|
185
|
-
label,
|
|
186
|
-
preview: `${charges.current} \u2192 ${charges.max}`,
|
|
187
|
-
recharge: { amount: rec.amount, current: charges.current, max: charges.max }
|
|
188
|
-
});
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
if (type === "short") {
|
|
192
|
-
for (const [key, fu] of Object.entries((_j = character.state.feature_uses) != null ? _j : {})) {
|
|
193
|
-
const banked = (_k = character.state.feature_rolls) == null ? void 0 : _k[key];
|
|
194
|
-
const bankedRolls = banked ? banked.filter((v) => v > 0).length : 0;
|
|
195
|
-
if (fu.used <= 0 && bankedRolls <= 0) continue;
|
|
196
|
-
const res = index.get(key);
|
|
197
|
-
if (!restRestores("short", (_l = res == null ? void 0 : res.reset) != null ? _l : "long-rest")) continue;
|
|
198
|
-
const rollsNote = bankedRolls > 0 ? ` \xB7 ${bankedRolls} roll${bankedRolls === 1 ? "" : "s"} cleared` : "";
|
|
199
|
-
cats.push({
|
|
200
|
-
id: `feature:${key}`,
|
|
201
|
-
label: (_m = res == null ? void 0 : res.name) != null ? _m : key,
|
|
202
|
-
preview: `${fu.used}/${fu.max} restored${rollsNote}`
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
pushPartialRecoveries(cats, character, index, "short");
|
|
206
|
-
character.equipment.forEach((entry, idx) => {
|
|
207
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
208
|
-
const view = (_b2 = (_a2 = resolved.infusions) == null ? void 0 : _a2.views.get(idx)) != null ? _b2 : null;
|
|
209
|
-
const rec = effectiveItemRecovery(entry, registry, view);
|
|
210
|
-
const charges = effectiveItemCharges(entry, registry, view);
|
|
211
|
-
if (!rec || !charges) return;
|
|
212
|
-
if (charges.current >= charges.max) return;
|
|
213
|
-
if (!restRestores("short", rec.reset)) return;
|
|
214
|
-
const label = (_e2 = (_d2 = (_c2 = entry.overrides) == null ? void 0 : _c2.name) != null ? _d2 : resolveItemName(entry, registry)) != null ? _e2 : entry.item;
|
|
215
|
-
cats.push({
|
|
216
|
-
id: `item:${idx}`,
|
|
217
|
-
label,
|
|
218
|
-
preview: `${charges.current} \u2192 ${charges.max}`,
|
|
219
|
-
recharge: { amount: rec.amount, current: charges.current, max: charges.max }
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
pushBuffEnds(cats, character, resolved);
|
|
224
|
-
const hdAvailable = type === "short" ? Object.entries((_n = character.state.hit_dice) != null ? _n : {}).filter(([, hd]) => hd.used < hd.total).map(([die, hd]) => ({ die, remaining: hd.total - hd.used })) : [];
|
|
225
|
-
return { type, categories: cats, hdAvailable, hdRegainDist };
|
|
226
|
-
}
|
|
227
|
-
export {
|
|
228
|
-
computeRestPlan,
|
|
229
|
-
earliestRestoringRest,
|
|
230
|
-
restRestores
|
|
231
|
-
};
|
|
1
|
+
import{resolveResourceIndex}from"../chunk-PZUPZBTN.js";import"../chunk-NI364WV7.js";import{effectiveItemCharges,effectiveItemRecovery}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-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";function resolveItemName(entry,registry){var _a;if(!registry)return void 0;const ref=entry.item.match(/^\[\[(.+?)\]\]$/);const slug=ref?ref[1]:entry.item;return(_a=registry.getBySlug(slug))==null?void 0:_a.name}var RESTORED_BY={"short-rest":"short",either:"short",short:"short","long-rest":"long",long:"long",dawn:"long",dusk:"long",turn:null,round:null,custom:null,special:null};var REST_SPAN={short:1,long:2};function earliestRestoringRest(reset){return Object.prototype.hasOwnProperty.call(RESTORED_BY,reset)?RESTORED_BY[reset]:null}function restRestores(type,reset){const earliest=earliestRestoringRest(reset);return earliest!==null&&REST_SPAN[earliest]<=REST_SPAN[type]}function pushPartialRecoveries(cats,character,index,type){var _a,_b;for(const[key,fu]of Object.entries((_a=character.state.feature_uses)!=null?_a:{})){if(fu.used<=0)continue;const res=index.get(key);if(!((_b=res==null?void 0:res.recovery)==null?void 0:_b.length))continue;if(restRestores(type,res.reset))continue;const entry=res.recovery.find(r=>r.kind==="uses"&&r.flavour==="rest"&&restRestores(type,r.entry.reset));if(!entry)continue;const amount=entry.entry.amount;const restore=amount==="all"?"all":typeof amount==="number"?amount:Number(amount);if(restore!=="all"&&!Number.isFinite(restore))continue;const n=restore==="all"?fu.used:Math.min(fu.used,restore);cats.push({id:`feature:${key}`,label:res.name,preview:`${n} of ${fu.used} used restored`,restore})}}function pushBuffEnds(cats,character,resolved){var _a,_b,_c,_d,_e,_f,_g;const structured=d=>!!d&&typeof d==="object";for(const key of(_a=character.state.active_buffs)!=null?_a:[]){let found=false;let name=key;for(const rf of(_b=resolved.features)!=null?_b:[]){if(rf.feature.id===key&&structured(rf.feature.duration)){found=true;name=(_c=rf.feature.name)!=null?_c:key;break}}if(!found){for(const pool of(_d=resolved.pools)!=null?_d:[]){const entry=[...(_e=pool.selected)!=null?_e:[],...(_f=pool.grants)!=null?_f:[]].find(e=>e.slug===key);if(entry&&structured(entry.entity.duration)){found=true;name=(_g=entry.entity.name)!=null?_g:key;break}}}if(!found)continue;cats.push({id:`buff:${key}`,label:`End ${name}`,preview:"active \u2192 ended"})}}function computeRestPlan(character,resolved,derived,registry,type){var _a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n;const cats=[];let hdRegainDist;const index=resolveResourceIndex(resolved);const pact=character.state.spell_slots_pact;if(pact&&pact.used>0){cats.push({id:"pact-slots",label:"Pact Magic Slots",preview:"all reset"})}if(type==="long"){if(character.state.hp.current<derived.hp.max){cats.push({id:"hp-to-max",label:"Hit Points",preview:`${character.state.hp.current} \u2192 ${derived.hp.max}`})}if(character.state.exhaustion>0){cats.push({id:"exhaustion",label:"Exhaustion",preview:`${character.state.exhaustion} \u2192 ${character.state.exhaustion-1}`})}const hpModifier=(_b=(_a=character.overrides)==null?void 0:_a.hp)==null?void 0:_b.modifier;if(hpModifier!==void 0){const signed=hpModifier>0?`+${hpModifier}`:`${hpModifier}`;cats.push({id:"hp-modifier-reset",label:"Max HP Modifier",preview:`${signed} \u2192 cleared`})}const slotsUsed=Object.values((_c=character.state.spell_slots)!=null?_c:{}).reduce((s,slot)=>{var _a2;return s+((_a2=slot.used)!=null?_a2:0)},0);if(slotsUsed>0){cats.push({id:"spell-slots",label:"Spell Slots",preview:"all reset"})}const totalLevel=(_d=resolved.totalLevel)!=null?_d:0;const regainBudget=Math.max(1,Math.floor(totalLevel/2));const pools=Object.entries((_e=character.state.hit_dice)!=null?_e:{}).map(([die,hd])=>({die,used:hd.used,total:hd.total})).filter(p=>p.used>0).sort((a,b)=>b.used-a.used);if(pools.length>0){let left=regainBudget;const dist=[];for(const p of pools){if(left===0)break;const give=Math.min(p.used,left);if(give>0)dist.push({die:p.die,give,targetUsed:p.used-give});left-=give}const totalGive=dist.reduce((s,d)=>s+d.give,0);if(totalGive>0){const detail=dist.map(d=>`${d.die}: +${d.give}`).join(", ");cats.push({id:"hd-regain",label:"Hit Dice",preview:`+${totalGive} (${detail})`});hdRegainDist=dist.map(d=>({die:d.die,targetUsed:d.targetUsed}))}}for(const[key,fu]of Object.entries((_f=character.state.feature_uses)!=null?_f:{})){const banked=(_g=character.state.feature_rolls)==null?void 0:_g[key];const bankedRolls=banked?banked.filter(v=>v>0).length:0;if(fu.used<=0&&bankedRolls<=0)continue;const res=index.get(key);if(!restRestores("long",(_h=res==null?void 0:res.reset)!=null?_h:"long-rest"))continue;const rollsNote=bankedRolls>0?` \xB7 ${bankedRolls} roll${bankedRolls===1?"":"s"} cleared`:"";cats.push({id:`feature:${key}`,label:(_i=res==null?void 0:res.name)!=null?_i:key,preview:`${fu.used}/${fu.max} restored${rollsNote}`})}pushPartialRecoveries(cats,character,index,"long");character.equipment.forEach((entry,idx)=>{var _a2,_b2,_c2,_d2,_e2;const view=(_b2=(_a2=resolved.infusions)==null?void 0:_a2.views.get(idx))!=null?_b2:null;const rec=effectiveItemRecovery(entry,registry,view);const charges=effectiveItemCharges(entry,registry,view);if(!rec||!charges)return;if(charges.current>=charges.max)return;if(!restRestores("long",rec.reset))return;const label=(_e2=(_d2=(_c2=entry.overrides)==null?void 0:_c2.name)!=null?_d2:resolveItemName(entry,registry))!=null?_e2:entry.item;cats.push({id:`item:${idx}`,label,preview:`${charges.current} \u2192 ${charges.max}`,recharge:{amount:rec.amount,current:charges.current,max:charges.max}})})}if(type==="short"){for(const[key,fu]of Object.entries((_j=character.state.feature_uses)!=null?_j:{})){const banked=(_k=character.state.feature_rolls)==null?void 0:_k[key];const bankedRolls=banked?banked.filter(v=>v>0).length:0;if(fu.used<=0&&bankedRolls<=0)continue;const res=index.get(key);if(!restRestores("short",(_l=res==null?void 0:res.reset)!=null?_l:"long-rest"))continue;const rollsNote=bankedRolls>0?` \xB7 ${bankedRolls} roll${bankedRolls===1?"":"s"} cleared`:"";cats.push({id:`feature:${key}`,label:(_m=res==null?void 0:res.name)!=null?_m:key,preview:`${fu.used}/${fu.max} restored${rollsNote}`})}pushPartialRecoveries(cats,character,index,"short");character.equipment.forEach((entry,idx)=>{var _a2,_b2,_c2,_d2,_e2;const view=(_b2=(_a2=resolved.infusions)==null?void 0:_a2.views.get(idx))!=null?_b2:null;const rec=effectiveItemRecovery(entry,registry,view);const charges=effectiveItemCharges(entry,registry,view);if(!rec||!charges)return;if(charges.current>=charges.max)return;if(!restRestores("short",rec.reset))return;const label=(_e2=(_d2=(_c2=entry.overrides)==null?void 0:_c2.name)!=null?_d2:resolveItemName(entry,registry))!=null?_e2:entry.item;cats.push({id:`item:${idx}`,label,preview:`${charges.current} \u2192 ${charges.max}`,recharge:{amount:rec.amount,current:charges.current,max:charges.max}})})}pushBuffEnds(cats,character,resolved);const hdAvailable=type==="short"?Object.entries((_n=character.state.hit_dice)!=null?_n:{}).filter(([,hd])=>hd.used<hd.total).map(([die,hd])=>({die,remaining:hd.total-hd.used})):[];return{type,categories:cats,hdAvailable,hdRegainDist}}export{computeRestPlan,earliestRestoringRest,restRestores};
|
package/dist/pc/pc.schema.d.ts
CHANGED
|
@@ -113,8 +113,6 @@ export declare const characterOverridesShape: z.ZodObject<{
|
|
|
113
113
|
}, z.core.$strip>>;
|
|
114
114
|
}, z.core.$strip>>;
|
|
115
115
|
}, z.core.$strip>;
|
|
116
|
-
/** The overrides key set as a type. Paired with `keyof CharacterOverrides` by the compile-time parity
|
|
117
|
-
* assertion in pc.types.ts, which is what actually stops a one-sided addition. */
|
|
118
116
|
export type CharacterOverridesSchemaKeys = keyof z.infer<typeof characterOverridesShape>;
|
|
119
117
|
export declare const characterSchema: z.ZodObject<{
|
|
120
118
|
name: z.ZodString;
|
package/dist/pc/pc.schema.js
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
characterOverridesShape,
|
|
3
|
-
characterSchema
|
|
4
|
-
} from "../chunk-NTU2DXNG.js";
|
|
5
|
-
import "../chunk-S7REMWW4.js";
|
|
6
|
-
export {
|
|
7
|
-
characterOverridesShape,
|
|
8
|
-
characterSchema
|
|
9
|
-
};
|
|
1
|
+
import{characterOverridesShape,characterSchema}from"../chunk-5FEXHY4U.js";import"../chunk-KM75CC6Q.js";export{characterOverridesShape,characterSchema};
|
package/dist/pc/pc.slotting.d.ts
CHANGED
|
@@ -6,44 +6,15 @@ import type { EquipmentEntry, SlotKey } from "./pc.types.js";
|
|
|
6
6
|
export declare function isItemEntity(e: unknown): e is ItemEntity;
|
|
7
7
|
export declare function isWeaponEntity(e: unknown): e is WeaponEntity;
|
|
8
8
|
export declare function isArmorEntity(e: unknown): e is ArmorEntity;
|
|
9
|
-
/** Resolve an equipment entry's `item` wikilink (or bare slug) through the shared
|
|
10
|
-
* base-item resolver so vault-path wikilinks, alias wikilinks, AND
|
|
11
|
-
* compendium-prefixed slugs all resolve consistently. */
|
|
12
9
|
export declare function resolveEntityForEntry(item: string, registry: EntityRegistry): {
|
|
13
10
|
entity: ArmorEntity | WeaponEntity | ItemEntity | null;
|
|
14
11
|
entityType: string | null;
|
|
15
12
|
};
|
|
16
|
-
/** Is this armor a shield? By category, slug or name: the SRD Shield is category "shield" (dnd5e 0.3.13), but
|
|
17
|
-
* imported or hand-authored data (and the SRD bundle before 0.3.13) may carry category "heavy". */
|
|
18
13
|
export declare function isShieldArmor(armor: ArmorEntity): boolean;
|
|
19
|
-
/** The ArmorEntity whose `ac` block governs a slot: the entity itself when armor,
|
|
20
|
-
* or — for a magic item whose `base_item` points at armor — the resolved base. */
|
|
21
14
|
export declare function effectiveArmor(entity: ArmorEntity | WeaponEntity | ItemEntity | null | undefined, registry: EntityRegistry): ArmorEntity | null;
|
|
22
|
-
/** The WeaponEntity whose attack and two-handed rules govern a slot (H234 H2, spec §3.2): the entity itself when it is a
|
|
23
|
-
* weapon, or, for a magic item whose `base_item` resolves to a weapon, that base. ONE hop, exactly like
|
|
24
|
-
* {@link effectiveArmor}: a base that is itself an item is not followed (measured at Gate 0: 108 item-to-item bases, 0
|
|
25
|
-
* cycles, 0 ending at a two-handed weapon; a later multi-hop needs a visited set). Null for armor, a wondrous item, an
|
|
26
|
-
* unresolved slug, or a base that does not resolve to a weapon. */
|
|
27
15
|
export declare function effectiveWeapon(entity: ArmorEntity | WeaponEntity | ItemEntity | null | undefined, registry: EntityRegistry): WeaponEntity | null;
|
|
28
|
-
/** THE two-handed rule (H234 H2, spec §3.2), read by `computeAC`'s shield gate, the `wielding_two_handed` condition and
|
|
29
|
-
* the plugin's equip conflicts:
|
|
30
|
-
* 1-2. an entity whose OWN `properties` is a non-empty list: that list decides, whatever its base (resolved, unresolved or
|
|
31
|
-
* absent). The same precedence as the attack row, whose magic `propertiesOverride` replaces the base list, so the
|
|
32
|
-
* Weapons table's property chips and the two-handed rules cannot disagree;
|
|
33
|
-
* 3. an item with no own properties: its base weapon's, through {@link effectiveWeapon} (needs a registry);
|
|
34
|
-
* 4-6. anything else (no base, an unresolved or non-weapon base, no registry, null): not two-handed, as before.
|
|
35
|
-
* A property entry may be a conditional object; the test is the literal "two_handed". */
|
|
36
16
|
export declare function isTwoHandedWeapon(entity: ArmorEntity | WeaponEntity | ItemEntity | null | undefined, registry?: EntityRegistry | null): boolean;
|
|
37
|
-
/** An armour's own Armor Class term: its `base` plus its `flat` (raw vault data omits `flat`, so it reads 0). ONE rule
|
|
38
|
-
* for the armour and shield terms `computeAC` adds (pc.equipment.ts) and for the AC an entry shows
|
|
39
|
-
* (`effectiveItemArmorClass`, pc.entry-overrides.ts), both read through {@link slotAcTerms}. */
|
|
40
17
|
export declare function armorAcTerm(armor: ArmorEntity): number;
|
|
41
|
-
/** The Armor Class ONE worn armour or shield entry adds by itself, as the two terms a breakdown lists apart: its armour's
|
|
42
|
-
* own term ({@link armorAcTerm}; null when the entry resolves to no armour) and the entry's `overrides.ac_bonus` (0 when
|
|
43
|
-
* absent, or not a number in raw vault data). ONE rule for `computeAC`'s armour and shield slots (pc.equipment.ts) and
|
|
44
|
-
* the AC an entry shows (`effectiveItemArmorClass`, pc.entry-overrides.ts), which wrote "armour term + entry ac_bonus"
|
|
45
|
-
* three times, held equal only by a test (T17, carried from rider EF's review). The item's own `bonuses.ac` is not a
|
|
46
|
-
* slot term: the engine reads it attunement-gated and per condition, so it stays with each consumer. */
|
|
47
18
|
export declare function slotAcTerms(armor: ArmorEntity, entry: EquipmentEntry | undefined): {
|
|
48
19
|
armor: number;
|
|
49
20
|
override: number;
|
package/dist/pc/pc.slotting.js
CHANGED
|
@@ -1,28 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
armorAcTerm,
|
|
3
|
-
defaultSlotForType,
|
|
4
|
-
effectiveArmor,
|
|
5
|
-
effectiveWeapon,
|
|
6
|
-
isArmorEntity,
|
|
7
|
-
isItemEntity,
|
|
8
|
-
isShieldArmor,
|
|
9
|
-
isTwoHandedWeapon,
|
|
10
|
-
isWeaponEntity,
|
|
11
|
-
resolveEntityForEntry,
|
|
12
|
-
slotAcTerms
|
|
13
|
-
} from "../chunk-LHZXYFBU.js";
|
|
14
|
-
import "../chunk-CM5CWO4K.js";
|
|
15
|
-
import "../chunk-ZCTUYGNV.js";
|
|
16
|
-
export {
|
|
17
|
-
armorAcTerm,
|
|
18
|
-
defaultSlotForType,
|
|
19
|
-
effectiveArmor,
|
|
20
|
-
effectiveWeapon,
|
|
21
|
-
isArmorEntity,
|
|
22
|
-
isItemEntity,
|
|
23
|
-
isShieldArmor,
|
|
24
|
-
isTwoHandedWeapon,
|
|
25
|
-
isWeaponEntity,
|
|
26
|
-
resolveEntityForEntry,
|
|
27
|
-
slotAcTerms
|
|
28
|
-
};
|
|
1
|
+
import{armorAcTerm,defaultSlotForType,effectiveArmor,effectiveWeapon,isArmorEntity,isItemEntity,isShieldArmor,isTwoHandedWeapon,isWeaponEntity,resolveEntityForEntry,slotAcTerms}from"../chunk-4IAMSRHD.js";import"../chunk-PZ4L2EEG.js";import"../chunk-63YJPWTM.js";export{armorAcTerm,defaultSlotForType,effectiveArmor,effectiveWeapon,isArmorEntity,isItemEntity,isShieldArmor,isTwoHandedWeapon,isWeaponEntity,resolveEntityForEntry,slotAcTerms};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AppliedBonuses, ConditionEffects, ResolvedCharacter, SpeedLine } from "./pc.types.js";
|
|
2
|
+
import type { FeatureEffectTotals } from "./pc.feature-effects.js";
|
|
3
|
+
type ConditionSpeed = Pick<ConditionEffects, "speed_floor_zero" | "speed_multiplier" | "speed_reduction_ft">;
|
|
4
|
+
export declare function speedAfterConditions(pre: number, ce: ConditionSpeed): number;
|
|
5
|
+
export interface SpeedLineInputs {
|
|
6
|
+
resolved: ResolvedCharacter;
|
|
7
|
+
applied: AppliedBonuses;
|
|
8
|
+
features: FeatureEffectTotals;
|
|
9
|
+
conditions: ConditionSpeed;
|
|
10
|
+
conditionNames: string[];
|
|
11
|
+
walk: {
|
|
12
|
+
race: number;
|
|
13
|
+
additive: number;
|
|
14
|
+
base: number;
|
|
15
|
+
final: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare function buildSpeedLines(i: SpeedLineInputs): SpeedLine[];
|
|
19
|
+
export {};
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A spell damage rider's `spell_scope` read against the character's spells (found 2026-09-29: Potent Spellcasting,
|
|
3
|
-
* Empowered Evocation, Elemental Affinity, Radiant Soul and the Artificer riders said which spells they reach only in
|
|
4
|
-
* prose, so they reached none). Data, not per-feature code: every word of the scope is one test on the spell entity.
|
|
5
|
-
*/
|
|
6
1
|
import type { SpellScope } from "../types/feature-effect.js";
|
|
7
2
|
import type { Spell } from "../spell/spell.types.js";
|
|
8
3
|
import type { ResolvedCharacter, ResolvedSpell } from "./pc.types.js";
|
|
9
|
-
/** Does `spell` deal damage? Its data names at least one damage type. */
|
|
10
4
|
export declare function dealsDamage(spell: Pick<Spell, "damage">): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* The slugs of the character's `spells` a rider with `scope` reaches, unique, in `spells` order: every spell that DEALS
|
|
13
|
-
* DAMAGE and matches every word the scope carries (see `SpellScope`). `pickedTypes` answers `damage_type_pick` (the
|
|
14
|
-
* types the character's pick names; none reaches no spell). No scope reaches none; an empty scope every damaging spell.
|
|
15
|
-
*/
|
|
16
5
|
export declare function spellsInScope(scope: SpellScope | undefined, spells: ReadonlyArray<Pick<ResolvedSpell, "slug" | "entity">>, pickedTypes: (choiceId: string) => string[]): string[];
|
|
17
|
-
/**
|
|
18
|
-
* The damage types the character chose at the `select-inline` `choiceId` of one of its class or subclass features (the
|
|
19
|
-
* 2014 Dragon Ancestor's "Red (Fire)", the 2024 Elemental Affinity's "fire"): the canonical types its answer's option
|
|
20
|
-
* names, in its value or its label. Empty when no feature offers that choice or it is unanswered.
|
|
21
|
-
*/
|
|
22
6
|
export declare function pickedDamageTypes(resolved: Pick<ResolvedCharacter, "classes">, choiceId: string): string[];
|
|
@@ -6,24 +6,12 @@ export interface SpellcastingProfile {
|
|
|
6
6
|
ability: Ability;
|
|
7
7
|
casterType: CasterType;
|
|
8
8
|
preparation: "known" | "prepared";
|
|
9
|
-
/** null when neither block names a list (the converter's EK/AT). Read by the known-spell attribution guard
|
|
10
|
-
* (`attributeUnclassedSpell`, guard (i)) and carried to `SpellcastingClassInfo.spellList`. */
|
|
11
9
|
spellList: string | null;
|
|
12
10
|
table: Record<number, {
|
|
13
11
|
columns?: Record<string, string | number>;
|
|
14
12
|
}>;
|
|
15
13
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Data-driven spellcasting profile for a resolved class, composed FIELD BY FIELD (R4-G1a D7): the caster type comes
|
|
18
|
-
* from the subclass block, else the class block, and without one the entity is not a caster (null: a subclass that
|
|
19
|
-
* only names a save ability grants no Spells tab). The table is the SUBCLASS table when the subclass block supplies
|
|
20
|
-
* the caster type, else the class table, else {}. Preparation is explicit, else inferred from a Prepared Spells /
|
|
21
|
-
* Spells Prepared column in the resolved table, else known. No hardcoded class knowledge.
|
|
22
|
-
*/
|
|
23
14
|
export declare function resolveSpellcasting(rc: ResolvedClass): SpellcastingProfile | null;
|
|
24
|
-
/** The ability a class actually casts with: a per-class override wins, else the
|
|
25
|
-
* data ability from resolveSpellcasting. `dataAbility` is non-nullable by
|
|
26
|
-
* contract: resolve caster-ness (a non-null SpellcastingProfile) BEFORE calling. */
|
|
27
15
|
export declare function effectiveSpellcastingAbility(classSlug: string, dataAbility: Ability, overrides: CharacterOverrides): Ability;
|
|
28
16
|
export interface NormalizedKnownSpell {
|
|
29
17
|
slug: string;
|
|
@@ -33,73 +21,30 @@ export interface NormalizedKnownSpell {
|
|
|
33
21
|
alwaysPrepared: boolean;
|
|
34
22
|
}
|
|
35
23
|
export declare function normalizeKnownSpell(entry: KnownSpellEntry): NormalizedKnownSpell;
|
|
36
|
-
/** One caster class as the attribution rule reads it: a class slug and its profile's `spellList` (null when none is named).
|
|
37
|
-
* The slug is compared through `baseClassName` and also looks up the registered `class` document for its compendium, so it
|
|
38
|
-
* must be a registered class slug: the resolver passes the class-ref slug its own lookup used, the add drawer the resolved
|
|
39
|
-
* entity's `slug` (equal to the registered slug on every bundle and converter class document, and backfilled from it when a
|
|
40
|
-
* custom body omits it). */
|
|
41
24
|
export interface AttributionCaster {
|
|
42
25
|
classSlug: string;
|
|
43
26
|
spellList: string | null;
|
|
44
27
|
}
|
|
45
|
-
/** Every base class name a spell of ONE compendium lists in its `classes`, the compendium read off the registered spell
|
|
46
|
-
* document (`RegisteredEntity.compendium`). ONE walk of the spell bucket per registry fills every compendium's set at once,
|
|
47
|
-
* so each compendium is computed once; the walk repeats only when `registry.count()` changes (an entity registered under a
|
|
48
|
-
* new slug, or one removed). The core registry exposes no change generation, version or event, so the count is the only
|
|
49
|
-
* key. Known gap: re-registering an existing spell in place (same slug, same count; the plugin's `updateEntity` does this)
|
|
50
|
-
* with a different `classes` list is not seen until the count next moves. A compendium with no spells gets the empty set. */
|
|
51
28
|
export declare function listedSpellClassNames(registry: EntityRegistry, compendium: string): ReadonlySet<string>;
|
|
52
|
-
/**
|
|
53
|
-
* R4-G7 T8 RIDER-19 (F-PACT) and its fix rounds 1 and 2 (review C-1): the caster class an UN-CLASSED known spell belongs to.
|
|
54
|
-
* The ONE rule, read by the resolver (an entry with no `class:`) and by the Spells tab's add drawer (the `class:` it writes).
|
|
55
|
-
* The spell stays with the FIRST caster class (class-entry order) unless the first caster's own list is OBSERVABLE and does
|
|
56
|
-
* not name the spell, in which case it goes to the first LATER caster whose base class name the spell's `classes` names.
|
|
57
|
-
* Observable means (i) the first caster's profile names a list (`spellList` non-null; the converter's Arcane Trickster and
|
|
58
|
-
* Eldritch Knight name none, and their spells say `wizard`, never `rogue` / `fighter`) AND (ii) its base class name is
|
|
59
|
-
* listed on at least one spell of the first class document's OWN compendium (`RegisteredEntity.compendium` of the registered
|
|
60
|
-
* `class` document and of each spell document): the SRD 5e bundle lists `paladin` on no spell (DATA-SRD) while a real vault
|
|
61
|
-
* also holds SRD 2024 and converted books that do, so only the class's own book can speak for its list. A class document the
|
|
62
|
-
* registry does not hold, or a compendium with no spells, is unobservable. So a single caster, a spell the first caster's list
|
|
63
|
-
* names (Detect Magic on a Paladin / Warlock), a spell no caster names, and every spell of an unobservable first caster
|
|
64
|
-
* resolve exactly as before RIDER-19; Armor of Agathys (`classes: [warlock]`) on a Player's Handbook Paladin-first Paladin /
|
|
65
|
-
* Warlock goes to the Warlock. Null only when there is no caster class.
|
|
66
|
-
* Consequences a move carries: the spell's DC / attack become the new class's, it follows that class's Pact Magic routing,
|
|
67
|
-
* and a plain entry (no prepared flag) moved from a `known` caster to a `prepared` one is not castable until prepared.
|
|
68
|
-
* Known limit: a list EXTENSION on an observable first caster (a 2014 Fiend Warlock's patron-granted Burning Hands, Bard
|
|
69
|
-
* Magical Secrets, Divine Soul) is not visible in the spell's base-list `classes`, so such a spell moves to a later caster
|
|
70
|
-
* that names it; an explicit `class:` is the override. The class lookup and the registry walk for (ii) run only when a move
|
|
71
|
-
* is in question.
|
|
72
|
-
*/
|
|
73
29
|
export declare function attributeUnclassedSpell(spellClasses: readonly unknown[] | undefined, casters: readonly AttributionCaster[], registry: EntityRegistry): string | null;
|
|
74
30
|
export interface CasterClassInput {
|
|
75
31
|
casterType: CasterType;
|
|
76
32
|
level: number;
|
|
77
33
|
}
|
|
78
34
|
export interface DerivedSpellSlots {
|
|
79
|
-
/** spell level (1..9) → total slots. Levels with 0 slots are omitted. */
|
|
80
35
|
standard: Record<number, number>;
|
|
81
|
-
/** Warlock Pact Magic, or null. */
|
|
82
36
|
pact: {
|
|
83
37
|
level: number;
|
|
84
38
|
total: number;
|
|
85
39
|
} | null;
|
|
86
40
|
}
|
|
87
41
|
type SlotCaster = Exclude<CasterType, "pact">;
|
|
88
|
-
/** The single-class slot table for a progression. Exhaustive by construction: an unhandled member is a COMPILE
|
|
89
|
-
* error at the `never` assignment (a bare switch statement would fall through silently). */
|
|
90
42
|
export declare function slotTableFor(caster: SlotCaster): number[][];
|
|
91
|
-
/**
|
|
92
|
-
* Standard spell slots plus Pact Magic for a character's casting classes. A SINGLE regular caster reads its own
|
|
93
|
-
* progression table through `slotTableFor` (the artificer row included: level-1 slots, then the half-caster rows).
|
|
94
|
-
* TWO OR MORE pool into a multiclass caster level, `full + floor(half/2) + floor(third/3) + ceil(artificer/2)` on
|
|
95
|
-
* the SUMS, read off FULL_CASTER_SLOTS. Warlock levels never join that pool: they produce a separate pact entry.
|
|
96
|
-
*/
|
|
97
43
|
export declare function deriveSpellSlots(classes: CasterClassInput[]): DerivedSpellSlots;
|
|
98
44
|
export interface LimitClassInput {
|
|
99
45
|
classSlug: string;
|
|
100
46
|
level: number;
|
|
101
47
|
profile: SpellcastingProfile;
|
|
102
|
-
/** Ability score for this class's spellcasting ability. */
|
|
103
48
|
abilityScore: number;
|
|
104
49
|
}
|
|
105
50
|
export interface SpellLimit {
|
|
@@ -108,22 +53,7 @@ export interface SpellLimit {
|
|
|
108
53
|
cantripsKnown: number | null;
|
|
109
54
|
preparedOrKnown: number | null;
|
|
110
55
|
}
|
|
111
|
-
/** The converter spells the 2024 column two ways; the bundle uses the first. Serves the PREPARED branch of
|
|
112
|
-
* `computeSpellLimits` and `resolveSpellcasting`'s preparation inference (`hasPreparedColumn`). The KNOWN branch
|
|
113
|
-
* keeps its own candidates (the XPHB Sorcerer and Warlock are known casters whose count sits under
|
|
114
|
-
* "Prepared Spells"). */
|
|
115
56
|
export declare const PREPARED_COLUMNS: string[];
|
|
116
|
-
/** The level term of the prepared-count FALLBACK (used only when no table column supplies the count). Slots round
|
|
117
|
-
* the artificer progression UP; its prepared count rounds DOWN (TCE: "half your artificer level, rounded down").
|
|
118
|
-
* `third` is a DELTA from the shipped `else` arm, which used the whole `level`: reachable in principle now that
|
|
119
|
-
* `resolveSpellcasting` infers `prepared` for the XPHB Arcane Trickster, whose table supplies the count, so no
|
|
120
|
-
* shipped number moves (spec D6c, §8). */
|
|
121
57
|
export declare function preparedLevelTerm(caster: CasterType, level: number): number;
|
|
122
|
-
/**
|
|
123
|
-
* Cantrip and prepared/known counts per casting class. The PREPARED count is TABLE-FIRST (R4-G1a D6c): a
|
|
124
|
-
* PREPARED_COLUMNS cell on the class table row wins outright, and only a row without one falls back to the formula
|
|
125
|
-
* `max(1, abilityMod + preparedLevelTerm(casterType, level))`. The KNOWN count is read from the table alone and is
|
|
126
|
-
* null when the row carries no candidate column.
|
|
127
|
-
*/
|
|
128
58
|
export declare function computeSpellLimits(inputs: LimitClassInput[]): SpellLimit[];
|
|
129
59
|
export {};
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
PREPARED_COLUMNS,
|
|
3
|
-
attributeUnclassedSpell,
|
|
4
|
-
computeSpellLimits,
|
|
5
|
-
deriveSpellSlots,
|
|
6
|
-
effectiveSpellcastingAbility,
|
|
7
|
-
listedSpellClassNames,
|
|
8
|
-
normalizeKnownSpell,
|
|
9
|
-
preparedLevelTerm,
|
|
10
|
-
resolveSpellcasting,
|
|
11
|
-
slotTableFor
|
|
12
|
-
} from "../chunk-DPUJDOKV.js";
|
|
13
|
-
import "../chunk-IUAAXXNO.js";
|
|
14
|
-
import "../chunk-VTTA2ALZ.js";
|
|
15
|
-
import "../chunk-PDJSUH24.js";
|
|
16
|
-
import "../chunk-WELIKLZF.js";
|
|
17
|
-
export {
|
|
18
|
-
PREPARED_COLUMNS,
|
|
19
|
-
attributeUnclassedSpell,
|
|
20
|
-
computeSpellLimits,
|
|
21
|
-
deriveSpellSlots,
|
|
22
|
-
effectiveSpellcastingAbility,
|
|
23
|
-
listedSpellClassNames,
|
|
24
|
-
normalizeKnownSpell,
|
|
25
|
-
preparedLevelTerm,
|
|
26
|
-
resolveSpellcasting,
|
|
27
|
-
slotTableFor
|
|
28
|
-
};
|
|
1
|
+
import{PREPARED_COLUMNS,attributeUnclassedSpell,computeSpellLimits,deriveSpellSlots,effectiveSpellcastingAbility,listedSpellClassNames,normalizeKnownSpell,preparedLevelTerm,resolveSpellcasting,slotTableFor}from"../chunk-NI364WV7.js";import"../chunk-BGX36NPE.js";import"../chunk-CAPYNIGK.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{PREPARED_COLUMNS,attributeUnclassedSpell,computeSpellLimits,deriveSpellSlots,effectiveSpellcastingAbility,listedSpellClassNames,normalizeKnownSpell,preparedLevelTerm,resolveSpellcasting,slotTableFor};
|
|
@@ -1,35 +1,13 @@
|
|
|
1
|
-
/** Read a numeric value from a (sub)class table column at a given level, trying
|
|
2
|
-
* each candidate key in order. Returns null when absent or non-numeric. Shared
|
|
3
|
-
* by spellcasting (Cantrips/Spells Known) and the pool engine (pick counts). */
|
|
4
1
|
export declare function readTableColumn(table: Record<number, {
|
|
5
2
|
columns?: Record<string, string | number>;
|
|
6
3
|
}> | undefined, level: number, keys: string[]): number | null;
|
|
7
|
-
/** All numeric columns of a (sub)class table row at `level`, keyed by column
|
|
8
|
-
* name. Non-numeric / missing cells are omitted. Backs `column('Name')` in the
|
|
9
|
-
* resource max-formula DSL. */
|
|
10
4
|
export declare function numericColumnsAt(table: Record<number, {
|
|
11
5
|
columns?: Record<string, string | number>;
|
|
12
6
|
}> | undefined, level: number): Record<string, number>;
|
|
13
|
-
/** Class-table COLUMN names per `select-entity` choice id (R4-G5 §6.2, invariant 3): the DATA route that makes a
|
|
14
|
-
* levelled pick count GROW. MEASURED 2026-09-07 on both corpora: the Fighter 2024's `weapon-mastery` choice
|
|
15
|
-
* authors `count: 3` at levels 1 / 4 / 10 / 16 while the class table's "Weapon Mastery" column reads
|
|
16
|
-
* 3 / 4 / 5 / 6 (byte-identical between the converter document and the SRD 2024 bundle record); the Barbarian
|
|
17
|
-
* 2024's column reads 2 / 3 / 4 against an authored 2; Paladin / Ranger / Rogue 2024 carry `count: 2` and NO
|
|
18
|
-
* column, which is the correct RAW count. Read only INSIDE dnd5e (`buildDecisionLedger`). G7 handoff: the
|
|
19
|
-
* converter emits `count.column` on the choice itself and this table retires. */
|
|
20
7
|
export declare const COUNT_COLUMNS: Readonly<Record<string, string[]>>;
|
|
21
|
-
/** The column keys for a choice id, by OWN-property lookup (`derivePoolLayout`'s precedent, invariant 3). The
|
|
22
|
-
* guard is LOAD-BEARING, not defensive: `readTableColumn` above iterates its `keys` with `for ... of`, so a
|
|
23
|
-
* plain index on a choice id of `constructor` hands it the Object constructor FUNCTION and THROWS while the
|
|
24
|
-
* ledger is being built. Returns undefined for every id the table does not own. */
|
|
25
8
|
export declare function countColumnsFor(choiceId: string): string[] | undefined;
|
|
26
|
-
/** A DICE cell (`1d6`) of a (sub)class table column at `level`, or null when absent, non-string or not dice-shaped.
|
|
27
|
-
* `readTableColumn` / `numericColumnsAt` parse INTEGERS and would read `1d6` as 1 (R4-G6b §5.3). Own-property
|
|
28
|
-
* reads only: a key of `constructor` hands back the prototype's function otherwise. */
|
|
29
9
|
export declare function diceColumnAt(table: Record<number, {
|
|
30
10
|
columns?: Record<string, string | number>;
|
|
31
11
|
}> | undefined, level: number, key: string): string | null;
|
|
32
|
-
/** The class-table COLUMN that scales an unarmed strike's die, per FEATURE id slug (R4-G6b §5.4's synthetic; the
|
|
33
|
-
* `COUNT_COLUMNS` shape). Mirrors the G7 overlay entry this synthetic retires for SRD data; kept for homebrew. */
|
|
34
12
|
export declare const UNARMED_DIE_COLUMNS: Readonly<Record<string, string>>;
|
|
35
13
|
export declare function unarmedDieColumnFor(featureSlug: string): string | undefined;
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
COUNT_COLUMNS,
|
|
3
|
-
UNARMED_DIE_COLUMNS,
|
|
4
|
-
countColumnsFor,
|
|
5
|
-
diceColumnAt,
|
|
6
|
-
numericColumnsAt,
|
|
7
|
-
readTableColumn,
|
|
8
|
-
unarmedDieColumnFor
|
|
9
|
-
} from "../chunk-IUAAXXNO.js";
|
|
10
|
-
export {
|
|
11
|
-
COUNT_COLUMNS,
|
|
12
|
-
UNARMED_DIE_COLUMNS,
|
|
13
|
-
countColumnsFor,
|
|
14
|
-
diceColumnAt,
|
|
15
|
-
numericColumnsAt,
|
|
16
|
-
readTableColumn,
|
|
17
|
-
unarmedDieColumnFor
|
|
18
|
-
};
|
|
1
|
+
import{COUNT_COLUMNS,UNARMED_DIE_COLUMNS,countColumnsFor,diceColumnAt,numericColumnsAt,readTableColumn,unarmedDieColumnFor}from"../chunk-BGX36NPE.js";export{COUNT_COLUMNS,UNARMED_DIE_COLUMNS,countColumnsFor,diceColumnAt,numericColumnsAt,readTableColumn,unarmedDieColumnFor};
|