@archivist-gg/dnd5e 0.3.19 → 0.3.26
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-2NUDWOFG.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-4SYAKWY4.js +1 -0
- package/dist/chunk-56JK6VCL.js +1 -0
- package/dist/chunk-5XDCM6YK.js +1 -0
- package/dist/chunk-63YJPWTM.js +1 -0
- package/dist/chunk-6R46KYGU.js +1 -0
- package/dist/chunk-6W253VHH.js +1 -0
- package/dist/chunk-72PRMZRD.js +1 -0
- package/dist/chunk-757KM22B.js +1 -0
- package/dist/chunk-7EL3GWWJ.js +1 -0
- package/dist/chunk-7FPQJDFD.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-BREHZNTL.js +1 -0
- package/dist/chunk-BZ6BGGZS.js +1 -0
- package/dist/chunk-CAPYNIGK.js +1 -0
- package/dist/chunk-CCAVZANF.js +1 -0
- package/dist/chunk-CCFIINBA.js +1 -0
- package/dist/chunk-CEHL7PPC.js +1 -0
- package/dist/chunk-CMIEZQL4.js +1 -0
- package/dist/chunk-CNMHADNV.js +1 -0
- package/dist/chunk-CSTAQQGX.js +1 -0
- package/dist/chunk-DTB7YBMZ.js +1 -0
- package/dist/chunk-DVUXUIPV.js +1 -0
- package/dist/chunk-DZITM5AG.js +1 -0
- package/dist/chunk-E3MS4M3N.js +1 -0
- package/dist/chunk-E7KFJLDR.js +1 -0
- package/dist/chunk-EAARMPCW.js +1 -0
- package/dist/chunk-EPA24PVZ.js +1 -0
- package/dist/chunk-ETDMOGFO.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-GD7WRCNH.js +1 -0
- package/dist/chunk-GGQDQSIF.js +1 -0
- package/dist/chunk-GIQLIBC7.js +1 -0
- package/dist/chunk-HX7WBOKR.js +1 -0
- package/dist/chunk-I26FHSI6.js +1 -0
- package/dist/chunk-IHPLT2ZT.js +1 -0
- package/dist/chunk-J3RP5C7L.js +1 -0
- package/dist/chunk-J5GL6FLP.js +1 -0
- package/dist/chunk-JXDX2DKF.js +1 -0
- package/dist/chunk-KEXSF3CH.js +1 -0
- package/dist/chunk-KM75CC6Q.js +1 -0
- package/dist/chunk-L2DXF7YS.js +1 -0
- package/dist/chunk-LHH5XSEA.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-MGGKZGLG.js +1 -0
- package/dist/chunk-NEMX7QGG.js +1 -0
- package/dist/chunk-NIWLD33X.js +1 -0
- package/dist/chunk-NU2Z7MTS.js +1 -0
- package/dist/chunk-NYPH7RQN.js +1 -0
- package/dist/chunk-NYTR6NJS.js +1 -0
- package/dist/chunk-O2QZ73GA.js +1 -0
- package/dist/chunk-O776WL7O.js +1 -0
- package/dist/chunk-ONCXJMJM.js +1 -0
- package/dist/chunk-OTRH62HY.js +1 -0
- package/dist/chunk-PFQPP77Q.js +1 -0
- package/dist/chunk-PKIMOVQG.js +1 -0
- package/dist/chunk-PZ3ZZ5H5.js +1 -0
- package/dist/chunk-PZ4L2EEG.js +1 -0
- package/dist/chunk-QMEKQTUT.js +1 -0
- package/dist/chunk-QVWT67WA.js +1 -0
- package/dist/chunk-RE5Z5RNK.js +1 -0
- package/dist/chunk-RHIEOYDX.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-SFK57JAA.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-UBUKCRZ3.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-VVJXZZ4Z.js +1 -0
- package/dist/chunk-WAUNLUFQ.js +1 -0
- package/dist/chunk-X22SISGM.js +1 -0
- package/dist/chunk-XKJXT2PN.js +1 -0
- package/dist/chunk-XPF53K54.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/chunk-ZS5BMNXC.js +1 -0
- package/dist/chunk-ZVL5FXXO.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 +4 -3
- 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 +46 -4
- 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 +5 -0
- package/dist/item/item.schema.js +1 -11
- package/dist/item/item.types.d.ts +5 -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 +44 -3
- 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 +3 -28
- 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 +6 -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 +19 -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 +27 -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 +19 -0
- package/dist/pc/pc.item-effects.js +1 -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 +3 -27
- 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 +8 -131
- package/dist/pc/pc.recalc.js +1 -1042
- package/dist/pc/pc.resolver.d.ts +9 -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 +20 -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 +36 -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 +3 -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 +59 -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 +44 -3
- 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 +11 -23
- 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
|
@@ -1,156 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
qualifiedGrantCovers
|
|
3
|
-
} from "../chunk-3LWMFYKS.js";
|
|
4
|
-
import "../chunk-YDGMBMYI.js";
|
|
5
|
-
import {
|
|
6
|
-
collectChosenProficiencies,
|
|
7
|
-
collectProficiencyGrants,
|
|
8
|
-
computeEffectiveProficiencies,
|
|
9
|
-
computeSuppressedProficiencies
|
|
10
|
-
} from "../chunk-EJD47JHL.js";
|
|
11
|
-
import "../chunk-2LULMQTF.js";
|
|
12
|
-
import "../chunk-QA3YCOML.js";
|
|
13
|
-
import "../chunk-64VNLMSG.js";
|
|
14
|
-
import "../chunk-TOM66P2P.js";
|
|
15
|
-
import "../chunk-KU3YLF6D.js";
|
|
16
|
-
import {
|
|
17
|
-
normKey,
|
|
18
|
-
proficiencyKey,
|
|
19
|
-
proficiencyLabel,
|
|
20
|
-
toProfSlug,
|
|
21
|
-
weaponProfKey
|
|
22
|
-
} from "../chunk-5JXFJ5AU.js";
|
|
23
|
-
import "../chunk-RD2MID3M.js";
|
|
24
|
-
import "../chunk-LICYHPI3.js";
|
|
25
|
-
import "../chunk-PVCEA4HZ.js";
|
|
26
|
-
import "../chunk-KSTV7J2U.js";
|
|
27
|
-
import "../chunk-DPUJDOKV.js";
|
|
28
|
-
import "../chunk-LBEXLN6I.js";
|
|
29
|
-
import "../chunk-NXUY5XQN.js";
|
|
30
|
-
import "../chunk-W6GC6OKK.js";
|
|
31
|
-
import "../chunk-B3DP42OM.js";
|
|
32
|
-
import "../chunk-IUAAXXNO.js";
|
|
33
|
-
import "../chunk-YHYTW5QA.js";
|
|
34
|
-
import "../chunk-ZUQW5VBZ.js";
|
|
35
|
-
import "../chunk-IHE6KVC3.js";
|
|
36
|
-
import "../chunk-LHZXYFBU.js";
|
|
37
|
-
import "../chunk-YBLDE5CG.js";
|
|
38
|
-
import "../chunk-LVQLWRCU.js";
|
|
39
|
-
import "../chunk-CM5CWO4K.js";
|
|
40
|
-
import "../chunk-4J6DS3EJ.js";
|
|
41
|
-
import "../chunk-EVMUJYUD.js";
|
|
42
|
-
import "../chunk-VTTA2ALZ.js";
|
|
43
|
-
import "../chunk-ZCTUYGNV.js";
|
|
44
|
-
import "../chunk-7Q2VPKCD.js";
|
|
45
|
-
import "../chunk-ZDAEGJH4.js";
|
|
46
|
-
import "../chunk-3TM34RSJ.js";
|
|
47
|
-
import "../chunk-PDJSUH24.js";
|
|
48
|
-
import "../chunk-WELIKLZF.js";
|
|
49
|
-
import "../chunk-4U55VNC7.js";
|
|
50
|
-
import "../chunk-UA5KS2PL.js";
|
|
51
|
-
|
|
52
|
-
// src/pc/pc.proficiencies.ts
|
|
53
|
-
function collectProficiencySources(resolved) {
|
|
54
|
-
const g = collectProficiencyGrants(resolved);
|
|
55
|
-
const chosen = collectChosenProficiencies(resolved);
|
|
56
|
-
return {
|
|
57
|
-
...g,
|
|
58
|
-
chosenLanguages: chosen.languages,
|
|
59
|
-
chosenTools: chosen.tools,
|
|
60
|
-
chosenWeapons: chosen.weapons
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
function aggregateProficiencies(resolved) {
|
|
64
|
-
const { armor, weapons } = composeArmorWeapons(resolved);
|
|
65
|
-
const effective = computeEffectiveProficiencies(resolved);
|
|
66
|
-
return { armor: armor.kept, weapons: weapons.kept, tools: effective.tools, languages: effective.languages };
|
|
67
|
-
}
|
|
68
|
-
function proficiencyOverview(resolved, kind) {
|
|
69
|
-
if (kind === "armor" || kind === "weapons") {
|
|
70
|
-
const c = composeArmorWeapons(resolved)[kind];
|
|
71
|
-
return { effective: c.kept, removed: c.suppressed };
|
|
72
|
-
}
|
|
73
|
-
return { effective: computeEffectiveProficiencies(resolved)[kind], removed: computeSuppressedProficiencies(resolved)[kind] };
|
|
74
|
-
}
|
|
75
|
-
function weaponCoveredBy(effective, weapon) {
|
|
76
|
-
const cat = typeof weapon.category === "string" ? weapon.category : "";
|
|
77
|
-
const base = cat.split("-")[0];
|
|
78
|
-
return effective.find((e) => {
|
|
79
|
-
const key = weaponProfKey(e.value);
|
|
80
|
-
if ((key === "simple" || key === "martial") && key === base) return true;
|
|
81
|
-
if (cat && key === normKey(cat)) return true;
|
|
82
|
-
return qualifiedGrantCovers(e.value, weapon);
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
function composeArmorWeapons(resolved) {
|
|
86
|
-
const src = collectProficiencySources(resolved);
|
|
87
|
-
return {
|
|
88
|
-
// Walk order defines `sources` order (spec §4.1): class before feats, and
|
|
89
|
-
// for weapons the class `fixed` names before the class categories, matching
|
|
90
|
-
// the insertion order of the bucket this replaced, exactly.
|
|
91
|
-
//
|
|
92
|
-
// Effect buckets go LAST: first-seen wins the dedupe key, so an existing
|
|
93
|
-
// class or feat grant keeps its shipped spelling and label and the effect
|
|
94
|
-
// only appends its source name. Reordering these silently relabels rows.
|
|
95
|
-
//
|
|
96
|
-
// The chosen weapon PICKS are the second argument, so they are seeded after
|
|
97
|
-
// every grant bucket: a weapon both granted and picked stays ONE row that
|
|
98
|
-
// keeps origin `grant` and its granting source(s) (R4-G3b §7 F5 · the same
|
|
99
|
-
// grants-then-picks order computeEffectiveProficiencies uses for the
|
|
100
|
-
// language and tool buckets). Armor passes none.
|
|
101
|
-
armor: applyKindOverrides(resolved, "armor", composeGrantEntries([src.classArmor, src.featArmor, src.effectArmor])),
|
|
102
|
-
weapons: applyKindOverrides(
|
|
103
|
-
resolved,
|
|
104
|
-
"weapons",
|
|
105
|
-
composeGrantEntries([src.classWeaponFixed, src.classWeaponCategories, src.featWeapons, src.effectWeapons], src.chosenWeapons)
|
|
106
|
-
)
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
function applyKindOverrides(resolved, kind, entries) {
|
|
110
|
-
var _a, _b, _c, _d;
|
|
111
|
-
const ov = (_b = (_a = resolved.definition) == null ? void 0 : _a.overrides) == null ? void 0 : _b[kind];
|
|
112
|
-
const key = (v) => proficiencyKey(kind, v);
|
|
113
|
-
const all = [...entries];
|
|
114
|
-
for (const v of (_c = ov == null ? void 0 : ov.add) != null ? _c : []) {
|
|
115
|
-
if (!all.some((e) => key(e.value) === key(v))) all.push({ value: v, label: prettyName(v), sources: [], origin: "manual" });
|
|
116
|
-
}
|
|
117
|
-
const removes = new Set(((_d = ov == null ? void 0 : ov.remove) != null ? _d : []).map(key));
|
|
118
|
-
const byLabel = (a, b) => a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
119
|
-
return {
|
|
120
|
-
kept: all.filter((e) => !removes.has(key(e.value))).sort(byLabel),
|
|
121
|
-
suppressed: all.filter((e) => removes.has(key(e.value))).sort(byLabel)
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
function composeGrantEntries(buckets, picks = []) {
|
|
125
|
-
const byKey = /* @__PURE__ */ new Map();
|
|
126
|
-
for (const bucket of buckets) {
|
|
127
|
-
for (const g of bucket) {
|
|
128
|
-
const key = toProfSlug(g.value);
|
|
129
|
-
const existing = byKey.get(key);
|
|
130
|
-
if (!existing) {
|
|
131
|
-
byKey.set(key, {
|
|
132
|
-
value: g.value,
|
|
133
|
-
label: prettyName(g.value),
|
|
134
|
-
sources: [g.source],
|
|
135
|
-
origin: "grant"
|
|
136
|
-
});
|
|
137
|
-
continue;
|
|
138
|
-
}
|
|
139
|
-
if (!existing.sources.includes(g.source)) existing.sources.push(g.source);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
for (const v of picks) {
|
|
143
|
-
const k = toProfSlug(v);
|
|
144
|
-
if (!byKey.has(k)) byKey.set(k, { value: v, label: prettyName(v), sources: [], origin: "pick" });
|
|
145
|
-
}
|
|
146
|
-
return [...byKey.values()].sort((a, b) => a.label < b.label ? -1 : a.label > b.label ? 1 : 0);
|
|
147
|
-
}
|
|
148
|
-
function prettyName(slug) {
|
|
149
|
-
return proficiencyLabel(slug);
|
|
150
|
-
}
|
|
151
|
-
export {
|
|
152
|
-
aggregateProficiencies,
|
|
153
|
-
collectProficiencySources,
|
|
154
|
-
proficiencyOverview,
|
|
155
|
-
weaponCoveredBy
|
|
156
|
-
};
|
|
1
|
+
import{qualifiedGrantCovers}from"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import{collectChosenProficiencies,collectProficiencyGrants,computeEffectiveProficiencies,computeSuppressedProficiencies}from"../chunk-J5GL6FLP.js";import"../chunk-2EOGK6R6.js";import"../chunk-RQZCGXUZ.js";import"../chunk-GD7WRCNH.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import{normKey,proficiencyKey,proficiencyLabel,toProfSlug,weaponProfKey}from"../chunk-VTQ4RWEG.js";import"../chunk-J3RP5C7L.js";import"../chunk-WAUNLUFQ.js";import"../chunk-CEHL7PPC.js";import"../chunk-UBUKCRZ3.js";import"../chunk-KEXSF3CH.js";import"../chunk-PFQPP77Q.js";import"../chunk-QVWT67WA.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-3LWOVRLA.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-S5UCI27C.js";import"../chunk-ZVL5FXXO.js";import"../chunk-I26FHSI6.js";function collectProficiencySources(resolved){const g=collectProficiencyGrants(resolved);const chosen=collectChosenProficiencies(resolved);return{...g,chosenLanguages:chosen.languages,chosenTools:chosen.tools,chosenWeapons:chosen.weapons}}function aggregateProficiencies(resolved){const{armor,weapons}=composeArmorWeapons(resolved);const effective=computeEffectiveProficiencies(resolved);return{armor:armor.kept,weapons:weapons.kept,tools:effective.tools,languages:effective.languages}}function proficiencyOverview(resolved,kind){if(kind==="armor"||kind==="weapons"){const c=composeArmorWeapons(resolved)[kind];return{effective:c.kept,removed:c.suppressed}}return{effective:computeEffectiveProficiencies(resolved)[kind],removed:computeSuppressedProficiencies(resolved)[kind]}}function weaponCoveredBy(effective,weapon){const cat=typeof weapon.category==="string"?weapon.category:"";const base=cat.split("-")[0];return effective.find(e=>{const key=weaponProfKey(e.value);if((key==="simple"||key==="martial")&&key===base)return true;if(cat&&key===normKey(cat))return true;return qualifiedGrantCovers(e.value,weapon)})}function composeArmorWeapons(resolved){const src=collectProficiencySources(resolved);return{armor:applyKindOverrides(resolved,"armor",composeGrantEntries([src.classArmor,src.featArmor,src.effectArmor])),weapons:applyKindOverrides(resolved,"weapons",composeGrantEntries([src.classWeaponFixed,src.classWeaponCategories,src.featWeapons,src.effectWeapons],src.chosenWeapons))}}function applyKindOverrides(resolved,kind,entries){var _a,_b,_c,_d;const ov=(_b=(_a=resolved.definition)==null?void 0:_a.overrides)==null?void 0:_b[kind];const key=v=>proficiencyKey(kind,v);const all=[...entries];for(const v of(_c=ov==null?void 0:ov.add)!=null?_c:[]){if(!all.some(e=>key(e.value)===key(v)))all.push({value:v,label:prettyName(v),sources:[],origin:"manual"})}const removes=new Set(((_d=ov==null?void 0:ov.remove)!=null?_d:[]).map(key));const byLabel=(a,b)=>a.label<b.label?-1:a.label>b.label?1:0;return{kept:all.filter(e=>!removes.has(key(e.value))).sort(byLabel),suppressed:all.filter(e=>removes.has(key(e.value))).sort(byLabel)}}function composeGrantEntries(buckets,picks=[]){const byKey=new Map;for(const bucket of buckets){for(const g of bucket){const key=toProfSlug(g.value);const existing=byKey.get(key);if(!existing){byKey.set(key,{value:g.value,label:prettyName(g.value),sources:[g.source],origin:"grant"});continue}if(!existing.sources.includes(g.source))existing.sources.push(g.source)}}for(const v of picks){const k=toProfSlug(v);if(!byKey.has(k))byKey.set(k,{value:v,label:prettyName(v),sources:[],origin:"pick"})}return[...byKey.values()].sort((a,b)=>a.label<b.label?-1:a.label>b.label?1:0)}function prettyName(slug){return proficiencyLabel(slug)}export{aggregateProficiencies,collectProficiencySources,proficiencyOverview,weaponCoveredBy};
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
import type { ResolvedCharacter } from "./pc.types.js";
|
|
1
|
+
import type { ResolvedCharacter, FeatureSource } from "./pc.types.js";
|
|
2
2
|
export type ProficiencyOrigin = "grant" | "pick" | "manual" | "custom";
|
|
3
3
|
export interface ProficiencyEntry {
|
|
4
|
-
/** Canonical slug when the value lands on the domain vocabulary, else the raw string. Spec §3.3. */
|
|
5
4
|
value: string;
|
|
6
|
-
/** Display form. Spec §3.3's first code block (languages/tools) or second (armor/weapons). */
|
|
7
5
|
label: string;
|
|
8
|
-
/** EVERY granting entity's display name, in walk order: class, race,
|
|
9
|
-
* background, feats, then feature EFFECTS last (R4-P3c · both composers order
|
|
10
|
-
* the effect bucket last so a first-seen entity grant keeps its own label). */
|
|
11
6
|
sources: string[];
|
|
12
7
|
origin: ProficiencyOrigin;
|
|
13
|
-
/** R4-G4 §9: tool expertise rides the grant channel (the ONE channel the panel
|
|
14
|
-
* and the modal read); the manual tri `overrides.tools.proficiency` (spec §9.3,
|
|
15
|
-
* Tier B) is its second writer, applied in `computeEffectiveProficiencies`.
|
|
16
|
-
* ABSENT rather than `false` on a plain entry. */
|
|
17
8
|
expertise?: boolean;
|
|
18
9
|
}
|
|
19
|
-
/** One granted value plus the display name of the entity that granted it.
|
|
20
|
-
* `expertise` is present (and `true`) only when the granting effect authored it
|
|
21
|
-
* (R4-G4 §9.2), so a plain grant keeps the exact two-key shape every pre-phase
|
|
22
|
-
* reader was written against. */
|
|
23
10
|
export interface ProficiencyGrant {
|
|
24
11
|
value: string;
|
|
25
12
|
source: string;
|
|
@@ -42,17 +29,6 @@ export interface ProficiencyGrants {
|
|
|
42
29
|
effectTools: ProficiencyGrant[];
|
|
43
30
|
effectLanguages: ProficiencyGrant[];
|
|
44
31
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* class → race → background → feats, and that order defines `sources` ordering
|
|
48
|
-
* downstream (spec §4.1).
|
|
49
|
-
*
|
|
50
|
-
* This module is a LEAF on purpose: it must import nothing from the decision
|
|
51
|
-
* engine module, so that the engine can import it without a cycle. NOT enforced
|
|
52
|
-
* by any test or lint rule · a previous comment claimed a grep guard that has
|
|
53
|
-
* never existed. It is a convention, and this phase adds a feature-effects
|
|
54
|
-
* import that is cycle-free by inspection, not by tooling.
|
|
55
|
-
* The walk returns raw `{value, source}` buckets and nothing else · no
|
|
56
|
-
* humanizing, no sorting, no dedupe. Label composition stays with the
|
|
57
|
-
* module-private `prettyName` in `pc.proficiencies.ts` (spec §7.1). */
|
|
32
|
+
export declare const UNKNOWN_GRANT_SOURCE = "Unknown";
|
|
33
|
+
export declare function grantSourceName(resolved: ResolvedCharacter, kind: FeatureSource["kind"], slug: string): string;
|
|
58
34
|
export declare function collectProficiencyGrants(resolved: ResolvedCharacter): ProficiencyGrants;
|
|
@@ -1,43 +1,8 @@
|
|
|
1
|
-
/** Normalized token-set key for matching class weapon DISPLAY names ("hand crossbows")
|
|
2
|
-
* against weapon-entity names ("Crossbow, hand"). EXACT equality on the key; verified
|
|
3
|
-
* collision-free across the SRD weapon set. Strip-"s" singularizer does not handle
|
|
4
|
-
* irregular plurals; no SRD weapon triggers that. */
|
|
5
1
|
export declare const normKey: (s: string) => string;
|
|
6
|
-
/** Canonical proficiency slug: lowercase, curly apostrophe folded to ASCII,
|
|
7
|
-
* whitespace collapsed to hyphens. Universally idempotent (one pass removes all
|
|
8
|
-
* whitespace) and the IDENTITY over ALL_SKILL_SLUGS / ALL_LANGUAGES / ALL_TOOLS,
|
|
9
|
-
* which are already canonical. The fold list is deliberately U+2019-only: no SRD
|
|
10
|
-
* tool name contains any other non-ASCII character. */
|
|
11
2
|
export declare const toProfSlug: (s: string) => string;
|
|
12
|
-
/** Apostrophe-safe title case: capitalizes only at start-of-string or after
|
|
13
|
-
* whitespace, never after `'` (so "smith's-tools" reads "Smith's Tools", not
|
|
14
|
-
* "Smith'S Tools"). Intentionally the same body as the plugin's humanizeSlug.
|
|
15
|
-
* The divergence that matters is one level up: prettyName is
|
|
16
|
-
* humanizeProficiency(toProfSlug(x)), and the U+2019 fold lives in toProfSlug.
|
|
17
|
-
* Do NOT "simplify" prettyName to a bare humanizer call · that reintroduces
|
|
18
|
-
* the duplicate-row defect (one proficiency rendering as two rows). */
|
|
19
3
|
export declare const humanizeProficiency: (s: string) => string;
|
|
20
|
-
/** The display label for one AUTHORED proficiency value that no vocabulary canonicalizes (R4-G7 T8 RIDER-14).
|
|
21
|
-
* The rule reads the value's SHAPE, never a word list:
|
|
22
|
-
* - a value with no whitespace is a slug ("thieves'-tools", "heavy"), and a phrase with no uppercase letter
|
|
23
|
-
* ("hand crossbows") carries no authored casing and shares its slug's `toProfSlug` key: both keep today's
|
|
24
|
-
* `humanizeProficiency(toProfSlug(raw))` (the fold and the apostrophe rule of the composition above);
|
|
25
|
-
* - a phrase that carries authored uppercase is PROSE ("Martial weapons that have the Light property",
|
|
26
|
-
* "... the 2H or H property") and prints as authored: U+2019 folded to ASCII, whitespace trimmed and collapsed,
|
|
27
|
-
* the first character capitalised, every other letter untouched. Title-casing it word by word lower-cased
|
|
28
|
-
* `2H` to `2h` and read "That Have The Light Property". */
|
|
29
4
|
export declare const proficiencyLabel: (raw: string) => string;
|
|
30
|
-
/** The four proficiency kinds the sheet lists and the D4 pickers edit, one picker per kind. */
|
|
31
5
|
export type ProficiencyKind = "armor" | "weapons" | "tools" | "languages";
|
|
32
|
-
/** D4 A: the key of a WEAPON proficiency value, so every spelling of one grant folds onto one key. A category reads
|
|
33
|
-
* `simple` or `martial` whatever its spelling ("martial", "Martial weapons"); anything else is keyed by
|
|
34
|
-
* {@link normKey}, the rule the live weapon gate (`isWeaponSlugProficient`) matches a weapon's name by, so
|
|
35
|
-
* "longswords", "Longsword" and "longsword" meet, and "hand-crossbow" meets "Hand Crossbows" and "Crossbow, hand". */
|
|
36
6
|
export declare const weaponProfKey: (raw: string) => string;
|
|
37
|
-
/** D4 A: the key of an ARMOR proficiency value: `light`, `medium`, `heavy`, `shield` whatever the spelling
|
|
38
|
-
* ("Heavy armor", "shields"). */
|
|
39
7
|
export declare const armorProfKey: (raw: string) => string;
|
|
40
|
-
/** D4 A: the one comparison key per kind, used by the engine's override readers and the plugin's writers alike, so a
|
|
41
|
-
* value the writer stores and the value the reader suppresses always meet. Languages and tools keep `toProfSlug`,
|
|
42
|
-
* unchanged. */
|
|
43
8
|
export declare const proficiencyKey: (kind: ProficiencyKind, raw: string) => string;
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
armorProfKey,
|
|
3
|
-
humanizeProficiency,
|
|
4
|
-
normKey,
|
|
5
|
-
proficiencyKey,
|
|
6
|
-
proficiencyLabel,
|
|
7
|
-
toProfSlug,
|
|
8
|
-
weaponProfKey
|
|
9
|
-
} from "../chunk-5JXFJ5AU.js";
|
|
10
|
-
export {
|
|
11
|
-
armorProfKey,
|
|
12
|
-
humanizeProficiency,
|
|
13
|
-
normKey,
|
|
14
|
-
proficiencyKey,
|
|
15
|
-
proficiencyLabel,
|
|
16
|
-
toProfSlug,
|
|
17
|
-
weaponProfKey
|
|
18
|
-
};
|
|
1
|
+
import{armorProfKey,humanizeProficiency,normKey,proficiencyKey,proficiencyLabel,toProfSlug,weaponProfKey}from"../chunk-VTQ4RWEG.js";export{armorProfKey,humanizeProficiency,normKey,proficiencyKey,proficiencyLabel,toProfSlug,weaponProfKey};
|
|
@@ -6,19 +6,6 @@ interface ProficienciesForQuery {
|
|
|
6
6
|
weapons: ProficiencySet;
|
|
7
7
|
tools: ProficiencySet;
|
|
8
8
|
}
|
|
9
|
-
/** NOT the live weapon gate · that is `isWeaponSlugProficient` in
|
|
10
|
-
* `pc.equipment.ts`, reached from `computeAttacks`. The two are near-twins,
|
|
11
|
-
* NOT aliases: that function's docblock records where their matching diverges,
|
|
12
|
-
* so anything asserting runtime behaviour must call it, not this one. */
|
|
13
9
|
export declare function isProficientWithWeapon(weapon: WeaponEntity, profs: ProficienciesForQuery): boolean;
|
|
14
|
-
/** No live armor gate exists at all · nothing in the product gates on armor
|
|
15
|
-
* proficiency today (`computeAppliedBonuses` takes `_profs` and ignores it),
|
|
16
|
-
* so this has no production caller either. Do NOT read that as "the
|
|
17
|
-
* `.specific` branch is dead": `normalizeArmorProf` in `pc.recalc.ts` routes
|
|
18
|
-
* an authored `armor: { specific: [...] }` block straight into it. No SRD
|
|
19
|
-
* entity uses that object form for armor yet, but `weapons:` and `tools:`
|
|
20
|
-
* already do in the same `proficiencies:` block, so it is one plausible
|
|
21
|
-
* keystroke away · and the function is published API besides. Trimming that
|
|
22
|
-
* branch could silently regress either. */
|
|
23
10
|
export declare function isProficientWithArmor(armor: ArmorEntity, profs: ProficienciesForQuery): boolean;
|
|
24
11
|
export {};
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
qualifiedGrantCovers
|
|
3
|
-
} from "../chunk-3LWMFYKS.js";
|
|
4
|
-
import "../chunk-YDGMBMYI.js";
|
|
5
|
-
import {
|
|
6
|
-
normKey
|
|
7
|
-
} from "../chunk-5JXFJ5AU.js";
|
|
8
|
-
import "../chunk-ZCTUYGNV.js";
|
|
9
|
-
|
|
10
|
-
// src/pc/pc.proficiency-query.ts
|
|
11
|
-
function isProficientWithWeapon(weapon, profs) {
|
|
12
|
-
if (profs.weapons.specific.some((e) => e === weapon.slug || normKey(e) === normKey(weapon.name))) return true;
|
|
13
|
-
if (profs.weapons.specific.some((e) => qualifiedGrantCovers(e, weapon))) return true;
|
|
14
|
-
const baseCategory = weapon.category.split("-")[0];
|
|
15
|
-
return profs.weapons.categories.includes(baseCategory);
|
|
16
|
-
}
|
|
17
|
-
function isProficientWithArmor(armor, profs) {
|
|
18
|
-
if (profs.armor.specific.includes(armor.slug)) return true;
|
|
19
|
-
if (profs.armor.categories.includes(armor.category)) return true;
|
|
20
|
-
if (armor.category === "light" && (profs.armor.categories.includes("medium") || profs.armor.categories.includes("heavy"))) return true;
|
|
21
|
-
if (armor.category === "medium" && profs.armor.categories.includes("heavy")) return true;
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
isProficientWithArmor,
|
|
26
|
-
isProficientWithWeapon
|
|
27
|
-
};
|
|
1
|
+
import{qualifiedGrantCovers}from"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import{normKey}from"../chunk-VTQ4RWEG.js";import"../chunk-63YJPWTM.js";function isProficientWithWeapon(weapon,profs){if(profs.weapons.specific.some(e=>e===weapon.slug||normKey(e)===normKey(weapon.name)))return true;if(profs.weapons.specific.some(e=>qualifiedGrantCovers(e,weapon)))return true;const baseCategory=weapon.category.split("-")[0];return profs.weapons.categories.includes(baseCategory)}function isProficientWithArmor(armor,profs){if(profs.armor.specific.includes(armor.slug))return true;if(profs.armor.categories.includes(armor.category))return true;if(armor.category==="light"&&(profs.armor.categories.includes("medium")||profs.armor.categories.includes("heavy")))return true;if(armor.category==="medium"&&profs.armor.categories.includes("heavy"))return true;return false}export{isProficientWithArmor,isProficientWithWeapon};
|
package/dist/pc/pc.recalc.d.ts
CHANGED
|
@@ -4,161 +4,37 @@ import type { RaceEntity } from "@archivist-gg/dnd5e/race/race.types";
|
|
|
4
4
|
import type { EntityRegistry } from "@archivist-gg/core";
|
|
5
5
|
import { type UnarmedStrikeSpec } from "./pc.equipment.js";
|
|
6
6
|
import { type FeatureEffectTotals } from "./pc.feature-effects.js";
|
|
7
|
+
import type { WeaponScope } from "../types/feature-effect.js";
|
|
7
8
|
import type { ACTerm, AttackRow, DamageRider, DerivedStats, ProficiencySet, ResolvedCharacter, ResolvedClass, CharacterOverrides } from "./pc.types.js";
|
|
8
|
-
/**
|
|
9
|
-
* PHB "fixed average" value per hit die (per level beyond first). Called
|
|
10
|
-
* "average" in the PHB but actually ceil((die + 1) / 2); equivalent to
|
|
11
|
-
* Math.floor(die / 2) + 1 for even dice.
|
|
12
|
-
*
|
|
13
|
-
* d6 → 4, d8 → 5, d10 → 6, d12 → 7.
|
|
14
|
-
*/
|
|
15
9
|
export declare function phbAverageForDie(hitDieStr: string): number;
|
|
16
|
-
/** Extracts the integer size from "d8" / "d10" / 8 / 10. */
|
|
17
10
|
export declare function parseDieSize(die: string | number | undefined | null): number | null;
|
|
18
|
-
/**
|
|
19
|
-
* Flattens RaceEntity.ability_score_increases into a partial ability→bonus map.
|
|
20
|
-
* Fixed increases contribute their amount directly. Choice increases are ignored
|
|
21
|
-
* here — they're expected to come through class.choices with a specific ability
|
|
22
|
-
* selected, which computeAbilityScores handles separately.
|
|
23
|
-
*/
|
|
24
11
|
export declare function flattenRaceAsi(race: RaceEntity | null): Partial<Record<Ability, number>>;
|
|
25
|
-
/**
|
|
26
|
-
* Sums the LEGACY class-level ASI-BRANCH allocations (`choices[lvl].asi`) per ability across every class: the path of an
|
|
27
|
-
* L4/L8-style "Ability Score Increase or Feat" decision saved on the plain +2 ASI branch rather than a feat. Shared by
|
|
28
|
-
* `computeAbilityScores`' fold and `abilityBonusBreakdown`'s `class` bucket so the two reads can never drift.
|
|
29
|
-
*
|
|
30
|
-
* The level gate is the ONE predicate `legacyAsiBranch` (pc.asi-flatten.ts, H234 H4(2)), shared with the Builder's ledger
|
|
31
|
-
* alias and write path: a level whose `feat` is a string took the feat branch, and its `asi` is an orphan discarded since
|
|
32
|
-
* R4-P4 Decision B (Volker.md drew FOUR points from one L4 when both folded). Disjoint from chosen-feat ability-points
|
|
33
|
-
* (`choices[lvl]["feat:<id>"]`, collectClassFeatAbilityPoints) and from origin ability-points: no source double-counts.
|
|
34
|
-
*/
|
|
35
12
|
export declare function collectClassAsiBranch(resolved: ResolvedCharacter): Partial<Record<Ability, number>>;
|
|
36
|
-
/** Per-ability bonus provenance for the builder's obelisk captions:
|
|
37
|
-
* species = fixed race ASI + subrace fixed ASI + race ability-points choices;
|
|
38
|
-
* background = background ability-points choices;
|
|
39
|
-
* class = legacy class ASI-BRANCH allocations (the L4 asi-or-feat → asi path),
|
|
40
|
-
* MINUS any `asi` sharing a level with a string `feat` key, which
|
|
41
|
-
* collectClassAsiBranch discards as branch-switch residue (R4-P4 Dec. B),
|
|
42
|
-
* + the flat capstone fold when the caller threads the effect totals (R4-G3b §4);
|
|
43
|
-
* feat = class chosen-feat ability-points (the L4 asi-or-feat → feat path) +
|
|
44
|
-
* flat feat ability_bonuses (e.g. Athlete +1 STR). All already fold into
|
|
45
|
-
* computeAbilityScores totals, so the caption must account for them or a
|
|
46
|
-
* tile reads higher than the named sources explain (smoke r1/r5c). */
|
|
47
13
|
export declare function abilityBonusBreakdown(resolved: ResolvedCharacter, featureEffects?: FeatureEffectTotals): Record<Ability, {
|
|
48
14
|
species: number;
|
|
49
15
|
background: number;
|
|
50
16
|
class: number;
|
|
51
17
|
feat: number;
|
|
52
18
|
}>;
|
|
53
|
-
|
|
54
|
-
* every later valid level = PHB average. Skip rule identical to hpLevelCount. */
|
|
19
|
+
export declare function fixedFeatAbilityIncrease(f: FeatEntity): Partial<Record<Ability, number>>;
|
|
55
20
|
export declare function hitDiceAverageSum(classes: ResolvedClass[]): number;
|
|
56
|
-
/** Count of levels that contribute to HP (valid class entries only). */
|
|
57
21
|
export declare function hpLevelCount(classes: ResolvedClass[]): number;
|
|
58
|
-
/**
|
|
59
|
-
* PC-oriented multiclass HP.
|
|
60
|
-
* - First class's first level: max(hit_die) + conMod.
|
|
61
|
-
* - Every subsequent level (in any class): phbAverageForDie(thatLevel'sClass) + conMod.
|
|
62
|
-
* CON mod contributes once per total level.
|
|
63
|
-
* Decomposed (P5 T2) into hitDiceAverageSum (dice-only) + hpLevelCount (level count),
|
|
64
|
-
* so a later popup can render the two components separately.
|
|
65
|
-
*/
|
|
66
22
|
export declare function multiclassMaxHP(classes: ResolvedClass[], conMod: number): number;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
* The BEST APPLICABLE unarmoured formula (R4-G7 T6a, spec §4): the plain 10 + DEX mod, against every
|
|
73
|
-
* `unarmored-ac` effect that folds right now (its `base ?? 10` plus the modifier of every ability its
|
|
74
|
-
* OWN `abilities` list names), highest total winning. A class feature carrying an "Unarmored
|
|
75
|
-
* Defense"-style structured flag, or only the feature NAME (matched SILENTLY since R4-G6b §5.7), is the
|
|
76
|
-
* FALLBACK for a document that authors no effect at all (Monk: +WIS; Barbarian: +CON). `warnings` is
|
|
77
|
-
* retained for the exported signature and is no longer written to by this function or by
|
|
78
|
-
* `unarmoredACBreakdown`.
|
|
79
|
-
*/
|
|
23
|
+
export declare function riderReachesRow(rider: DamageRider, row: AttackRow, opts?: ScopeOpts): boolean;
|
|
24
|
+
export interface ScopeOpts {
|
|
25
|
+
pactPicked?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function scopeReachesRow(scope: readonly WeaponScope[] | undefined, row: AttackRow, opts?: ScopeOpts): boolean;
|
|
80
28
|
export declare function unarmoredAC(resolved: ResolvedCharacter, mods: Record<Ability, number>, warnings: string[]): number;
|
|
81
|
-
/**
|
|
82
|
-
* Same rule as `unarmoredAC` but also returns the WINNING formula's structured terms (its base, then one
|
|
83
|
-
* term per ability its `abilities` list names, in that list's order) and whether that formula admits a
|
|
84
|
-
* shield. Used by recalc to assemble a richer acBreakdown when no armor is equipped.
|
|
85
|
-
*
|
|
86
|
-
* `shieldBonus` is the equipped shield's contribution, read for the COMPARISON only: it is NOT part of
|
|
87
|
-
* the returned `total` or `terms`, because the shield is one of the additive terms recalc merges on the
|
|
88
|
-
* unarmoured path, and `shieldAllowed` is what tells that caller to keep it. A shield counts on a
|
|
89
|
-
* candidate only where its effect declares `allow_shield === true` (absent is NOT true: the SRD Monk
|
|
90
|
-
* omits the key and RAW allows the Monk no shield), and always on the plain 10 + DEX candidate, which is
|
|
91
|
-
* unarmoured-with-a-shield. Both fallback arms keep the shipped answer, shield included.
|
|
92
|
-
*/
|
|
93
29
|
export declare function unarmoredACBreakdown(resolved: ResolvedCharacter, mods: Record<Ability, number>, warnings: string[], shieldBonus?: number): {
|
|
94
30
|
total: number;
|
|
95
31
|
terms: ACTerm[];
|
|
96
32
|
shieldAllowed: boolean;
|
|
97
33
|
};
|
|
98
|
-
/** R4-G6b §5.4: the die and ability set for the always-present Unarmed Strike row. Authored `unarmed-strike` effects
|
|
99
|
-
* first (a `{ column }` die is read from the GRANTING class's table at that class's level); then the SILENT synthetic:
|
|
100
|
-
* a class-sourced feature whose id slug `unarmedDieColumnFor` knows (`martial-arts`) with NO authored effect, on a
|
|
101
|
-
* class whose table carries that column with a dice value, contributes that die with DEX. The SHAPE is
|
|
102
|
-
* `decision-recognizer.ts`'s (a table-driven synthetic mirroring an overlay entry, retired when the data is
|
|
103
|
-
* authored: the G7 booking gives `overlay.schema.ts`'s class arm `effects` + `.strict()` and authors both Monks);
|
|
104
|
-
* the PLACEMENT is here because the builder ledger never feeds `derived.attacks`. Merge: the die with the highest
|
|
105
|
-
* average wins; the abilities are the union. Nothing writes onto a registry object. */
|
|
106
34
|
export declare function resolveUnarmedStrike(resolved: ResolvedCharacter): UnarmedStrikeSpec;
|
|
107
|
-
/** Initiative = DEX mod + Alert (+5 in 2014). Extendable via feat flags. */
|
|
108
35
|
export declare function initiativeBonus(dexMod: number, feats: FeatEntity[], edition: "2014" | "2024"): number;
|
|
109
|
-
/** Speed = race.speed.walk + flat bonuses from feats (e.g., Mobile +10). */
|
|
110
36
|
export declare function speedFromRace(resolved: ResolvedCharacter): number;
|
|
111
|
-
/**
|
|
112
|
-
* Folds class-level CHOSEN-FEAT ability-points into per-ability totals.
|
|
113
|
-
*
|
|
114
|
-
* When the L4-style "asi or feat" decision resolves to a feat that carries
|
|
115
|
-
* `ability-points` choices (e.g. Ability Score Improvement), the picker
|
|
116
|
-
* persists the allocation under the namespaced key
|
|
117
|
-
* `choices[lvl]["feat:" + choice.id]` (the engine's `buildItem` surfaces those
|
|
118
|
-
* children; see pc.decision-engine.ts). This is disjoint from both the legacy
|
|
119
|
-
* asi-BRANCH key (`choices[lvl].asi`) and origin ability-points, so no source
|
|
120
|
-
* double-counts. The chosen feat entity is resolved from `resolved.feats`
|
|
121
|
-
* (already looked up by the resolver) — no registry needed here.
|
|
122
|
-
*
|
|
123
|
-
* The L19 Epic Boon folds through this SAME path, but only as of R4-P4's re-key
|
|
124
|
-
* (live in the SRD data from that phase's regeneration). This docblock earlier
|
|
125
|
-
* cited it as an existing example, which it was not. EVERY reader OF THE FEAT
|
|
126
|
-
* PICK keys on the LITERAL string `feat`, and there are FOUR of them, not the two
|
|
127
|
-
* the R4-P4 spec §2.3 and task brief enumerate: this function (`block.feat`,
|
|
128
|
-
* below), `collectFeatPicks` (pc.resolver.ts), `PCResolver.resolve`'s
|
|
129
|
-
* feat-to-spell application pass, the two `collectFeatGrantedSpells` calls
|
|
130
|
-
* (pc.resolver.ts), the one that makes a SPELL-granting boon work, and
|
|
131
|
-
* `visitProficiencyChoices`' arm (A) (pc.decision-engine.ts, R4-G3b §8), which
|
|
132
|
-
* reads `block.feat` to walk the chosen feat's own proficiency choices. Note the
|
|
133
|
-
* qualifier: this is NOT a claim that every reader of a saved class choice block
|
|
134
|
-
* keys on `feat`. Others read the very same block by OTHER keys ·
|
|
135
|
-
* `collectClassAsiBranch` (above) reads the legacy `.asi` through
|
|
136
|
-
* `legacyAsiBranch` (pc.asi-flatten.ts), while `resolvePool` (pc.pools.ts) and
|
|
137
|
-
* `resolveChosenInline` (pc.resolver.ts) read by a DYNAMIC pool/choice id.
|
|
138
|
-
* `legacyAsiBranch` also tests `block.feat`, but only to DETECT the feat branch
|
|
139
|
-
* (R4-P4 Decision B), not to consume the pick. pc.decision-engine.ts's LEDGER
|
|
140
|
-
* (`buildItem`) is NOT a reader: it reads generically by `choice.id`, which is
|
|
141
|
-
* exactly why re-keying works at all; since H234 its class walk also SYNTHESIZES
|
|
142
|
-
* a `feat` answer, the read-only alias for a level saved in the older ASI shape
|
|
143
|
-
* (`legacyAsiReader`), which consumes no persisted `feat` key. srd-2024.yaml
|
|
144
|
-
* authored the boon's pick `id: epic-boon`, so an L19 selection persisted under
|
|
145
|
-
* `choices[19]["epic-boon"]`, which no reader looks at: the boon resolved to no
|
|
146
|
-
* feat, granted no spells, and contributed no ability points at all. Re-keying
|
|
147
|
-
* the authored pick to `id: feat` is what makes it fold. No persisted GRANDCHILD
|
|
148
|
-
* key moved with it · pc.decision-engine.ts builds `feat:<childId>` off a
|
|
149
|
-
* hardcoded prefix, independent of the parent choice's own id.
|
|
150
|
-
*
|
|
151
|
-
* Clamps defensively (per-ability max_per, then stops at the points total in
|
|
152
|
-
* ABILITY_KEYS order), mirroring collectChosenAbilityPoints.
|
|
153
|
-
*/
|
|
154
37
|
export declare function collectClassFeatAbilityPoints(resolved: ResolvedCharacter): Partial<Record<Ability, number>>;
|
|
155
|
-
/**
|
|
156
|
-
* Combines racial ASI (from race.ability_score_increases), feat ASI,
|
|
157
|
-
* class-choice ASI (from classes[i].choices[lvl].asi), chosen-feat ASI
|
|
158
|
-
* (from classes[i].choices[lvl]["feat:<id>"]), and user overrides.
|
|
159
|
-
* Overrides win; ASI sources sum unconditionally. The flat capstone fold is added
|
|
160
|
-
* in recalc's bonus loop, not here (R4-G3b §4).
|
|
161
|
-
*/
|
|
162
38
|
export declare function computeAbilityScores(resolved: ResolvedCharacter, overrides: CharacterOverrides): Record<Ability, number>;
|
|
163
39
|
export declare function computeProficiencies(resolved: ResolvedCharacter): {
|
|
164
40
|
armor: ProficiencySet;
|
|
@@ -167,4 +43,5 @@ export declare function computeProficiencies(resolved: ResolvedCharacter): {
|
|
|
167
43
|
languages: string[];
|
|
168
44
|
saves: Ability[];
|
|
169
45
|
};
|
|
46
|
+
export declare const HAND_SET_HALF_SOURCE = "Set by you";
|
|
170
47
|
export declare function recalc(resolved: ResolvedCharacter, registry?: EntityRegistry): DerivedStats;
|