@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.types.d.ts
CHANGED
|
@@ -15,9 +15,6 @@ import type { OptionalFeatureEntity } from "@archivist-gg/dnd5e/types/optional-f
|
|
|
15
15
|
import type { PoolLayout, PoolActive } from "../types/selection-pool.js";
|
|
16
16
|
import type { ConditionSlug } from "./conditions.constants.js";
|
|
17
17
|
import type { ResourceIndex } from "./pc.resources.js";
|
|
18
|
-
/** A persisted decision value: entity slug / inline value (string), multi-select
|
|
19
|
-
* slugs (string[]), or an ability-points allocation. Stale/odd legacy values
|
|
20
|
-
* survive parsing (schema is permissive); readers narrow defensively. */
|
|
21
18
|
export type ChoiceValue = string | string[] | Partial<Record<Ability, number>>;
|
|
22
19
|
export type LevelChoices = Record<string, ChoiceValue>;
|
|
23
20
|
export interface ClassEntry {
|
|
@@ -39,9 +36,7 @@ export interface EquipmentEntryOverrides {
|
|
|
39
36
|
immune?: string[];
|
|
40
37
|
vulnerable?: string[];
|
|
41
38
|
condition_immune?: string[];
|
|
42
|
-
/** Per-instance spell payload (e.g. the spell a Spell Scroll casts). */
|
|
43
39
|
spell?: string;
|
|
44
|
-
/** Ability governing this instance's spell save DC / attack when cast. */
|
|
45
40
|
spell_ability?: Ability;
|
|
46
41
|
}
|
|
47
42
|
export interface EquipmentEntryState {
|
|
@@ -60,7 +55,6 @@ export interface EquipmentEntryState {
|
|
|
60
55
|
effect: string;
|
|
61
56
|
};
|
|
62
57
|
}
|
|
63
|
-
/** ART-a (spec §4.3): the infusion marker on an equipment entry; see `infusionMarkerSchema` in pc.schema.ts. */
|
|
64
58
|
export interface InfusionMarker {
|
|
65
59
|
kind: "infused" | "created";
|
|
66
60
|
by: string;
|
|
@@ -79,17 +73,9 @@ export type EquipmentEntry = {
|
|
|
79
73
|
slot?: SlotKey | null;
|
|
80
74
|
overrides?: EquipmentEntryOverrides;
|
|
81
75
|
state?: EquipmentEntryState;
|
|
82
|
-
/** Build-only provenance tag for gear the Builder's Equipment step seeded
|
|
83
|
-
* on the character's behalf (e.g. `"builder:starting"`, `"builder:gold-buy"`).
|
|
84
|
-
* Lets the step reconcile its own grants on re-pick / mode-switch without
|
|
85
|
-
* touching hand-managed entries. Stripped by finishBuild — absent on every
|
|
86
|
-
* finished file. */
|
|
87
76
|
granted_by?: string;
|
|
88
|
-
/** I2a · this entry's stable identity; minted only when something is moved INTO it. */
|
|
89
77
|
id?: string;
|
|
90
|
-
/** I2a · the `id` of the container entry holding this one; ignored while the entry is equipped (C7). */
|
|
91
78
|
in?: string;
|
|
92
|
-
/** ART-a · the infusion marker (spec §4.3): a top-level key, never under `state` or `overrides` (both strict). */
|
|
93
79
|
infusion?: InfusionMarker;
|
|
94
80
|
};
|
|
95
81
|
export interface ResolvedEquipped {
|
|
@@ -116,17 +102,10 @@ export interface KnownSpellObject {
|
|
|
116
102
|
source?: "class" | "feat" | "item" | "race" | "domain";
|
|
117
103
|
prepared?: boolean;
|
|
118
104
|
always_prepared?: boolean;
|
|
119
|
-
/** The spell's own spellcasting ability (e.g. WIS for a Magic Initiate (Cleric)
|
|
120
|
-
* pick). Belongs on the persisted shape for symmetry with ResolvedSpell.ability;
|
|
121
|
-
* feat spells arrive via origin_choices, but a known-spell entry may carry it. */
|
|
122
105
|
ability?: Ability;
|
|
123
106
|
}
|
|
124
107
|
export type KnownSpellEntry = string | KnownSpellObject;
|
|
125
108
|
export type PassiveKind = "perception" | "investigation" | "insight";
|
|
126
|
-
/** The manual proficiency tri, in ONE place. The runtime twin is `proficiencyTri`
|
|
127
|
-
* (pc.schema.ts); `pc.recalc.ts` imports this name for the skills tri, and the plugin's
|
|
128
|
-
* `CharacterEditState` imports it for the tools tri its writers keep (R4-G4 §9.3, UR1;
|
|
129
|
-
* `setToolExpertise` since D4 A), so no consumer re-spells the union. */
|
|
130
109
|
export type ProficiencyTri = "none" | "proficient" | "expertise";
|
|
131
110
|
export interface CharacterOverrides {
|
|
132
111
|
scores?: Partial<Record<Ability, number>>;
|
|
@@ -152,26 +131,9 @@ export interface CharacterOverrides {
|
|
|
152
131
|
speed?: number;
|
|
153
132
|
initiative?: number;
|
|
154
133
|
spellcasting_ability_by_class?: Partial<Record<string, Ability>>;
|
|
155
|
-
/** Character-level spellcasting ability for spells that carry no ability of
|
|
156
|
-
* their own (e.g. a Spell Scroll cast by a non-caster): the DC-ability fallback
|
|
157
|
-
* after a per-instance override and the character's own class ability. */
|
|
158
134
|
spellcasting_ability?: Ability;
|
|
159
135
|
spell_slots?: Record<number, number>;
|
|
160
136
|
attunement_limit?: number;
|
|
161
|
-
/** Manual proficiency edits, mirroring `characterOverridesShape` (pc.schema.ts). `remove`
|
|
162
|
-
* SUPPRESSES a rules-granted entry ("a dwarf who doesn't know dwarvish"). Both keys and EVERY
|
|
163
|
-
* leaf are optional with no defaults, so an untouched note stays byte-identical: every reader
|
|
164
|
-
* uses `?? []` (`?? {}` for the tools tri).
|
|
165
|
-
*
|
|
166
|
-
* `tools.proficiency` is the per-tool manual tri (R4-G4 §9.3, UR1); `languages` deliberately
|
|
167
|
-
* gets none. This line is the ONLY thing keeping the interface honest about it, and what it
|
|
168
|
-
* buys is TYPE VISIBILITY, not survival: the `NoOverridesKeyDrift` pair below compares
|
|
169
|
-
* TOP-LEVEL keys only, so a sibling added to the schema and not here ROUND-TRIPS at runtime
|
|
170
|
-
* (the plugin's `characterToYaml` deep-clones and dumps the RUNTIME object, and `parsePC`
|
|
171
|
-
* runs `characterSchema.safeParse`, which keeps a key the schema declares) while staying
|
|
172
|
-
* UNTYPED, so no consumer can read or write it without a cast. That is the same direction the
|
|
173
|
-
* parity block below states; the STRIPPED case is the other one, a key here that the schema
|
|
174
|
-
* lacks. */
|
|
175
137
|
languages?: {
|
|
176
138
|
add?: string[];
|
|
177
139
|
remove?: string[];
|
|
@@ -181,10 +143,6 @@ export interface CharacterOverrides {
|
|
|
181
143
|
remove?: string[];
|
|
182
144
|
proficiency?: Record<string, ProficiencyTri>;
|
|
183
145
|
};
|
|
184
|
-
/** D4 A: the same add / remove pair for WEAPON and ARMOR proficiencies. A weapon value is a category (`simple`,
|
|
185
|
-
* `martial`) or one weapon (`longsword`, `hand-crossbow`); an armor value is `light`, `medium`, `heavy` or `shield`.
|
|
186
|
-
* Read through `proficiencyKey` (pc.proficiency-normalize.ts), so any spelling of a grant matches. No defaults, like
|
|
187
|
-
* `languages`/`tools`: an untouched note stays byte-identical. */
|
|
188
146
|
weapons?: {
|
|
189
147
|
add?: string[];
|
|
190
148
|
remove?: string[];
|
|
@@ -193,13 +151,6 @@ export interface CharacterOverrides {
|
|
|
193
151
|
add?: string[];
|
|
194
152
|
remove?: string[];
|
|
195
153
|
};
|
|
196
|
-
/** Manual defense edits, mirroring `characterOverridesShape` (pc.schema.ts). SUPPRESSION-ONLY:
|
|
197
|
-
* the absent `add` channel is a DELIBERATE asymmetry with `languages`/`tools` above, not an
|
|
198
|
-
* oversight · do not "complete the pattern". The additive store is `character.defenses.*`,
|
|
199
|
-
* which already exists; a second additive channel would recreate the two-writers divergence
|
|
200
|
-
* R4-P5 exists to remove. Every level is optional with no defaults, so an untouched note stays
|
|
201
|
-
* byte-identical. The store has NO consumer as of this commit · Task 5 writes the first, and
|
|
202
|
-
* should read every level as possibly absent (`?? []`) and match with `toDefenseSlug`. */
|
|
203
154
|
defenses?: {
|
|
204
155
|
resistances?: {
|
|
205
156
|
remove?: string[];
|
|
@@ -246,13 +197,8 @@ export interface CharacterState {
|
|
|
246
197
|
used: number;
|
|
247
198
|
max: number;
|
|
248
199
|
}>;
|
|
249
|
-
/** R4-G5 G8: banked prerolled dice, keyed by the SAME resource id as feature_uses.
|
|
250
|
-
* SIGN IS STATE: negative = spent, positive = live; positions never move. */
|
|
251
200
|
feature_rolls: Record<string, number[]>;
|
|
252
|
-
/** Phase 3 activatable buffs: ids/slugs of activatable features/boons currently
|
|
253
|
-
* toggled on. Their effects fold into recalc only while listed here. */
|
|
254
201
|
active_buffs?: string[];
|
|
255
|
-
/** @deprecated SP5: moved to Character.currency. Tolerated until Task 4 parser migration strips it. */
|
|
256
202
|
currency?: {
|
|
257
203
|
cp: number;
|
|
258
204
|
sp: number;
|
|
@@ -260,22 +206,18 @@ export interface CharacterState {
|
|
|
260
206
|
gp: number;
|
|
261
207
|
pp: number;
|
|
262
208
|
};
|
|
263
|
-
/** @deprecated SP5: removed; per-entry attuned flag is canonical. Tolerated until Task 4 parser migration strips it. */
|
|
264
209
|
attuned_items?: string[];
|
|
265
210
|
}
|
|
266
|
-
/** Per-character sheet state (phases AF and SL): layout and Actions/Passive view choices. Mirrors `sheetStateSchema`. */
|
|
267
211
|
export interface SheetViewFilter {
|
|
268
212
|
show?: string[];
|
|
269
213
|
hide?: string[];
|
|
270
214
|
}
|
|
271
|
-
/** PT (spec §7): one pool tab's view: what Show keeps, the facet values un-ticked (by facet id), the folded groups. */
|
|
272
215
|
export interface SheetPoolView {
|
|
273
216
|
show?: "known" | "granted" | "not-known";
|
|
274
217
|
off?: Record<string, string[]>;
|
|
275
218
|
folded?: string[];
|
|
276
219
|
}
|
|
277
220
|
export interface CharacterSheetState {
|
|
278
|
-
/** `saves: section` (SL) draws the saves as a sidebar section; `body: wide` (D13) is the wide three-column sheet. */
|
|
279
221
|
layout?: {
|
|
280
222
|
saves?: "section";
|
|
281
223
|
body?: "wide";
|
|
@@ -290,32 +232,17 @@ export interface CharacterSheetState {
|
|
|
290
232
|
export interface Character {
|
|
291
233
|
name: string;
|
|
292
234
|
edition: Edition;
|
|
293
|
-
/** Present and `true` only while the file is a Builder draft (autosaved,
|
|
294
|
-
* resumable). Removed by the Builder's Finish action, which flips the file
|
|
295
|
-
* to the full character sheet. Absent on every pre-Builder/finished file. */
|
|
296
235
|
builder?: boolean;
|
|
297
236
|
alignment?: string;
|
|
298
|
-
/** Optional free-text age ("26", "Ageless") — Details step. */
|
|
299
237
|
age?: string;
|
|
300
238
|
race: string | null;
|
|
301
239
|
subrace: string | null;
|
|
302
240
|
background: string | null;
|
|
303
241
|
class: ClassEntry[];
|
|
304
|
-
/** Race/background decision selections, keyed `race:<choice-id>` /
|
|
305
|
-
* `background:<choice-id>` (SP2 Plan 3). */
|
|
306
242
|
origin_choices?: Record<string, ChoiceValue>;
|
|
307
243
|
abilities: Record<Ability, number>;
|
|
308
244
|
ability_method: AbilityMethod;
|
|
309
|
-
/** Persisted Roll-method ability pool (six 4d6-drop-lowest totals) while the
|
|
310
|
-
* file is a Builder draft. Present only in `rolled` mode during a build so
|
|
311
|
-
* the rolled pool survives view close / Obsidian restart (UI state cannot);
|
|
312
|
-
* the Abilities step + Base popover read their pool from here. Removed by the
|
|
313
|
-
* Builder's Finish action (see finishBuild) — a finished file carries none. */
|
|
314
245
|
builder_rolls?: number[];
|
|
315
|
-
/** Persisted Equipment-step mode while the file is a Builder draft: "starting"
|
|
316
|
-
* takes the class/background starting-gear grants, "gold" buys with rolled
|
|
317
|
-
* starting gold, "empty" begins with nothing. Present only during a build;
|
|
318
|
-
* removed by the Builder's Finish action (see finishBuild). */
|
|
319
246
|
builder_equipment_mode?: "starting" | "gold" | "empty";
|
|
320
247
|
skills: {
|
|
321
248
|
proficient: SkillSlug[];
|
|
@@ -335,8 +262,6 @@ export interface Character {
|
|
|
335
262
|
gp: number;
|
|
336
263
|
pp: number;
|
|
337
264
|
};
|
|
338
|
-
/** DM grants: optional-feature slugs resolved onto the character with no class, level or pool behind
|
|
339
|
-
* them. Placement is the declaring note's `surface`, never a flag here. */
|
|
340
265
|
additional_features?: string[];
|
|
341
266
|
notes?: string;
|
|
342
267
|
defenses?: {
|
|
@@ -348,9 +273,6 @@ export interface Character {
|
|
|
348
273
|
sheet?: CharacterSheetState;
|
|
349
274
|
state: CharacterState;
|
|
350
275
|
}
|
|
351
|
-
/** R4-G7 T8 RIDER-23 (F-FEATSRC) · the slot that granted a feat: a class's `choices[<level>].feat` pick, or a 2024
|
|
352
|
-
* background's origin feat. Its two members ARE the `class` and `background` sources below, so a renderer formats `via`
|
|
353
|
-
* through the arms it already has ("Fighter 4", "Background: Soldier"). */
|
|
354
276
|
export type FeatVia = {
|
|
355
277
|
kind: "class";
|
|
356
278
|
slug: string;
|
|
@@ -358,15 +280,10 @@ export type FeatVia = {
|
|
|
358
280
|
} | {
|
|
359
281
|
kind: "background";
|
|
360
282
|
slug: string;
|
|
361
|
-
}
|
|
362
|
-
/** SRD-G T4 (audit §3b): a feat picked through a species trait (the SRD 5.2 Human's Versatile origin feat). */
|
|
363
|
-
| {
|
|
283
|
+
} | {
|
|
364
284
|
kind: "race";
|
|
365
285
|
slug: string;
|
|
366
|
-
}
|
|
367
|
-
/** D2b-A (design §2.2 step 6): a feat a POOL MEMBER grants (Lessons of the First Ones' Origin feat). `slug` is the
|
|
368
|
-
* member's note slug and `name` its display name; `classSlug` / `level` are the pool's class and anchor level. */
|
|
369
|
-
| {
|
|
286
|
+
} | {
|
|
370
287
|
kind: "pool";
|
|
371
288
|
slug: string;
|
|
372
289
|
name: string;
|
|
@@ -391,53 +308,24 @@ export type FeatureSource = {
|
|
|
391
308
|
kind: "feat";
|
|
392
309
|
slug: string;
|
|
393
310
|
via?: FeatVia;
|
|
394
|
-
}
|
|
395
|
-
/** A DM grant listed in `character.additional_features`. No class, no level, no pool behind it. */
|
|
396
|
-
| {
|
|
311
|
+
} | {
|
|
397
312
|
kind: "campaign";
|
|
398
313
|
slug: string;
|
|
314
|
+
} | {
|
|
315
|
+
kind: "item";
|
|
316
|
+
slug: string;
|
|
317
|
+
index: number;
|
|
399
318
|
};
|
|
400
319
|
export interface ResolvedFeature {
|
|
401
320
|
feature: Feature;
|
|
402
321
|
source: FeatureSource;
|
|
403
|
-
/** #3: chosen select-inline option prose, folded onto the PARENT feature for
|
|
404
|
-
* render (a shallow-copy wrapper field — the shared registry entity is never
|
|
405
|
-
* mutated). One entry per select-inline choice with a recorded pick. */
|
|
406
322
|
chosenInline?: {
|
|
407
323
|
label: string;
|
|
408
324
|
description?: string;
|
|
409
325
|
}[];
|
|
410
|
-
/** #3: marks a synthesized chosen-option feature the renderer must SKIP (its
|
|
411
|
-
* prose shows on the parent via chosenInline). A wrapper-only flag —
|
|
412
|
-
* computeFeatureEffects ignores it, so the synthetic's effects still fold. */
|
|
413
326
|
renderSuppressed?: boolean;
|
|
414
|
-
/** The feat's entire substance is a full ability-score improvement (a pure ASI). The DISPLAY layer hides these. */
|
|
415
327
|
buildOnly?: boolean;
|
|
416
|
-
/** The spells this feature's spell-scoped damage riders reach, as its data names them (`memberSpellTargets`): set by
|
|
417
|
-
* `assembleEffectFeatures` on a pool member (Agonizing Blast's cantrip pick, the 2014 invocation's `spell-known`
|
|
418
|
-
* prerequisite). A wrapper-only field; absent on every other feature, whose spell riders then reach no spell. */
|
|
419
328
|
spellTargets?: SpellTargets;
|
|
420
|
-
/** R4-G7 §7.1: EVERY LOWER copy the resolve-time fold collapsed into this wrapper, ASCENDING by level, with
|
|
421
|
-
* that copy's own card identity (`name`, and `description` = its `description` else its `entries` joined) and
|
|
422
|
-
* its `choices` when it carries any. A wrapper-only field, the `chosenInline` precedent: the shared registry
|
|
423
|
-
* `Feature` is never touched.
|
|
424
|
-
*
|
|
425
|
-
* The invariant every walker relies on: the TOP copy's own name, prose and choices stay on `feature` and are
|
|
426
|
-
* NEVER repeated here, so visiting `foldedFrom` (each entry at its own `level`) and then `feature` (at
|
|
427
|
-
* `source.level`) visits every folded copy EXACTLY ONCE, in ascending level order · the order the un-folded
|
|
428
|
-
* list had. That is what keeps "a level-N decision on a repeated feature stays a decision at level N" true,
|
|
429
|
-
* and what keeps the builder's per-level strip complete, while the sheet renders ONE row.
|
|
430
|
-
*
|
|
431
|
-
* Both readers live in `pc.decision-engine.ts`: `visitProficiencyChoices` (through
|
|
432
|
-
* `collectChosenProficiencies`) walks the entries that carry `choices` and nothing else, and
|
|
433
|
-
* `buildDecisionLedger` runs each entry at its own level through the SAME branch it runs the wrapper through
|
|
434
|
-
* (`emitCopy`): its authored choices when it has them, else `recognizeDecision`'s synthesized decision under
|
|
435
|
-
* the suppression filter, else the informational card, else nothing. Per-copy `name` and `description` are
|
|
436
|
-
* load-bearing, not decoration: they decide what the recognizer sees and what the row prints. MEASURED over
|
|
437
|
-
* both corpora, 63 of the 131 repeated-id families have a copy whose description differs from the top copy's
|
|
438
|
-
* and 1 has a differing name (an UPPER BOUND: it counts `ability-score-improvement` families, which are
|
|
439
|
-
* `buildOnly` and never fold; the non-ASI carriers are `artificer-specialist-feature`, `path-feature`,
|
|
440
|
-
* `bard-college-feature`, `expertise` and their siblings). Absent on an unfolded wrapper. */
|
|
441
329
|
foldedFrom?: {
|
|
442
330
|
level: number;
|
|
443
331
|
name: string;
|
|
@@ -452,19 +340,9 @@ export interface ResolvedSpell {
|
|
|
452
340
|
source: "class" | "feat" | "item" | "race" | "domain";
|
|
453
341
|
prepared: boolean;
|
|
454
342
|
alwaysPrepared: boolean;
|
|
455
|
-
/** The spell's OWN spellcasting ability. For a feat spell this carries the
|
|
456
|
-
* chosen ability (e.g. WIS for Magic Initiate (Cleric)) while classSlug stays
|
|
457
|
-
* null (a feat spell is not owned by a class for DC/ability). Absent/undefined
|
|
458
|
-
* for class spells, which derive their ability from classSlug. */
|
|
459
343
|
ability?: Ability | null;
|
|
460
|
-
/** Index of the originating equipment entry when this spell was granted by a
|
|
461
|
-
* per-instance item (e.g. a Spell Scroll). Absent for class/feat/race spells. */
|
|
462
344
|
entryIndex?: number;
|
|
463
|
-
/** True ONLY for a row from character.spells.known (removable / toggleable);
|
|
464
|
-
* absent on every grant · R4-G3b §5.2.7. */
|
|
465
345
|
persisted?: boolean;
|
|
466
|
-
/** True for a spell cast at will without a spell slot: a pool member's `innate` at-will grant (Armor of Shadows'
|
|
467
|
-
* Mage Armor). The Spells tab gives it the At Will chip, never a slot's CAST. Absent on every other row. */
|
|
468
346
|
atWill?: boolean;
|
|
469
347
|
}
|
|
470
348
|
export interface ResolvedClass {
|
|
@@ -473,63 +351,28 @@ export interface ResolvedClass {
|
|
|
473
351
|
subclass: SubclassEntity | null;
|
|
474
352
|
choices: Record<number, LevelChoices>;
|
|
475
353
|
}
|
|
476
|
-
/** One pool member as resolved for a character: a stored PICK (`selected`), a candidate (`available`) or a subclass
|
|
477
|
-
* grant (`grants`). `slug` is always the NOTE's registry slug. A pick is KEYED (ART-a, spec §4.4, §5.1): a COPY of a
|
|
478
|
-
* repeatable note is keyed by its stored `<note slug>#<param>`, so two copies of one note are two entries with one `slug`;
|
|
479
|
-
* a plain pick's `key` is its resolved `slug` (the stored string, or the survivor of a stored twin), unless it was stored
|
|
480
|
-
* with a '#', which is kept; candidates and grants carry `key === slug` and `param: null`. */
|
|
481
354
|
export interface ResolvedPoolEntry {
|
|
482
355
|
slug: string;
|
|
483
356
|
entity: OptionalFeatureEntity;
|
|
484
|
-
/** ART-a (spec §4.6): the pick key the writers compare (see above); the slug for candidates and grants. */
|
|
485
357
|
key: string;
|
|
486
|
-
/** ART-a: a copy's parameter (a full item slug for `learn`, a row key for `create`); null for any other entry, and for a
|
|
487
|
-
* repeatable note stored without `#` (a copy whose option is `needs-choice`). */
|
|
488
358
|
param: string | null;
|
|
489
|
-
/** ART-a (spec §4.1, §5.2): derived by `isItemBound`. Its subject is an item: no character tracker, no boon fold. */
|
|
490
359
|
itemBound: boolean;
|
|
491
|
-
/** ART-a (spec §5.8): present on every selected copy of a repeatable note. */
|
|
492
360
|
option?: import("./pc.infusions.js").CopyOption;
|
|
493
|
-
/** The compendium NAME the REGISTERED entity carries (R4-G5 §9.2.1), stamped at resolve time because `entity` is
|
|
494
|
-
* `e.data` (an H3-rebound member's is a copy of it), which carries none: MEASURED 2026-09-07 over the WHOLE
|
|
495
|
-
* converter output (226 documents under its `OptionalFeatures` folders) and the 7 bundle ones, 0 of 226 and 0 of 7
|
|
496
|
-
* declare a `compendium` key INSIDE the fenced entity body, while 226 of 226 and 7 of 7 declare one in the note's
|
|
497
|
-
* FRONTMATTER, which core keeps on `RegisteredEntity`.
|
|
498
|
-
* The plugin's ONE visibility predicate reads it on BOTH surfaces (§3.2.2). Absent when the registry entry
|
|
499
|
-
* carries none, which in practice means a test double. The COLLAPSE does not read it: its identity is the
|
|
500
|
-
* slug PREFIX (§9.2.2). */
|
|
501
361
|
compendium?: string;
|
|
502
362
|
}
|
|
503
|
-
/** A materialized selection pool: count from the table column, prereq-filtered
|
|
504
|
-
* candidates, player picks (from the choices ledger), and subclass auto-grants. */
|
|
505
363
|
export interface ResolvedPool {
|
|
506
364
|
id: string;
|
|
507
365
|
label: string;
|
|
508
|
-
/** Which resolved class declared this pool (for ledger anchoring + writes). */
|
|
509
366
|
classIndex: number;
|
|
510
|
-
/** Picks allowed at the current level (table column value). */
|
|
511
367
|
count: number;
|
|
512
|
-
/** Lowest class level where count >= 1 — the stable persistence key level. */
|
|
513
368
|
anchorLevel: number;
|
|
514
369
|
selected: ResolvedPoolEntry[];
|
|
515
370
|
available: ResolvedPoolEntry[];
|
|
516
371
|
grants: ResolvedPoolEntry[];
|
|
517
|
-
/** Derived at resolve time from the members' `rendering_hint` (pool-layout.ts),
|
|
518
|
-
* unconditionally: an authored `TabDecl.renders.layout` does not suppress the
|
|
519
|
-
* derivation, it OUTRANKS this field at the tab (§4.2.5). R4-G4 T5 LANDED that precedence in the
|
|
520
|
-
* plugin: `TabsContainer`'s dynamic-pool-tab loop is the ONE reader of this field (measured
|
|
521
|
-
* 2026-09-05 with `grep -rn "pool\.layout" packages/obsidian/src`, one line) and reads
|
|
522
|
-
* authored-then-derived-then-default before handing the string to the `PoolTab` constructor. */
|
|
523
372
|
layout?: PoolLayout;
|
|
524
|
-
/** The OWNED resource id the members spend: the majority of the members' PAYERS (H3b `payingResourceId`: the named id
|
|
525
|
-
* when owned, else its owned declared equivalent, the pool's class first); undefined when no member has an owned payer
|
|
526
|
-
* (R4-G4 §4.2.3, Gate 0 B1; H3b spec §4). */
|
|
527
373
|
resource?: string;
|
|
528
|
-
/** ART-a (spec §4.5): the declaration's `count.label`, copied raw; read through `poolCountLabel` (absent reads "Known"). */
|
|
529
374
|
countLabel?: string;
|
|
530
|
-
/** ART-a (spec §4.5): the declaration's `active`, copied raw; read through `poolActiveWords`. */
|
|
531
375
|
active?: PoolActive;
|
|
532
|
-
/** ART-a (spec §4.5): the declaration's `head_resource`. */
|
|
533
376
|
headResource?: string;
|
|
534
377
|
}
|
|
535
378
|
export interface ResolvedCharacter {
|
|
@@ -538,51 +381,17 @@ export interface ResolvedCharacter {
|
|
|
538
381
|
classes: ResolvedClass[];
|
|
539
382
|
background: BackgroundEntity | null;
|
|
540
383
|
feats: FeatEntity[];
|
|
541
|
-
/** The bare/full slug of the background's resolved origin feat (R4-G3b §8): stamped by the resolver OUTSIDE the
|
|
542
|
-
* feats de-dup guard, so it is set even when the same feat is ALSO a class-slot pick. Read by
|
|
543
|
-
* visitProficiencyChoices' origin arm; `resolved.feats` itself carries no provenance. */
|
|
544
384
|
originFeatSlug?: string;
|
|
545
385
|
totalLevel: number;
|
|
546
386
|
features: ResolvedFeature[];
|
|
547
387
|
spells: ResolvedSpell[];
|
|
548
388
|
pools: ResolvedPool[];
|
|
549
|
-
/** Every `resources[]` entry of every resolved feature, keyed by id, with the DECLARING feature
|
|
550
|
-
* stamped as owner, PLUS every pool pick's own `uses` with the POOL stamped as owner
|
|
551
|
-
* (R4-G4 §3.2.1 and §12). REQUIRED: the resolver's own literal sets it like `pools` and
|
|
552
|
-
* reassigns it after pools resolve. Cast test fixtures omit it. Its readers outside the
|
|
553
|
-
* resolver landed with R4-G4 T3, T4, T5 and T7b. Re-measured 2026-09-06 on the SHIPPED plugin
|
|
554
|
-
* tree: `grep -rn "resolved\.resources" packages/obsidian/src` returns TEN lines, of
|
|
555
|
-
* which SIX are read EXPRESSIONS and four are comment prose. The six expressions sit in six
|
|
556
|
-
* functions across five files: the module-private `resourceLevel`
|
|
557
|
-
* helper of `components/actions/feature-rows.ts` (T3, reading `?.owner`), `renderSpendControl`
|
|
558
|
-
* (`components/actions/spend-control.ts`, reading the entry for its `name` and `die`),
|
|
559
|
-
* `consumeCost` (`components/pool-tab.ts`, reading `?.name` for the Cost label), both T4,
|
|
560
|
-
* `renderPoolHead` (`components/pool-tab.ts`, T5, reading the entry for the tab head's `name`,
|
|
561
|
-
* `die`, `reset` and owner: §4.2.6), and T7b's two: `renderPickTracker`
|
|
562
|
-
* (`components/actions/pick-tracker.ts`, reading the entry for a pick's `reset` and `name`) and
|
|
563
|
-
* `seedFeatureUses` (`pc.resource-seed.ts`), which is the ONE expression that is not a
|
|
564
|
-
* `?.get(...)`: it walks `?.values()` for the entries whose `owner.kind` is `pool`, because a
|
|
565
|
-
* pick's `uses` reaches the seed through no other route. §3.2.1 names its consumers: T3's
|
|
566
|
-
* `resourceLevel(id, ctx)`
|
|
567
|
-
* die helper (§6.2.4), T4's spend control and Cost label (§3.2.2 / §3.2.4), T5's pool-tab
|
|
568
|
-
* head and T7b's tracker and seed (§12.2), all LANDED. T7's restore affordance has LANDED too and
|
|
569
|
-
* reads NOTHING here: its rest arm
|
|
570
|
-
* walks the index `computeRestPlan` re-derives and its card arm routes on `resolveRecovery(rec)`
|
|
571
|
-
* over the RAW `recovery[0]`.
|
|
572
|
-
* Every one of the six reaches it through `?.`, because the plugin's card / row / rest fixtures
|
|
573
|
-
* cast a `ResolvedCharacter` with no index. `computeRestPlan` never reads it at all, it re-derives
|
|
574
|
-
* the index. */
|
|
575
389
|
resources: ResourceIndex;
|
|
576
|
-
/** 2024 Weapon Mastery: bare-normalized slugs of the weapons the character has
|
|
577
|
-
* chosen mastery of, unioned across every class/level `weapon-mastery` pick
|
|
578
|
-
* (e.g. "srd-2024_greatsword" → "greatsword"). Empty when the character has no
|
|
579
|
-
* such pick. Populated by the resolver's collectChosenWeaponMasteries pass. */
|
|
580
390
|
weaponMasteries: string[];
|
|
391
|
+
pactWeapon?: string;
|
|
581
392
|
state: CharacterState;
|
|
582
|
-
/** ART-a (spec §4.6, §5.4): the entry views, counters and flags `buildInfusionContext` derives after the resource
|
|
583
|
-
* index. Absent (no cost) for a character with no item-bound pool and no marker; every fold reads it through
|
|
584
|
-
* `resolveEntryEntity`. */
|
|
585
393
|
infusions?: import("./pc.infusions.js").InfusionContext;
|
|
394
|
+
itemFeatures?: ResolvedFeature[];
|
|
586
395
|
}
|
|
587
396
|
export interface ProficiencySet {
|
|
588
397
|
categories: string[];
|
|
@@ -592,12 +401,31 @@ export interface ACTerm {
|
|
|
592
401
|
source: string;
|
|
593
402
|
amount: number;
|
|
594
403
|
kind: "armor" | "shield" | "item" | "unarmored" | "override" | "dex" | "ability" | "feature";
|
|
595
|
-
/** Situational qualifier carried verbatim from the granting `ac-bonus` effect's `condition`
|
|
596
|
-
* (R4-G3a §3.2.5), e.g. "While wearing heavy armor". Absent = unconditional. Rendered as the
|
|
597
|
-
* AC-tooltip row's `title`; NEVER evaluated. */
|
|
598
404
|
condition?: string;
|
|
599
405
|
}
|
|
600
|
-
|
|
406
|
+
export type SpeedMode = "walk" | "fly" | "swim" | "climb" | "burrow";
|
|
407
|
+
export interface SpeedTerm {
|
|
408
|
+
source: string;
|
|
409
|
+
amount: number;
|
|
410
|
+
condition?: string;
|
|
411
|
+
}
|
|
412
|
+
export interface SpeedLine {
|
|
413
|
+
mode: SpeedMode;
|
|
414
|
+
value: number;
|
|
415
|
+
equalsWalk?: true;
|
|
416
|
+
hover?: true;
|
|
417
|
+
terms: SpeedTerm[];
|
|
418
|
+
}
|
|
419
|
+
export interface ItemSpeedTerm {
|
|
420
|
+
mode: SpeedMode;
|
|
421
|
+
kind: "bonus" | "grant" | "walk";
|
|
422
|
+
source: string;
|
|
423
|
+
amount: number;
|
|
424
|
+
}
|
|
425
|
+
export interface DefenseItemSource {
|
|
426
|
+
index: number;
|
|
427
|
+
name: string;
|
|
428
|
+
}
|
|
601
429
|
export interface HPBreakdown {
|
|
602
430
|
diceSum: number;
|
|
603
431
|
diceSource: "rolled" | "average";
|
|
@@ -618,82 +446,45 @@ export interface HPBreakdown {
|
|
|
618
446
|
override: number | null;
|
|
619
447
|
final: number;
|
|
620
448
|
}
|
|
621
|
-
/** An additive on-hit damage rider (dice or flat) applied to an attack, from a
|
|
622
|
-
* feature (global — all weapon attacks) or a magic item (that weapon only).
|
|
623
|
-
* `amount` is a dice/flat string ("2d6", "1d8", "2"); `damage_type` optional
|
|
624
|
-
* (a bare manual override string carries its type inline, and the schema's
|
|
625
|
-
* `chosen` sentinel is kept, never replaced by the row's type, RIDER-13); `source`
|
|
626
|
-
* is a human label for the expand/tooltip. `condition` is the source's own
|
|
627
|
-
* qualifier ("for a 1st-level spell slot"), CARRIED verbatim and never evaluated,
|
|
628
|
-
* from a feature effect (R4-G7 T8 RIDER-12) and from an item's `damage_riders`
|
|
629
|
-
* entry alike; absent when the source authors none. `scope` is a feature effect's
|
|
630
|
-
* structured weapon scope (its `applies_to` words, ART-c1 Task 9b): the merge in
|
|
631
|
-
* `pc.recalc.ts` keeps the rider only on the rows it reaches (`riderReachesRow`);
|
|
632
|
-
* absent = every row. How the sheet prints a rider (always inside the DAMAGE cell,
|
|
633
|
-
* controller ruling 8) is the plugin renderer's policy, stated once at
|
|
634
|
-
* `weapons-table.ts` `renderWeaponRow`. */
|
|
635
449
|
export interface DamageRider {
|
|
636
450
|
amount: string;
|
|
637
451
|
damage_type?: string;
|
|
638
452
|
source?: string;
|
|
639
453
|
condition?: string;
|
|
640
454
|
scope?: WeaponScope[];
|
|
641
|
-
/** D2b-A: the source of the feature the rider comes from, so its amount resolves against the OWNING class's level
|
|
642
|
-
* and spellcasting modifier (a multiclass character's Guided Precision reads the Artificer's INT). Set by
|
|
643
|
-
* `computeFeatureEffects`; consumed and DROPPED by recalc's rider resolution (an attack row never carries it). */
|
|
644
455
|
owner?: FeatureSource;
|
|
645
456
|
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
457
|
+
export interface ConditionalCrit {
|
|
458
|
+
minRoll: number;
|
|
459
|
+
condition: string;
|
|
460
|
+
source: string;
|
|
461
|
+
}
|
|
650
462
|
export interface SpellTargets {
|
|
651
463
|
refs: string[];
|
|
652
464
|
open: EntityFilter[];
|
|
653
465
|
}
|
|
654
|
-
/** A `damage-bonus` effect with `applies_to: spell` (Agonizing Blast's "your Charisma modifier") or `all` (Hexblade's
|
|
655
|
-
* Curse). The fold carries the authored amount with its `owner`, `targets` and `scope`; recalc resolves the amount against
|
|
656
|
-
* the owning class, reads the targets and the scope against the character's spells into `spells` and drops `owner`,
|
|
657
|
-
* `targets` and `scope`, keeping only riders that reach a spell. `damage_type` survives only when it is a canonical type
|
|
658
|
-
* (a `chosen` or prose type is the spell's own). How the sheet prints it is `addSpellDamageRiders` (inside the roll: an
|
|
659
|
-
* unconditional rider of the spell's own type) and `spellDamageRiderLines` (its own line: a `condition`, like a
|
|
660
|
-
* conditional weapon rider, or another damage type). */
|
|
661
466
|
export interface SpellDamageRider {
|
|
662
467
|
amount: string;
|
|
663
468
|
damage_type?: string;
|
|
664
469
|
source?: string;
|
|
665
470
|
condition?: string;
|
|
666
|
-
/** The scope's `once`: the rider adds to one damage roll of the casting ("one damage roll of that spell"). */
|
|
667
471
|
once?: boolean;
|
|
668
|
-
/** The slugs of the character's resolved spells this rider reaches (recalc). */
|
|
669
472
|
spells?: string[];
|
|
670
|
-
/** Fold only: see {@link DamageRider.owner}. */
|
|
671
473
|
owner?: FeatureSource;
|
|
672
|
-
/** Fold only: the feature's {@link SpellTargets} (a pool member's named spells). */
|
|
673
474
|
targets?: SpellTargets;
|
|
674
|
-
/** Fold only: the effect's `spell_scope` ({} for an unscoped `applies_to: all`: every damaging spell). Absent (and no
|
|
675
|
-
* `targets`) reaches no spell. */
|
|
676
475
|
scope?: SpellScope;
|
|
677
476
|
}
|
|
678
477
|
export interface AttackRow {
|
|
679
478
|
id: string;
|
|
680
479
|
name: string;
|
|
681
480
|
range?: string;
|
|
682
|
-
/** Secondary thrown-mode range ("20/60 ft.") for a throwable melee weapon.
|
|
683
|
-
* Display-only; rendered as a stacked muted second line in the Range cell.
|
|
684
|
-
* Absent otherwise. */
|
|
685
481
|
thrownRange?: string;
|
|
686
482
|
toHit: number;
|
|
687
483
|
damageDice: string;
|
|
688
484
|
damageType: string;
|
|
689
|
-
/** Accumulated additive on-hit damage riders (feature-global + item-local +
|
|
690
|
-
* the migrated manual override), rendered as extra damage chips. Absent when
|
|
691
|
-
* none apply (so untouched rows are unchanged). */
|
|
692
485
|
damageRiders?: DamageRider[];
|
|
693
|
-
/** The weapon's CATEGORY as the attack modes read it (`classifyWeaponRange`): `melee` for a weapon with a melee
|
|
694
|
-
* mode (a thrown melee weapon stays melee), `ranged` for a pure ranged one. A rider's `melee` / `ranged` scope
|
|
695
|
-
* reads it (ART-c1 Task 9b). Absent on the unarmed row. */
|
|
696
486
|
weaponCategory?: "melee" | "ranged";
|
|
487
|
+
attacksPerAction?: number;
|
|
697
488
|
properties: string[];
|
|
698
489
|
proficient: boolean;
|
|
699
490
|
breakdown: {
|
|
@@ -701,45 +492,16 @@ export interface AttackRow {
|
|
|
701
492
|
damage: ACTerm[];
|
|
702
493
|
};
|
|
703
494
|
informational?: import("@archivist-gg/dnd5e/item/item.conditions.types").InformationalBonus[];
|
|
704
|
-
/** Hand slot the attack came from. Absent on an equipped weapon that holds no hand slot (H234 H5: both hands full, an
|
|
705
|
-
* explicit-slot conflict loser, a non-hand slot) and on the unarmed row. The Actions tab finds the originating
|
|
706
|
-
* equipment entry by the index in the row's `id` (`<index>:standard`), never by this field. */
|
|
707
495
|
slotKey?: "mainhand" | "offhand";
|
|
708
|
-
/** Short caption under the weapon name in the Actions tab table.
|
|
709
|
-
* e.g. "martial · versatile". Display-only. */
|
|
710
496
|
subLabel?: string;
|
|
711
|
-
/** Action-economy cost for the Cost badge. Defaults to "action" at
|
|
712
|
-
* render time when absent. Settable via entry.overrides.action. */
|
|
713
497
|
actionCost?: "action" | "bonus-action" | "reaction" | "free" | "special";
|
|
714
|
-
/** The engine's always-present unarmed row (R4-G6b §5): never an equipment entry, never `equipped`, no `slotKey`.
|
|
715
|
-
* The weapons table gates its expand on this flag BEFORE the equipment lookup. Absent on every weapon row. */
|
|
716
498
|
unarmed?: true;
|
|
717
|
-
/** When set, the weapon is being wielded one-handed but has a versatile
|
|
718
|
-
* two-handed option. The Actions tab renders both lines stacked in the
|
|
719
|
-
* damage cell instead of emitting a second row. */
|
|
720
499
|
versatile?: {
|
|
721
500
|
damageDice: string;
|
|
722
501
|
};
|
|
723
|
-
/** Lowest natural-roll threshold that scores a critical hit on this attack,
|
|
724
|
-
* from `crit-range` feature effects (e.g. 19 = "crit on 19–20"). Display-only
|
|
725
|
-
* metadata mapped on in recalc; absent (undefined) for the normal 20-only
|
|
726
|
-
* crit so untouched attack rows are unchanged. The weapons table renders a
|
|
727
|
-
* "crit X–20" caption whenever it is set and < 20. */
|
|
728
502
|
critRange?: number;
|
|
729
|
-
|
|
730
|
-
* feature effects (e.g. ["Reroll 2s", "No disadvantage firing in melee"]).
|
|
731
|
-
* Mapped on in recalc; absent (undefined) when no such effect is present so
|
|
732
|
-
* untouched attack rows are unchanged. The weapons table renders these joined
|
|
733
|
-
* with " · " as a muted caption under the weapon name. */
|
|
503
|
+
conditionalCrits?: ConditionalCrit[];
|
|
734
504
|
attackNotes?: string[];
|
|
735
|
-
/** 2024 Weapon Mastery for this attack, present only when the character has
|
|
736
|
-
* chosen mastery of this weapon AND is proficient with it AND the weapon
|
|
737
|
-
* declares a mastery property. `slug`/`label`/`description`/`gist` come from
|
|
738
|
-
* the mastery glossary (`gist` = a one-line effect summary for the Actions-tab
|
|
739
|
-
* mastery column, e.g. "on fail: Prone"); `derived` carries the computed
|
|
740
|
-
* number for the two numeric masteries (topple → Save DC, graze → On-miss
|
|
741
|
-
* damage) and is absent for the rest. Additive + display-only, absent
|
|
742
|
-
* (undefined) on untouched rows so nothing else changes. */
|
|
743
505
|
mastery?: {
|
|
744
506
|
slug: string;
|
|
745
507
|
label: string;
|
|
@@ -750,13 +512,13 @@ export interface AttackRow {
|
|
|
750
512
|
value: number;
|
|
751
513
|
};
|
|
752
514
|
};
|
|
515
|
+
grantedBy?: string;
|
|
516
|
+
pactWeapon?: true;
|
|
753
517
|
}
|
|
754
518
|
export interface AppliedBonuses {
|
|
755
519
|
ability_bonuses: Partial<Record<Ability, number>>;
|
|
756
520
|
ability_statics: Partial<Record<Ability, number>>;
|
|
757
521
|
save_bonus: number;
|
|
758
|
-
/** SL (spec §11.3): `save_bonus` term by term, one per item, each named by the entry's display name (`overrides.name`, else
|
|
759
|
-
* the item's). The saves breakdown lists these, never a lumped "Equipment" term. */
|
|
760
522
|
save_terms: {
|
|
761
523
|
source: string;
|
|
762
524
|
amount: number;
|
|
@@ -767,13 +529,19 @@ export interface AppliedBonuses {
|
|
|
767
529
|
swim: number;
|
|
768
530
|
climb: number;
|
|
769
531
|
};
|
|
532
|
+
speed_walk_set: number;
|
|
533
|
+
speed_walk_set_terms: {
|
|
534
|
+
source: string;
|
|
535
|
+
amount: number;
|
|
536
|
+
}[];
|
|
537
|
+
speed_terms: ItemSpeedTerm[];
|
|
770
538
|
spell_attack: number;
|
|
771
539
|
spell_save_dc: number;
|
|
772
540
|
defenses: {
|
|
773
|
-
resistances:
|
|
774
|
-
immunities:
|
|
775
|
-
vulnerabilities:
|
|
776
|
-
condition_immunities:
|
|
541
|
+
resistances: DefenseGrant[];
|
|
542
|
+
immunities: DefenseGrant[];
|
|
543
|
+
vulnerabilities: DefenseGrant[];
|
|
544
|
+
condition_immunities: DefenseGrant[];
|
|
777
545
|
};
|
|
778
546
|
informational: import("@archivist-gg/dnd5e/item/item.conditions.types").InformationalBonus[];
|
|
779
547
|
senses: Record<import("@archivist-gg/dnd5e/types/feature-effect").SenseType, number>;
|
|
@@ -788,13 +556,6 @@ export interface DerivedEquipment {
|
|
|
788
556
|
attunementUsed: number;
|
|
789
557
|
attunementLimit: number;
|
|
790
558
|
}
|
|
791
|
-
/**
|
|
792
|
-
* A structured advantage/disadvantage entry surfaced from a `roll-modifier`
|
|
793
|
-
* feature effect. Order-preserving pass-through list on DerivedStats (no
|
|
794
|
-
* dedupe/merge) — each entry carries the owning feature's name as `label`
|
|
795
|
-
* for tooltips. `scope` absent = applies to all rolls of that `roll` type;
|
|
796
|
-
* `condition` absent = always-on (not situational).
|
|
797
|
-
*/
|
|
798
559
|
export interface RollModifierEntry {
|
|
799
560
|
mode: "advantage" | "disadvantage" | "reroll" | "add-d4";
|
|
800
561
|
roll: "ability-check" | "saving-throw" | "attack";
|
|
@@ -802,28 +563,9 @@ export interface RollModifierEntry {
|
|
|
802
563
|
condition?: string;
|
|
803
564
|
label: string;
|
|
804
565
|
}
|
|
805
|
-
/**
|
|
806
|
-
* The two members' aliases, extracted from the entry's inline unions (R4-G3a §5.2). They are
|
|
807
|
-
* declared HERE and nowhere else: `pc/roll-tag-labels.ts`'s `Record<RollModifierMode, string>`
|
|
808
|
-
* tables and `pc/roll-scope.ts` import them, so widening the entry above is a COMPILE error in
|
|
809
|
-
* every label table that has not been extended (§14 row 8i).
|
|
810
|
-
*/
|
|
811
566
|
export type RollModifierMode = RollModifierEntry["mode"];
|
|
812
567
|
export type RollKind = RollModifierEntry["roll"];
|
|
813
|
-
/** The closed `save-outcome` result vocabulary, extracted the same way (R4-G3a §5.3): how much
|
|
814
|
-
* of the effect still lands. `pc/roll-tag-labels.ts` types its OUTCOME glyph table
|
|
815
|
-
* `Record<SaveOutcome, string>`, so the union is spelled ONCE and a widened member is a compile
|
|
816
|
-
* error in the table rather than a silent missing glyph. */
|
|
817
568
|
export type SaveOutcome = SaveOutcomeEntry["on_success"];
|
|
818
|
-
/**
|
|
819
|
-
* A `save-outcome` effect as it leaves the fold (R4-G3a §5.3) · Evasion and its shape-mates
|
|
820
|
-
* ("on a failed save you take half damage, on a success none").
|
|
821
|
-
*
|
|
822
|
-
* `ability` ABSENT means every save, which is the save chip's existing "absent scope = every
|
|
823
|
-
* chip" idiom: the effect schema's `ability: "any"` maps to `undefined` at the fold rather than
|
|
824
|
-
* duplicating the entry six times. `appliesTo` is the effect's `applies_to` prose ("a spell"),
|
|
825
|
-
* carried for the tooltip only; `condition` is the situational qualifier, never evaluated.
|
|
826
|
-
*/
|
|
827
569
|
export interface SaveOutcomeEntry {
|
|
828
570
|
ability?: Ability;
|
|
829
571
|
on_success: "none" | "half" | "full";
|
|
@@ -832,47 +574,20 @@ export interface SaveOutcomeEntry {
|
|
|
832
574
|
condition?: string;
|
|
833
575
|
label: string;
|
|
834
576
|
}
|
|
835
|
-
/** Where a defense came from. Ordered weakest to strongest for the precedence rule in recalc. */
|
|
836
577
|
export type DefenseOrigin = "manual" | "equipment" | "grant";
|
|
837
|
-
/**
|
|
838
|
-
* One defense a feature effect grants, as it leaves the fold (R4-G3a §3.2.1).
|
|
839
|
-
*
|
|
840
|
-
* The four defense totals on FeatureEffectTotals are lists of these. `value` is the AUTHORED
|
|
841
|
-
* spelling, trimmed and never slugified · `toDefenseSlug` runs later, in pc.recalc.ts, which is
|
|
842
|
-
* why the fold's dedupe is a case-insensitive comparison rather than a slug lookup. `sources`
|
|
843
|
-
* holds the granting FEATURE NAMES, merged per value at the fold (two features granting the same
|
|
844
|
-
* immunity yield ONE grant with TWO sources · dropping the second would lose it before
|
|
845
|
-
* composeDefenseEntries ever saw it). `condition` is the first qualifier seen for that value,
|
|
846
|
-
* carried verbatim and NEVER evaluated.
|
|
847
|
-
*/
|
|
848
578
|
export interface DefenseGrant {
|
|
849
579
|
value: string;
|
|
850
580
|
sources: string[];
|
|
851
581
|
condition?: string;
|
|
582
|
+
items?: DefenseItemSource[];
|
|
852
583
|
}
|
|
853
|
-
/**
|
|
854
|
-
* One entry in a derived defense bucket.
|
|
855
|
-
*
|
|
856
|
-
* `value` is ALWAYS `toDefenseSlug(raw)` · it is what every comparison keys on.
|
|
857
|
-
* `label` is the first-spelling-wins display string, which is what preserves an authored "Psychic".
|
|
858
|
-
* `origin` is the STRONGEST contributing source, not the first list to supply it.
|
|
859
|
-
*
|
|
860
|
-
* `sources` is GRANT-ORIGIN attribution only (R4-G3a §3.2.3): the names of the features whose
|
|
861
|
-
* effects granted this value, copied from the DefenseGrant. EQUIPMENT-origin attribution (the
|
|
862
|
-
* `pc.equipment.ts` half of R4-P5 §10.1 · archivist-obsidian/docs/superpowers/specs/
|
|
863
|
-
* 2026-08-05-r4-p5-defenses-design.md, the spec lives in the PLUGIN repo, not this one) stays
|
|
864
|
-
* DEFERRED, so an equipment-only entry carries no `sources` at all and the plugin's chip host
|
|
865
|
-
* must guard on emptiness rather than on origin alone.
|
|
866
|
-
*
|
|
867
|
-
* `condition` is the situational qualifier from the granting effect, carried verbatim for the
|
|
868
|
-
* chip tooltip and NEVER evaluated. Both fields are optional: a manual entry has neither.
|
|
869
|
-
*/
|
|
870
584
|
export interface DefenseEntry {
|
|
871
585
|
value: string;
|
|
872
586
|
label: string;
|
|
873
587
|
origin: DefenseOrigin;
|
|
874
588
|
condition?: string;
|
|
875
589
|
sources?: string[];
|
|
590
|
+
items?: DefenseItemSource[];
|
|
876
591
|
}
|
|
877
592
|
export interface DerivedStats {
|
|
878
593
|
totalLevel: number;
|
|
@@ -894,16 +609,11 @@ export interface DerivedStats {
|
|
|
894
609
|
bonus: number;
|
|
895
610
|
proficiency: "none" | "proficient" | "expertise";
|
|
896
611
|
ability: Ability;
|
|
897
|
-
/** The winning half-proficiency term (Jack of All Trades, Remarkable Athlete) on a skill whose tri is `none`;
|
|
898
|
-
* absent otherwise. Additive: the tri never gains a half value, it is also the `overrides.skills.*.proficiency`
|
|
899
|
-
* enum. Set under an `overrides.skills.<s>.bonus` too (the marker states the rule, the bonus is the number).
|
|
900
|
-
* `source` is the owning feature's name. */
|
|
901
612
|
halfProficiency?: {
|
|
902
613
|
source: string;
|
|
903
614
|
amount: number;
|
|
904
615
|
};
|
|
905
616
|
}>;
|
|
906
|
-
/** Numeric terms behind the sheet's skill, save, speed and initiative hovers. */
|
|
907
617
|
statBreakdowns?: {
|
|
908
618
|
skills: Partial<Record<SkillSlug, {
|
|
909
619
|
source: string;
|
|
@@ -927,7 +637,6 @@ export interface DerivedStats {
|
|
|
927
637
|
investigation: number;
|
|
928
638
|
insight: number;
|
|
929
639
|
};
|
|
930
|
-
/** Computed senses: max of race vision and feature-effect sense ranges. 0 = none per type. */
|
|
931
640
|
senses: Record<import("@archivist-gg/dnd5e/types/feature-effect").SenseType, number>;
|
|
932
641
|
hp: {
|
|
933
642
|
max: number;
|
|
@@ -936,6 +645,7 @@ export interface DerivedStats {
|
|
|
936
645
|
};
|
|
937
646
|
ac: number;
|
|
938
647
|
speed: number;
|
|
648
|
+
speeds?: SpeedLine[];
|
|
939
649
|
initiative: number;
|
|
940
650
|
spellcasting: {
|
|
941
651
|
ability: Ability;
|
|
@@ -943,26 +653,16 @@ export interface DerivedStats {
|
|
|
943
653
|
attackBonus: number;
|
|
944
654
|
preparedCount?: number;
|
|
945
655
|
} | null;
|
|
946
|
-
/** One entry per casting class (multiclass-aware). Empty for non-casters. */
|
|
947
656
|
spellcastingClasses: SpellcastingClassInfo[];
|
|
948
|
-
/** Save DC / attack bonus for spells that carry their OWN spellcasting
|
|
949
|
-
* ability rather than a class (feat-granted spells, e.g. Magic Initiate).
|
|
950
|
-
* Keyed by that ability; populated for every ability a feat spell uses.
|
|
951
|
-
* Computed independently of class casters, so a NON-caster (empty
|
|
952
|
-
* spellcastingClasses / null spellcasting) still gets a real DC/attack.
|
|
953
|
-
* Empty object when the character has no such spell. */
|
|
954
657
|
abilitySpellcasting: Partial<Record<Ability, {
|
|
955
658
|
saveDC: number;
|
|
956
659
|
attackBonus: number;
|
|
957
660
|
}>>;
|
|
958
|
-
/** Derived standard slot totals by spell level (before user override). */
|
|
959
661
|
derivedSpellSlots: Record<number, number>;
|
|
960
|
-
/** Warlock Pact Magic, or null. */
|
|
961
662
|
pactMagic: {
|
|
962
663
|
level: number;
|
|
963
664
|
total: number;
|
|
964
665
|
} | null;
|
|
965
|
-
/** Per-class known/prepared + cantrip limits (advisory). */
|
|
966
666
|
spellLimits: SpellLimitInfo[];
|
|
967
667
|
warnings: string[];
|
|
968
668
|
defenses: {
|
|
@@ -974,35 +674,18 @@ export interface DerivedStats {
|
|
|
974
674
|
acBreakdown: ACTerm[];
|
|
975
675
|
hpBreakdown: HPBreakdown;
|
|
976
676
|
acInformational: import("@archivist-gg/dnd5e/item/item.conditions.types").InformationalBonus[];
|
|
977
|
-
/** Situational saving-throw bonuses (e.g. +1 vs spells) for save tooltips. */
|
|
978
677
|
savesInformational: import("@archivist-gg/dnd5e/item/item.conditions.types").InformationalBonus[];
|
|
979
|
-
/** Situational spell attack / save-DC bonuses for spellcasting tooltips. */
|
|
980
678
|
spellcastingInformational: import("@archivist-gg/dnd5e/item/item.conditions.types").InformationalBonus[];
|
|
981
|
-
/** Situational speed bonuses (e.g. swim while underwater) for speed tooltips. */
|
|
982
679
|
speedInformational: import("@archivist-gg/dnd5e/item/item.conditions.types").InformationalBonus[];
|
|
983
|
-
/**
|
|
984
|
-
* Attacks per Attack action = 1 + max `extra-attack` effect count. Always ≥ 1
|
|
985
|
-
* (everyone gets one attack). The Actions "Attacks" heading shows `(×N)` when > 1.
|
|
986
|
-
*/
|
|
987
680
|
attacksPerAction: number;
|
|
988
681
|
attacks: AttackRow[];
|
|
989
|
-
/** Spell-scoped damage riders that reach at least one of the character's spells, amounts resolved (Agonizing Blast's
|
|
990
|
-
* "3" on Eldritch Blast). Absent when none does. The Spells tab adds them into the spell's roll. */
|
|
991
682
|
spellDamageRiders?: SpellDamageRider[];
|
|
992
683
|
equippedSlots: EquippedSlots;
|
|
993
684
|
carriedWeight: number;
|
|
994
685
|
attunementUsed: number;
|
|
995
686
|
attunementLimit: number;
|
|
996
687
|
conditionEffects: ConditionEffects;
|
|
997
|
-
/**
|
|
998
|
-
* Structured `roll-modifier` entries: four `mode` members since R4-G3a §6, not only advantage/disadvantage.
|
|
999
|
-
* Order-preserving pass-through (no dedupe/merge); rendered as ADV/DIS/RR/+D4 chips.
|
|
1000
|
-
*/
|
|
1001
688
|
rollModifiers: RollModifierEntry[];
|
|
1002
|
-
/**
|
|
1003
|
-
* `save-outcome` entries (R4-G3a §5.3). Order-preserving pass-through; rendered as an outcome
|
|
1004
|
-
* tag ("0/½") on the matching save chip, or on every save chip when `ability` is absent.
|
|
1005
|
-
*/
|
|
1006
689
|
saveOutcomes: SaveOutcomeEntry[];
|
|
1007
690
|
}
|
|
1008
691
|
export interface SpellcastingClassInfo {
|
|
@@ -1012,11 +695,8 @@ export interface SpellcastingClassInfo {
|
|
|
1012
695
|
defaultAbility: Ability;
|
|
1013
696
|
saveDC: number;
|
|
1014
697
|
attackBonus: number;
|
|
1015
|
-
/** The shared caster-type vocabulary; see schemas/caster-type-schema.ts (never spell the members out again). */
|
|
1016
698
|
casterType: CasterType;
|
|
1017
699
|
preparation: "known" | "prepared";
|
|
1018
|
-
/** The profile's `spellList` (null when neither block names one), so the add drawer can call the same
|
|
1019
|
-
* `attributeUnclassedSpell` the resolver does. recalc always sets it; optional so hand-built rows read as unobservable. */
|
|
1020
700
|
spellList?: string | null;
|
|
1021
701
|
}
|
|
1022
702
|
export interface SpellLimitInfo {
|