@archivist-gg/dnd5e 0.3.17 → 0.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +48 -21
- package/README.md +26 -48
- package/dist/armor/armor.codec.d.ts +0 -7
- package/dist/armor/armor.codec.js +1 -9
- package/dist/armor/armor.parser.js +1 -8
- package/dist/armor/armor.schema.js +1 -7
- package/dist/armor/armor.types.d.ts +0 -3
- package/dist/background/background.codec.d.ts +0 -6
- package/dist/background/background.codec.js +1 -12
- package/dist/background/background.parser.js +1 -11
- package/dist/background/background.schema.js +1 -12
- package/dist/background/background.types.d.ts +0 -5
- package/dist/chunk-2EOGK6R6.js +1 -0
- package/dist/chunk-2HRRH3WL.js +1 -0
- package/dist/chunk-2LCGKNVM.js +1 -0
- package/dist/chunk-2NUDWOFG.js +1 -0
- package/dist/chunk-334WLI7V.js +1 -0
- package/dist/chunk-3LWOVRLA.js +1 -0
- package/dist/chunk-3QQOATV3.js +1 -0
- package/dist/chunk-4E2GIWJE.js +1 -0
- package/dist/chunk-4GN3GYMP.js +1 -0
- package/dist/chunk-4IAMSRHD.js +1 -0
- package/dist/chunk-4JEF3CET.js +1 -0
- package/dist/chunk-4KVVAENP.js +1 -0
- package/dist/chunk-56JK6VCL.js +1 -0
- package/dist/chunk-5FEXHY4U.js +1 -0
- package/dist/chunk-63YJPWTM.js +1 -0
- package/dist/chunk-6ASJ3MVB.js +1 -0
- package/dist/chunk-6IC53O3Q.js +1 -0
- package/dist/chunk-6LCNV26D.js +1 -0
- package/dist/chunk-6W253VHH.js +1 -0
- package/dist/chunk-7AKJBRBD.js +1 -0
- package/dist/chunk-7EL3GWWJ.js +1 -0
- package/dist/chunk-7FPQJDFD.js +1 -0
- package/dist/chunk-7J5BNH2D.js +1 -0
- package/dist/chunk-7LPKI27J.js +1 -0
- package/dist/chunk-7UPYRKMF.js +1 -0
- package/dist/chunk-A7H6LX47.js +1 -0
- package/dist/chunk-AINRPPLH.js +1 -0
- package/dist/chunk-BC52J4LA.js +1 -0
- package/dist/chunk-BCXGB4HP.js +1 -0
- package/dist/chunk-BGX36NPE.js +1 -0
- package/dist/chunk-BPKG6RZ7.js +1 -0
- package/dist/chunk-BREHZNTL.js +1 -0
- package/dist/chunk-BZ6BGGZS.js +1 -0
- package/dist/chunk-CAPYNIGK.js +1 -0
- package/dist/chunk-CCFIINBA.js +1 -0
- package/dist/chunk-CMIEZQL4.js +1 -0
- package/dist/chunk-DVUXUIPV.js +1 -0
- package/dist/chunk-DY6FVAGA.js +1 -0
- package/dist/chunk-DZITM5AG.js +1 -0
- package/dist/chunk-DZKSXSJF.js +1 -0
- package/dist/chunk-EAARMPCW.js +1 -0
- package/dist/chunk-EVT7MGAC.js +1 -0
- package/dist/chunk-FOLHTMSC.js +1 -0
- package/dist/chunk-GCYUCIDN.js +1 -0
- package/dist/chunk-GIOV6JW7.js +1 -0
- package/dist/chunk-HCK6IUB3.js +1 -0
- package/dist/chunk-HR5MKCP2.js +1 -0
- package/dist/chunk-I26FHSI6.js +1 -0
- package/dist/chunk-I4O2FIDT.js +1 -0
- package/dist/chunk-IGVRLGLM.js +1 -0
- package/dist/chunk-IHPLT2ZT.js +1 -0
- package/dist/chunk-IOCJIWCV.js +1 -0
- package/dist/chunk-JXDX2DKF.js +1 -0
- package/dist/chunk-KBFSJ5WE.js +1 -0
- package/dist/chunk-KM75CC6Q.js +1 -0
- package/dist/chunk-KZDDFG4O.js +1 -0
- package/dist/chunk-LJNT3PJP.js +1 -0
- package/dist/chunk-LR6UMA5V.js +1 -0
- package/dist/chunk-M6RPOLKS.js +1 -0
- package/dist/chunk-MC6PLWRZ.js +1 -0
- package/dist/chunk-MGGKZGLG.js +1 -0
- package/dist/chunk-N3RYJ7RE.js +1 -0
- package/dist/chunk-NEMX7QGG.js +1 -0
- package/dist/chunk-NI364WV7.js +1 -0
- package/dist/chunk-O2QZ73GA.js +1 -0
- package/dist/chunk-O776WL7O.js +1 -0
- package/dist/chunk-OTFNINUY.js +1 -0
- package/dist/chunk-PQAVMK3T.js +1 -0
- package/dist/chunk-PZ3ZZ5H5.js +1 -0
- package/dist/chunk-PZ4L2EEG.js +1 -0
- package/dist/chunk-PZUPZBTN.js +1 -0
- package/dist/chunk-QBA757AU.js +1 -0
- package/dist/chunk-QFIGPOFW.js +1 -0
- package/dist/chunk-QMEKQTUT.js +1 -0
- package/dist/chunk-QVWT67WA.js +1 -0
- package/dist/chunk-RDXQAZBA.js +1 -0
- package/dist/chunk-RE5Z5RNK.js +1 -0
- package/dist/chunk-RL4VY2AL.js +1 -0
- package/dist/chunk-RQGTBHJW.js +1 -0
- package/dist/chunk-RQZCGXUZ.js +1 -0
- package/dist/chunk-S5UCI27C.js +1 -0
- package/dist/chunk-SEOASDO4.js +1 -0
- package/dist/chunk-SU4MEZ5P.js +1 -0
- package/dist/chunk-T55DELVL.js +1 -0
- package/dist/chunk-TKIEPC6F.js +1 -0
- package/dist/chunk-TLXFGGWH.js +1 -0
- package/dist/chunk-UBUKCRZ3.js +1 -0
- package/dist/chunk-V6NQ547U.js +1 -0
- package/dist/chunk-VA3ZWV7C.js +1 -0
- package/dist/chunk-VIP3FH2O.js +1 -0
- package/dist/chunk-VTQ4RWEG.js +1 -0
- package/dist/chunk-WUHTSLG4.js +1 -0
- package/dist/chunk-X22SISGM.js +1 -0
- package/dist/chunk-XKJXT2PN.js +1 -0
- package/dist/chunk-XQMKH4R4.js +1 -0
- package/dist/chunk-YGH7S5ZF.js +1 -0
- package/dist/chunk-ZE46ADXS.js +1 -0
- package/dist/chunk-ZI3FEUX3.js +1 -0
- package/dist/class/class.codec.d.ts +0 -7
- package/dist/class/class.codec.js +1 -18
- package/dist/class/class.parser.js +1 -17
- package/dist/class/class.schema.d.ts +2 -1
- package/dist/class/class.schema.js +1 -15
- package/dist/class/class.slug.d.ts +0 -11
- package/dist/class/class.slug.js +1 -8
- package/dist/class/class.standard-array.d.ts +0 -7
- package/dist/class/class.standard-array.js +1 -20
- package/dist/class/class.types.d.ts +0 -20
- package/dist/condition/condition.codec.d.ts +0 -6
- package/dist/condition/condition.parser.d.ts +0 -10
- package/dist/condition/condition.parser.js +1 -7
- package/dist/condition/condition.schema.d.ts +0 -16
- package/dist/condition/condition.types.d.ts +0 -3
- package/dist/data-srd/index.generated.js +1 -146
- package/dist/dnd/amount-text.d.ts +4 -27
- package/dist/dnd/amount-text.js +1 -13
- package/dist/dnd/constants.d.ts +0 -18
- package/dist/dnd/constants.js +1 -42
- package/dist/dnd/formula-tags.d.ts +0 -2
- package/dist/dnd/formula-tags.js +1 -119
- package/dist/dnd/math.d.ts +0 -26
- package/dist/dnd/math.js +1 -45
- package/dist/dnd/prose-tags.d.ts +1 -15
- package/dist/dnd/prose-tags.js +1 -18
- package/dist/dnd/resource-die.d.ts +0 -4
- package/dist/dnd/resource-die.js +1 -17
- package/dist/dnd/resource-formula.d.ts +0 -43
- package/dist/dnd/resource-formula.js +1 -14
- package/dist/dnd/resource-words.d.ts +0 -2
- package/dist/dnd/resource-words.js +1 -30
- package/dist/dnd/srd-tag-converter.d.ts +0 -21
- package/dist/dnd/srd-tag-converter.js +1 -12
- package/dist/dnd/tag-grammar.js +1 -12
- package/dist/dnd/warn-once.js +1 -8
- package/dist/encounter/encounter.ai-schema.js +1 -8
- package/dist/entities/base-item-resolver.d.ts +0 -26
- package/dist/entities/base-item-resolver.js +1 -11
- package/dist/entities/registry-revision.d.ts +10 -0
- package/dist/entities/registry-revision.js +1 -0
- package/dist/entities/slug.d.ts +1 -31
- package/dist/entities/slug.js +1 -12
- package/dist/entities/wikilink-display.d.ts +0 -2
- package/dist/entities/wikilink-display.js +1 -10
- package/dist/feat/feat.category-codes.d.ts +1 -26
- package/dist/feat/feat.category-codes.js +1 -14
- package/dist/feat/feat.codec.d.ts +0 -6
- package/dist/feat/feat.codec.js +1 -12
- package/dist/feat/feat.parser.js +1 -11
- package/dist/feat/feat.schema.d.ts +31 -1
- package/dist/feat/feat.schema.js +1 -10
- package/dist/feat/feat.types.d.ts +0 -6
- package/dist/index.js +45 -138113
- package/dist/inline-tag-parser.js +1 -6
- package/dist/item/item.actions-map.d.ts +4 -63
- package/dist/item/item.actions-map.js +1 -10
- package/dist/item/item.ai-schema.js +1 -6
- package/dist/item/item.attunement.d.ts +0 -14
- package/dist/item/item.attunement.js +1 -6
- package/dist/item/item.bonuses.js +1 -10
- package/dist/item/item.codec.js +1 -9
- package/dist/item/item.conditions.d.ts +0 -7
- package/dist/item/item.conditions.js +1 -11
- package/dist/item/item.conditions.types.d.ts +0 -2
- package/dist/item/item.cost.js +1 -29
- package/dist/item/item.enrichment.js +1 -9
- package/dist/item/item.icon.d.ts +0 -8
- package/dist/item/item.icon.js +1 -211
- package/dist/item/item.parser.js +1 -8
- package/dist/item/item.schema.d.ts +2 -0
- package/dist/item/item.schema.js +1 -11
- package/dist/item/item.types.d.ts +2 -28
- package/dist/monster/monster.ai-schema.js +1 -6
- package/dist/monster/monster.codec.d.ts +0 -10
- package/dist/monster/monster.enrichment.js +1 -19
- package/dist/monster/monster.format.d.ts +0 -69
- package/dist/monster/monster.format.js +1 -78
- package/dist/monster/monster.parser.d.ts +0 -4
- package/dist/monster/monster.parser.js +1 -15
- package/dist/monster/monster.resolve.d.ts +0 -4
- package/dist/monster/monster.schema.d.ts +0 -9
- package/dist/monster/monster.schema.js +1 -34
- package/dist/monster/monster.types.d.ts +0 -3
- package/dist/monster/monster.types.js +1 -1
- package/dist/optional-feature/optional-feature.codec.d.ts +0 -11
- package/dist/optional-feature/optional-feature.codec.js +1 -13
- package/dist/optional-feature/optional-feature.parser.js +1 -12
- package/dist/optional-feature/optional-feature.schema.d.ts +30 -1
- package/dist/optional-feature/optional-feature.schema.js +1 -15
- package/dist/pack.d.ts +0 -9
- package/dist/pc/conditions.constants.js +1 -6
- package/dist/pc/decision-recognizer.js +1 -8
- package/dist/pc/pc.additional-spells.d.ts +4 -14
- package/dist/pc/pc.additional-spells.js +1 -23
- package/dist/pc/pc.amount-bindings.d.ts +4 -20
- package/dist/pc/pc.amount-bindings.js +1 -23
- package/dist/pc/pc.asi-flatten.d.ts +0 -59
- package/dist/pc/pc.asi-flatten.js +1 -16
- package/dist/pc/pc.conditions.d.ts +1 -0
- package/dist/pc/pc.conditions.js +1 -6
- package/dist/pc/pc.containment.d.ts +0 -5
- package/dist/pc/pc.containment.js +1 -24
- package/dist/pc/pc.decision-engine.d.ts +4 -141
- package/dist/pc/pc.decision-engine.js +1 -52
- package/dist/pc/pc.defense-normalize.d.ts +0 -10
- package/dist/pc/pc.defense-normalize.js +1 -6
- package/dist/pc/pc.entry-overrides.d.ts +0 -58
- package/dist/pc/pc.entry-overrides.js +1 -40
- package/dist/pc/pc.equipment.d.ts +2 -22
- package/dist/pc/pc.equipment.js +1 -33
- package/dist/pc/pc.feature-effects.d.ts +23 -275
- package/dist/pc/pc.feature-effects.js +1 -26
- package/dist/pc/pc.formula-context.js +1 -11
- package/dist/pc/pc.infusions.d.ts +0 -65
- package/dist/pc/pc.infusions.js +1 -64
- package/dist/pc/pc.item-effects.d.ts +18 -0
- package/dist/pc/pc.member-choices.d.ts +18 -49
- package/dist/pc/pc.member-choices.js +1 -32
- package/dist/pc/pc.parser.js +1 -58
- package/dist/pc/pc.pools.d.ts +7 -10
- package/dist/pc/pc.pools.js +1 -26
- package/dist/pc/pc.proficiencies.d.ts +7 -33
- package/dist/pc/pc.proficiencies.js +1 -107
- package/dist/pc/pc.proficiency-grants.d.ts +0 -26
- package/dist/pc/pc.proficiency-normalize.d.ts +4 -25
- package/dist/pc/pc.proficiency-normalize.js +1 -12
- package/dist/pc/pc.proficiency-query.d.ts +0 -13
- package/dist/pc/pc.proficiency-query.js +1 -27
- package/dist/pc/pc.recalc.d.ts +7 -131
- package/dist/pc/pc.recalc.js +1 -946
- package/dist/pc/pc.resolver.d.ts +0 -104
- package/dist/pc/pc.resolver.js +1 -59
- package/dist/pc/pc.resource-seed.d.ts +0 -8
- package/dist/pc/pc.resource-seed.js +1 -42
- package/dist/pc/pc.resources.d.ts +1 -59
- package/dist/pc/pc.resources.js +1 -23
- package/dist/pc/pc.rest.d.ts +1 -20
- package/dist/pc/pc.rest.js +1 -230
- package/dist/pc/pc.schema.d.ts +19 -2
- package/dist/pc/pc.schema.js +1 -9
- package/dist/pc/pc.slotting.d.ts +0 -29
- package/dist/pc/pc.slotting.js +1 -28
- package/dist/pc/pc.speeds.d.ts +19 -0
- package/dist/pc/pc.spell-scope.d.ts +6 -0
- package/dist/pc/pc.spellcasting.d.ts +0 -70
- package/dist/pc/pc.spellcasting.js +1 -28
- package/dist/pc/pc.table-column.d.ts +0 -22
- package/dist/pc/pc.table-column.js +1 -18
- package/dist/pc/pc.tool-picks.d.ts +0 -27
- package/dist/pc/pc.tool-picks.js +1 -18
- package/dist/pc/pc.types.d.ts +85 -344
- package/dist/pc/pc.weapon-grant.d.ts +0 -6
- package/dist/pc/pool-layout.d.ts +0 -39
- package/dist/pc/pool-layout.js +1 -18
- package/dist/pc/resource-equivalents.d.ts +2 -40
- package/dist/pc/roll-scope.js +1 -8
- package/dist/pc/roll-tag-labels.d.ts +0 -32
- package/dist/pc/roll-tag-labels.js +1 -17
- package/dist/pc/spell-source.d.ts +0 -11
- package/dist/pc/spell-source.js +1 -8
- package/dist/race/race.codec.d.ts +0 -6
- package/dist/race/race.codec.js +1 -15
- package/dist/race/race.parser.js +1 -14
- package/dist/race/race.schema.d.ts +0 -8
- package/dist/race/race.schema.js +1 -14
- package/dist/race/race.structural.d.ts +0 -6
- package/dist/race/race.structural.js +1 -6
- package/dist/race/race.types.d.ts +0 -8
- package/dist/schemas/attack-schema.d.ts +5 -0
- package/dist/schemas/caster-type-schema.d.ts +1 -6
- package/dist/schemas/caster-type-schema.js +1 -6
- package/dist/schemas/choice-schema.js +1 -7
- package/dist/schemas/duration-schema.d.ts +0 -2
- package/dist/schemas/duration-schema.js +1 -6
- package/dist/schemas/entity-extras-schema.d.ts +0 -30
- package/dist/schemas/entity-extras-schema.js +1 -10
- package/dist/schemas/equipment-grant-schema.d.ts +0 -2
- package/dist/schemas/equipment-grant-schema.js +1 -12
- package/dist/schemas/feature-alias.d.ts +0 -27
- package/dist/schemas/feature-effect-schema.d.ts +30 -1
- package/dist/schemas/feature-effect-schema.js +1 -6
- package/dist/schemas/feature-schema.d.ts +0 -6
- package/dist/schemas/feature-schema.js +1 -12
- package/dist/schemas/resource-schema.d.ts +1 -34
- package/dist/schemas/resource-schema.js +1 -12
- package/dist/schemas/selection-pool-schema.js +1 -10
- package/dist/spell/casting-time.d.ts +0 -15
- package/dist/spell/casting-time.js +1 -6
- package/dist/spell/spell.access.d.ts +0 -6
- package/dist/spell/spell.access.js +1 -45
- package/dist/spell/spell.ai-schema.js +1 -6
- package/dist/spell/spell.codec.js +1 -9
- package/dist/spell/spell.enrichment.js +1 -9
- package/dist/spell/spell.filter.d.ts +0 -5
- package/dist/spell/spell.filter.js +1 -75
- package/dist/spell/spell.parser.d.ts +0 -31
- package/dist/spell/spell.parser.js +1 -16
- package/dist/spell/spell.scaling.d.ts +0 -46
- package/dist/spell/spell.scaling.js +1 -79
- package/dist/spell/spell.schema.js +1 -7
- package/dist/spell/spell.types.d.ts +0 -7
- package/dist/srd/retired-items.d.ts +0 -4
- package/dist/srd/retired-items.js +1 -11
- package/dist/srd-store.d.ts +0 -33
- package/dist/subclass/subclass.codec.d.ts +0 -8
- package/dist/subclass/subclass.codec.js +1 -17
- package/dist/subclass/subclass.parser.js +1 -16
- package/dist/subclass/subclass.schema.d.ts +2 -1
- package/dist/subclass/subclass.schema.js +1 -14
- package/dist/subclass/subclass.types.d.ts +0 -3
- package/dist/types/attack.d.ts +2 -0
- package/dist/types/casting-option.d.ts +0 -4
- package/dist/types/choice.d.ts +1 -72
- package/dist/types/choice.js +1 -24
- package/dist/types/edition.d.ts +0 -3
- package/dist/types/equipment-grant.d.ts +1 -27
- package/dist/types/equipment-grant.js +1 -12
- package/dist/types/feature-effect.d.ts +14 -14
- package/dist/types/feature.d.ts +0 -22
- package/dist/types/optional-feature.types.d.ts +1 -31
- package/dist/types/resource.d.ts +1 -21
- package/dist/types/selection-pool.d.ts +0 -24
- package/dist/weapon/weapon-mastery.d.ts +0 -1
- package/dist/weapon/weapon.classify.d.ts +0 -11
- package/dist/weapon/weapon.classify.js +1 -7
- package/dist/weapon/weapon.codec.d.ts +0 -9
- package/dist/weapon/weapon.codec.js +1 -9
- package/dist/weapon/weapon.parser.js +1 -8
- package/dist/weapon/weapon.schema.js +1 -7
- package/dist/weapon/weapon.types.d.ts +0 -3
- package/package.json +3 -3
- package/src/data-srd/ATTRIBUTION.md +1 -1
- package/dist/chunk-2FRUSVZS.js +0 -489
- package/dist/chunk-2JSQE3DD.js +0 -206
- package/dist/chunk-2LULMQTF.js +0 -14
- package/dist/chunk-2UDSN6VW.js +0 -18
- package/dist/chunk-3LWMFYKS.js +0 -57
- package/dist/chunk-3MGQFFNE.js +0 -110
- package/dist/chunk-3TM34RSJ.js +0 -23
- package/dist/chunk-3VZZDKRA.js +0 -1014
- package/dist/chunk-4U55VNC7.js +0 -22
- package/dist/chunk-5GKJAUMX.js +0 -59
- package/dist/chunk-5MXFW4O3.js +0 -71
- package/dist/chunk-656QCX4U.js +0 -22
- package/dist/chunk-6EI737IO.js +0 -19
- package/dist/chunk-6GNXYAYP.js +0 -25
- package/dist/chunk-6PXTNCBP.js +0 -133
- package/dist/chunk-6X2NV665.js +0 -33
- package/dist/chunk-7ATNGKBS.js +0 -178
- package/dist/chunk-7Q2VPKCD.js +0 -181
- package/dist/chunk-7QN7XSAK.js +0 -19
- package/dist/chunk-A54HHCWW.js +0 -67
- package/dist/chunk-AZRGFUSR.js +0 -18
- package/dist/chunk-B3DP42OM.js +0 -55
- package/dist/chunk-CJYCVNW2.js +0 -7
- package/dist/chunk-CM5CWO4K.js +0 -735
- package/dist/chunk-DEEHHLAP.js +0 -271
- package/dist/chunk-DOXSFYLH.js +0 -158
- package/dist/chunk-DPUJDOKV.js +0 -365
- package/dist/chunk-EJP263OP.js +0 -186
- package/dist/chunk-EVMUJYUD.js +0 -195
- package/dist/chunk-EYX4JMAU.js +0 -101
- package/dist/chunk-FANQVQ3D.js +0 -89
- package/dist/chunk-FC4IGH5Y.js +0 -18
- package/dist/chunk-G6MHJDVT.js +0 -41
- package/dist/chunk-G6PBI2BU.js +0 -18
- package/dist/chunk-H5PTKYXL.js +0 -101
- package/dist/chunk-HHBD4SQ6.js +0 -24
- package/dist/chunk-HS6FIOLP.js +0 -52
- package/dist/chunk-HTYMW5CH.js +0 -228
- package/dist/chunk-IHE6KVC3.js +0 -13
- package/dist/chunk-IN4M4X7P.js +0 -34
- package/dist/chunk-IUAAXXNO.js +0 -58
- package/dist/chunk-JCMUVZIK.js +0 -133
- package/dist/chunk-JSM6JFZR.js +0 -709
- package/dist/chunk-K5NJBTE2.js +0 -18
- package/dist/chunk-KR6JF3BF.js +0 -14
- package/dist/chunk-KSTV7J2U.js +0 -112
- package/dist/chunk-KU3YLF6D.js +0 -106
- package/dist/chunk-LBEXLN6I.js +0 -91
- package/dist/chunk-LF5AGJA4.js +0 -81
- package/dist/chunk-LHZXYFBU.js +0 -94
- package/dist/chunk-LSLSG67V.js +0 -31
- package/dist/chunk-LVQLWRCU.js +0 -15
- package/dist/chunk-MBX25B6D.js +0 -18
- package/dist/chunk-MYY2C5MB.js +0 -233
- package/dist/chunk-OFCSP6MT.js +0 -23
- package/dist/chunk-ONTGZR5T.js +0 -1806
- package/dist/chunk-OOSRUJBI.js +0 -19
- package/dist/chunk-PDJSUH24.js +0 -110
- package/dist/chunk-PKX6TGRE.js +0 -93
- package/dist/chunk-PQZ4LM4Z.js +0 -19
- package/dist/chunk-PTXBIDG7.js +0 -63
- package/dist/chunk-PVCEA4HZ.js +0 -6
- package/dist/chunk-PXVNAY7T.js +0 -84
- package/dist/chunk-QH36K2PU.js +0 -158
- package/dist/chunk-QS5L5YTJ.js +0 -24
- package/dist/chunk-QYZV2MQA.js +0 -97
- package/dist/chunk-QZSWN2KT.js +0 -18
- package/dist/chunk-RLGQ5PZZ.js +0 -16
- package/dist/chunk-RYLXAYIQ.js +0 -18
- package/dist/chunk-S3YUXDSC.js +0 -278
- package/dist/chunk-S7REMWW4.js +0 -21
- package/dist/chunk-T6QIF5XR.js +0 -348
- package/dist/chunk-TOM66P2P.js +0 -38
- package/dist/chunk-TULQ4FFX.js +0 -353
- package/dist/chunk-UA5KS2PL.js +0 -26
- package/dist/chunk-UUBJCNQU.js +0 -187
- package/dist/chunk-UZXG6QSY.js +0 -58
- package/dist/chunk-VPYBK2MG.js +0 -18
- package/dist/chunk-VRV3NNTA.js +0 -161
- package/dist/chunk-VTTA2ALZ.js +0 -16
- package/dist/chunk-W6GC6OKK.js +0 -16
- package/dist/chunk-WELIKLZF.js +0 -256
- package/dist/chunk-WSVMLNTO.js +0 -31
- package/dist/chunk-WYGD2UGN.js +0 -14
- package/dist/chunk-XCFC7LGF.js +0 -122
- package/dist/chunk-XJ2F2WO6.js +0 -8
- package/dist/chunk-Y5VVP73C.js +0 -23
- package/dist/chunk-YBLDE5CG.js +0 -42
- package/dist/chunk-YD2VAHA6.js +0 -159
- package/dist/chunk-YDGMBMYI.js +0 -25
- package/dist/chunk-YHYTW5QA.js +0 -20
- package/dist/chunk-YKL6SHRJ.js +0 -23
- package/dist/chunk-ZCTUYGNV.js +0 -26
- package/dist/chunk-ZDAEGJH4.js +0 -102
- package/dist/chunk-ZJXSXVFP.js +0 -58
- package/dist/chunk-ZUQW5VBZ.js +0 -89
package/dist/chunk-VRV3NNTA.js
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
RACE_STRUCTURAL_PSEUDO
|
|
3
|
-
} from "./chunk-PVCEA4HZ.js";
|
|
4
|
-
import {
|
|
5
|
-
warnOnce
|
|
6
|
-
} from "./chunk-LVQLWRCU.js";
|
|
7
|
-
import {
|
|
8
|
-
slugify
|
|
9
|
-
} from "./chunk-ZCTUYGNV.js";
|
|
10
|
-
import {
|
|
11
|
-
mirrorSpellShapes
|
|
12
|
-
} from "./chunk-7Q2VPKCD.js";
|
|
13
|
-
import {
|
|
14
|
-
ABILITY_KEYS
|
|
15
|
-
} from "./chunk-WELIKLZF.js";
|
|
16
|
-
|
|
17
|
-
// src/pc/pc.additional-spells.ts
|
|
18
|
-
var entriesOf = (a) => Array.isArray(a) ? a : a && typeof a === "object" ? [a] : [];
|
|
19
|
-
var editionOf = (x) => {
|
|
20
|
-
const e = x == null ? void 0 : x.edition;
|
|
21
|
-
return typeof e === "string" ? e : void 0;
|
|
22
|
-
};
|
|
23
|
-
var prefixOf = (slug) => {
|
|
24
|
-
var _a;
|
|
25
|
-
return (_a = slug.split("_")[0]) != null ? _a : slug;
|
|
26
|
-
};
|
|
27
|
-
function normalizeSpellRef(ref) {
|
|
28
|
-
var _a, _b, _c;
|
|
29
|
-
if (typeof ref !== "string") return null;
|
|
30
|
-
let s = ref.trim();
|
|
31
|
-
const wl = /^\[\[(.+)\]\]$/.exec(s);
|
|
32
|
-
if (wl) {
|
|
33
|
-
const target = (_a = wl[1].split("|")[0]) != null ? _a : "";
|
|
34
|
-
const tail = (_b = target.split("/").pop()) != null ? _b : target;
|
|
35
|
-
const w = slugify(tail.replace(/#.*$/, "").trim());
|
|
36
|
-
return w.length > 0 ? w : null;
|
|
37
|
-
}
|
|
38
|
-
s = s.replace(/#.*$/, "");
|
|
39
|
-
s = (_c = s.split("|")[0]) != null ? _c : "";
|
|
40
|
-
const out = slugify(s.trim());
|
|
41
|
-
return out.length > 0 ? out : null;
|
|
42
|
-
}
|
|
43
|
-
function buildSpellNameIndex(entities) {
|
|
44
|
-
var _a;
|
|
45
|
-
const byName = /* @__PURE__ */ new Map();
|
|
46
|
-
for (const e of entities.search("", "spell", Number.POSITIVE_INFINITY)) {
|
|
47
|
-
const raw = e.data.name;
|
|
48
|
-
const key = slugify(typeof raw === "string" ? raw : e.name);
|
|
49
|
-
const list = (_a = byName.get(key)) != null ? _a : [];
|
|
50
|
-
list.push(e);
|
|
51
|
-
byName.set(key, list);
|
|
52
|
-
}
|
|
53
|
-
return { byName };
|
|
54
|
-
}
|
|
55
|
-
function resolveSpellByName(opts) {
|
|
56
|
-
var _a;
|
|
57
|
-
const { entities, index, nameSlug, carrierSlug, carrierEdition, alreadyCollected } = opts;
|
|
58
|
-
const own = alreadyCollected.find((s) => {
|
|
59
|
-
var _a2;
|
|
60
|
-
return slugify(String((_a2 = s.entity.name) != null ? _a2 : "")) === nameSlug;
|
|
61
|
-
});
|
|
62
|
-
if (own) return { entity: own.entity, slug: own.slug };
|
|
63
|
-
const exact = entities.getByTypeAndSlug("spell", `${prefixOf(carrierSlug)}_spell_${nameSlug}`);
|
|
64
|
-
if (exact) return { entity: mirrorSpellShapes(exact.data), slug: exact.slug };
|
|
65
|
-
const cands = (_a = index.byName.get(nameSlug)) != null ? _a : [];
|
|
66
|
-
if (cands.length === 0) {
|
|
67
|
-
warnOnce(`addspells:miss:${nameSlug}`, `archivist: additional_spells ref "${nameSlug}" matches no spell in the compendium`);
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
const prefix = prefixOf(carrierSlug);
|
|
71
|
-
let pool = cands.filter((e) => prefixOf(e.slug) === prefix);
|
|
72
|
-
if (pool.length === 0) pool = cands;
|
|
73
|
-
if (carrierEdition !== void 0) {
|
|
74
|
-
const same = pool.filter((e) => editionOf(e.data) === carrierEdition);
|
|
75
|
-
if (same.length > 0) pool = same;
|
|
76
|
-
}
|
|
77
|
-
pool = [...pool].sort((a, b) => a.slug < b.slug ? -1 : a.slug > b.slug ? 1 : 0);
|
|
78
|
-
if (pool.length > 1) warnOnce(`addspells:multi:${nameSlug}`, `archivist: additional_spells ref "${nameSlug}" matches ${cands.length} spells; using "${pool[0].slug}"`);
|
|
79
|
-
return { entity: mirrorSpellShapes(pool[0].data), slug: pool[0].slug };
|
|
80
|
-
}
|
|
81
|
-
var hasContentSelectInline = (choices) => Array.isArray(choices) && choices.some((c) => (c == null ? void 0 : c.kind) === "select-inline" && typeof c.id === "string" && !RACE_STRUCTURAL_PSEUDO.has(c.id) || Array.isArray(c == null ? void 0 : c.options) && c.options.some((o) => hasContentSelectInline(o == null ? void 0 : o.choices)));
|
|
82
|
-
function raceIsUngated(race) {
|
|
83
|
-
var _a;
|
|
84
|
-
const r = race;
|
|
85
|
-
if (hasContentSelectInline(r.choices)) return false;
|
|
86
|
-
return !((_a = r.traits) != null ? _a : []).some((t) => hasContentSelectInline(t == null ? void 0 : t.choices));
|
|
87
|
-
}
|
|
88
|
-
var readAbility = (v, own) => {
|
|
89
|
-
if (v && typeof v === "object" && "choose" in v) return "choose";
|
|
90
|
-
if (typeof v !== "string") return void 0;
|
|
91
|
-
if (v === "inherit") return own != null ? own : void 0;
|
|
92
|
-
return ABILITY_KEYS.includes(v) ? v : void 0;
|
|
93
|
-
};
|
|
94
|
-
var entryHasInSliceLeaf = (e, comparand, own) => readAbility(e.ability, own) !== "choose" && ["known", "prepared"].some((b) => {
|
|
95
|
-
const lv = e[b];
|
|
96
|
-
return !!lv && typeof lv === "object" && !Array.isArray(lv) && Object.entries(lv).some(([k, v]) => (k === "_" || Number(k) <= comparand) && Array.isArray(v) && v.some((x) => typeof x === "string"));
|
|
97
|
-
});
|
|
98
|
-
function collectAdditionalSpells(args) {
|
|
99
|
-
const { race, feats, classes, totalLevel, ownAbility, alreadyCollected, entities, warnings } = args;
|
|
100
|
-
let index = null;
|
|
101
|
-
const indexOf = () => index != null ? index : index = buildSpellNameIndex(entities);
|
|
102
|
-
const out = [];
|
|
103
|
-
const carriers = [];
|
|
104
|
-
const asRaw = (x) => x == null ? void 0 : x.additional_spells;
|
|
105
|
-
if (race && raceIsUngated(race)) carriers.push({ root: "race", slug: race.slug, edition: editionOf(race), entries: entriesOf(asRaw(race)), comparand: totalLevel, classSlug: null });
|
|
106
|
-
for (const f of feats) carriers.push({ root: "feat", slug: f.slug, edition: editionOf(f), entries: entriesOf(asRaw(f)), comparand: totalLevel, classSlug: null });
|
|
107
|
-
for (const c of classes) {
|
|
108
|
-
if (!c.entity) continue;
|
|
109
|
-
carriers.push({ root: "class", slug: c.entity.slug, edition: editionOf(c.entity), entries: entriesOf(asRaw(c.entity)), comparand: c.level, classSlug: c.entity.slug });
|
|
110
|
-
if (c.subclass) carriers.push({ root: "subclass", slug: c.subclass.slug, edition: editionOf(c.subclass), entries: entriesOf(asRaw(c.subclass)), comparand: c.level, classSlug: c.entity.slug });
|
|
111
|
-
}
|
|
112
|
-
for (const car of carriers) {
|
|
113
|
-
if (car.entries.length === 0) continue;
|
|
114
|
-
if (car.entries.length > 1) {
|
|
115
|
-
if (car.entries.some((e) => entryHasInSliceLeaf(e, car.comparand, ownAbility))) warnOnce(`addspells:siblings:${car.slug}`, `archivist: additional_spells on "${car.slug}" has ${car.entries.length} sibling entries (a choose-one grant); skipped`);
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
const entry = car.entries[0];
|
|
119
|
-
const ability = readAbility(entry.ability, ownAbility);
|
|
120
|
-
if (ability === "choose") continue;
|
|
121
|
-
for (const bucket of ["known", "prepared"]) {
|
|
122
|
-
const levels = entry[bucket];
|
|
123
|
-
if (!levels || typeof levels !== "object" || Array.isArray(levels)) continue;
|
|
124
|
-
for (const [k, v] of Object.entries(levels)) {
|
|
125
|
-
if (!(k === "_" || Number(k) <= car.comparand)) continue;
|
|
126
|
-
if (!Array.isArray(v)) {
|
|
127
|
-
warnOnce(`addspells:usage:${car.slug}:${bucket}:${k}`, `archivist: additional_spells on "${car.slug}" ${bucket}.${k} is a usage economy (skipped; G8)`);
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
for (const leaf of v) {
|
|
131
|
-
const nameSlug = normalizeSpellRef(leaf);
|
|
132
|
-
if (!nameSlug) continue;
|
|
133
|
-
const hit = resolveSpellByName({ entities, index: indexOf(), nameSlug, carrierSlug: car.slug, carrierEdition: car.edition, alreadyCollected: [...alreadyCollected, ...out] });
|
|
134
|
-
if (!hit) {
|
|
135
|
-
warnings.push(`additional_spells ref "${String(leaf)}" on ${car.slug} not found in compendium.`);
|
|
136
|
-
continue;
|
|
137
|
-
}
|
|
138
|
-
out.push({
|
|
139
|
-
entity: hit.entity,
|
|
140
|
-
slug: hit.slug,
|
|
141
|
-
classSlug: car.classSlug,
|
|
142
|
-
source: car.root === "race" ? "race" : car.root === "feat" ? "feat" : "class",
|
|
143
|
-
prepared: true,
|
|
144
|
-
alwaysPrepared: true,
|
|
145
|
-
...ability ? { ability } : {}
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
return out;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export {
|
|
155
|
-
prefixOf,
|
|
156
|
-
normalizeSpellRef,
|
|
157
|
-
buildSpellNameIndex,
|
|
158
|
-
resolveSpellByName,
|
|
159
|
-
raceIsUngated,
|
|
160
|
-
collectAdditionalSpells
|
|
161
|
-
};
|
package/dist/chunk-VTTA2ALZ.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// src/class/class.slug.ts
|
|
2
|
-
function bareSlug(ref) {
|
|
3
|
-
if (typeof ref !== "string") return "";
|
|
4
|
-
const m = ref.match(/^\[\[(.+?)\]\]$/);
|
|
5
|
-
return (m ? m[1] : ref).toLowerCase();
|
|
6
|
-
}
|
|
7
|
-
function baseClassName(ref) {
|
|
8
|
-
const bare = bareSlug(ref);
|
|
9
|
-
const p = bare.split("_");
|
|
10
|
-
return p.length >= 3 ? p.slice(2).join("_") : p[p.length - 1];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
bareSlug,
|
|
15
|
-
baseClassName
|
|
16
|
-
};
|
package/dist/chunk-W6GC6OKK.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// src/spell/casting-time.ts
|
|
2
|
-
function parseCastingTime(token) {
|
|
3
|
-
var _a;
|
|
4
|
-
const t = (_a = token == null ? void 0 : token.trim()) != null ? _a : "";
|
|
5
|
-
if (!t) return null;
|
|
6
|
-
if (/^(?:1\s*)?reaction\b/i.test(t)) return { kind: "reaction", count: 1 };
|
|
7
|
-
if (/^(?:1\s*)?bonus(?:[\s-]*action)?\b/i.test(t)) return { kind: "bonus", count: 1 };
|
|
8
|
-
if (/^(?:1\s*)?action\b/i.test(t)) return { kind: "action", count: 1 };
|
|
9
|
-
const m = /^(\d+)?[\s-]*(minute|min|hour|hr)s?\b/i.exec(t);
|
|
10
|
-
if (m) return { kind: "time", count: m[1] ? Number(m[1]) : 1, unit: /^h/i.test(m[2]) ? "hour" : "minute" };
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
parseCastingTime
|
|
16
|
-
};
|
package/dist/chunk-WELIKLZF.js
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
// src/dnd/constants.ts
|
|
2
|
-
var CR_PROFICIENCY = {
|
|
3
|
-
"0": 2,
|
|
4
|
-
"1/8": 2,
|
|
5
|
-
"1/4": 2,
|
|
6
|
-
"1/2": 2,
|
|
7
|
-
"1": 2,
|
|
8
|
-
"2": 2,
|
|
9
|
-
"3": 2,
|
|
10
|
-
"4": 2,
|
|
11
|
-
"5": 3,
|
|
12
|
-
"6": 3,
|
|
13
|
-
"7": 3,
|
|
14
|
-
"8": 3,
|
|
15
|
-
"9": 4,
|
|
16
|
-
"10": 4,
|
|
17
|
-
"11": 4,
|
|
18
|
-
"12": 4,
|
|
19
|
-
"13": 5,
|
|
20
|
-
"14": 5,
|
|
21
|
-
"15": 5,
|
|
22
|
-
"16": 5,
|
|
23
|
-
"17": 6,
|
|
24
|
-
"18": 6,
|
|
25
|
-
"19": 6,
|
|
26
|
-
"20": 6,
|
|
27
|
-
"21": 7,
|
|
28
|
-
"22": 7,
|
|
29
|
-
"23": 7,
|
|
30
|
-
"24": 7,
|
|
31
|
-
"25": 8,
|
|
32
|
-
"26": 8,
|
|
33
|
-
"27": 8,
|
|
34
|
-
"28": 8,
|
|
35
|
-
"29": 9,
|
|
36
|
-
"30": 9
|
|
37
|
-
};
|
|
38
|
-
var CR_XP = {
|
|
39
|
-
"0": 10,
|
|
40
|
-
"1/8": 25,
|
|
41
|
-
"1/4": 50,
|
|
42
|
-
"1/2": 100,
|
|
43
|
-
"1": 200,
|
|
44
|
-
"2": 450,
|
|
45
|
-
"3": 700,
|
|
46
|
-
"4": 1100,
|
|
47
|
-
"5": 1800,
|
|
48
|
-
"6": 2300,
|
|
49
|
-
"7": 2900,
|
|
50
|
-
"8": 3900,
|
|
51
|
-
"9": 5e3,
|
|
52
|
-
"10": 5900,
|
|
53
|
-
"11": 7200,
|
|
54
|
-
"12": 8400,
|
|
55
|
-
"13": 1e4,
|
|
56
|
-
"14": 11500,
|
|
57
|
-
"15": 13e3,
|
|
58
|
-
"16": 15e3,
|
|
59
|
-
"17": 18e3,
|
|
60
|
-
"18": 2e4,
|
|
61
|
-
"19": 22e3,
|
|
62
|
-
"20": 25e3,
|
|
63
|
-
"21": 33e3,
|
|
64
|
-
"22": 41e3,
|
|
65
|
-
"23": 5e4,
|
|
66
|
-
"24": 62e3,
|
|
67
|
-
"25": 75e3,
|
|
68
|
-
"26": 9e4,
|
|
69
|
-
"27": 105e3,
|
|
70
|
-
"28": 12e4,
|
|
71
|
-
"29": 135e3,
|
|
72
|
-
"30": 155e3
|
|
73
|
-
};
|
|
74
|
-
var ALL_CR_VALUES = [
|
|
75
|
-
"0",
|
|
76
|
-
"1/8",
|
|
77
|
-
"1/4",
|
|
78
|
-
"1/2",
|
|
79
|
-
"1",
|
|
80
|
-
"2",
|
|
81
|
-
"3",
|
|
82
|
-
"4",
|
|
83
|
-
"5",
|
|
84
|
-
"6",
|
|
85
|
-
"7",
|
|
86
|
-
"8",
|
|
87
|
-
"9",
|
|
88
|
-
"10",
|
|
89
|
-
"11",
|
|
90
|
-
"12",
|
|
91
|
-
"13",
|
|
92
|
-
"14",
|
|
93
|
-
"15",
|
|
94
|
-
"16",
|
|
95
|
-
"17",
|
|
96
|
-
"18",
|
|
97
|
-
"19",
|
|
98
|
-
"20",
|
|
99
|
-
"21",
|
|
100
|
-
"22",
|
|
101
|
-
"23",
|
|
102
|
-
"24",
|
|
103
|
-
"25",
|
|
104
|
-
"26",
|
|
105
|
-
"27",
|
|
106
|
-
"28",
|
|
107
|
-
"29",
|
|
108
|
-
"30"
|
|
109
|
-
];
|
|
110
|
-
var SIZE_HIT_DICE = {
|
|
111
|
-
tiny: 4,
|
|
112
|
-
small: 6,
|
|
113
|
-
medium: 8,
|
|
114
|
-
large: 10,
|
|
115
|
-
huge: 12,
|
|
116
|
-
gargantuan: 20
|
|
117
|
-
};
|
|
118
|
-
var ALL_SIZES = ["Tiny", "Small", "Medium", "Large", "Huge", "Gargantuan"];
|
|
119
|
-
var SKILL_ABILITY = {
|
|
120
|
-
"acrobatics": "dex",
|
|
121
|
-
"animal handling": "wis",
|
|
122
|
-
"arcana": "int",
|
|
123
|
-
"athletics": "str",
|
|
124
|
-
"deception": "cha",
|
|
125
|
-
"history": "int",
|
|
126
|
-
"insight": "wis",
|
|
127
|
-
"intimidation": "cha",
|
|
128
|
-
"investigation": "int",
|
|
129
|
-
"medicine": "wis",
|
|
130
|
-
"nature": "int",
|
|
131
|
-
"perception": "wis",
|
|
132
|
-
"performance": "cha",
|
|
133
|
-
"persuasion": "cha",
|
|
134
|
-
"religion": "int",
|
|
135
|
-
"sleight of hand": "dex",
|
|
136
|
-
"stealth": "dex",
|
|
137
|
-
"survival": "wis"
|
|
138
|
-
};
|
|
139
|
-
var ALL_SKILLS = [
|
|
140
|
-
"Acrobatics",
|
|
141
|
-
"Animal Handling",
|
|
142
|
-
"Arcana",
|
|
143
|
-
"Athletics",
|
|
144
|
-
"Deception",
|
|
145
|
-
"History",
|
|
146
|
-
"Insight",
|
|
147
|
-
"Intimidation",
|
|
148
|
-
"Investigation",
|
|
149
|
-
"Medicine",
|
|
150
|
-
"Nature",
|
|
151
|
-
"Perception",
|
|
152
|
-
"Performance",
|
|
153
|
-
"Persuasion",
|
|
154
|
-
"Religion",
|
|
155
|
-
"Sleight of Hand",
|
|
156
|
-
"Stealth",
|
|
157
|
-
"Survival"
|
|
158
|
-
];
|
|
159
|
-
var ABILITY_KEYS = ["str", "dex", "con", "int", "wis", "cha"];
|
|
160
|
-
var ABILITY_NAMES = {
|
|
161
|
-
str: "STR",
|
|
162
|
-
dex: "DEX",
|
|
163
|
-
con: "CON",
|
|
164
|
-
int: "INT",
|
|
165
|
-
wis: "WIS",
|
|
166
|
-
cha: "CHA"
|
|
167
|
-
};
|
|
168
|
-
var DAMAGE_TYPES = [
|
|
169
|
-
"Acid",
|
|
170
|
-
"Bludgeoning",
|
|
171
|
-
"Cold",
|
|
172
|
-
"Fire",
|
|
173
|
-
"Force",
|
|
174
|
-
"Lightning",
|
|
175
|
-
"Necrotic",
|
|
176
|
-
"Piercing",
|
|
177
|
-
"Poison",
|
|
178
|
-
"Psychic",
|
|
179
|
-
"Radiant",
|
|
180
|
-
"Slashing",
|
|
181
|
-
"Thunder"
|
|
182
|
-
];
|
|
183
|
-
var DAMAGE_NONMAGICAL_VARIANTS = [
|
|
184
|
-
"Bludgeoning, Piercing, and Slashing from Nonmagical Attacks",
|
|
185
|
-
"Bludgeoning, Piercing, and Slashing from Nonmagical Attacks not made with Silvered Weapons",
|
|
186
|
-
"Bludgeoning, Piercing, and Slashing from Nonmagical Attacks not made with Adamantine Weapons"
|
|
187
|
-
];
|
|
188
|
-
var CONDITIONS = [
|
|
189
|
-
"Blinded",
|
|
190
|
-
"Charmed",
|
|
191
|
-
"Deafened",
|
|
192
|
-
"Exhaustion",
|
|
193
|
-
"Frightened",
|
|
194
|
-
"Grappled",
|
|
195
|
-
"Incapacitated",
|
|
196
|
-
"Invisible",
|
|
197
|
-
"Paralyzed",
|
|
198
|
-
"Petrified",
|
|
199
|
-
"Poisoned",
|
|
200
|
-
"Prone",
|
|
201
|
-
"Restrained",
|
|
202
|
-
"Stunned",
|
|
203
|
-
"Unconscious"
|
|
204
|
-
];
|
|
205
|
-
var STANDARD_SENSES = ["Blindsight", "Darkvision", "Tremorsense", "Truesight"];
|
|
206
|
-
var STANDARD_ACTIONS = {
|
|
207
|
-
"2014": ["Attack", "Cast a Spell", "Dash", "Disengage", "Dodge", "Help", "Hide", "Ready", "Search", "Use an Object"],
|
|
208
|
-
"2024": ["Attack", "Dash", "Disengage", "Dodge", "Help", "Hide", "Influence", "Magic", "Ready", "Search", "Study", "Utilize"]
|
|
209
|
-
};
|
|
210
|
-
var ALIGNMENT_ETHICAL = ["Lawful", "Neutral", "Chaotic", "Unaligned", "Any"];
|
|
211
|
-
var ALIGNMENT_MORAL = ["Good", "Neutral", "Evil"];
|
|
212
|
-
var ALL_SECTIONS = [
|
|
213
|
-
"Traits",
|
|
214
|
-
"Actions",
|
|
215
|
-
"Reactions",
|
|
216
|
-
"Bonus Actions",
|
|
217
|
-
"Legendary Actions",
|
|
218
|
-
"Lair Actions",
|
|
219
|
-
"Mythic Actions"
|
|
220
|
-
];
|
|
221
|
-
var ABILITY_NAME_TO_KEY = {
|
|
222
|
-
strength: "str",
|
|
223
|
-
dexterity: "dex",
|
|
224
|
-
constitution: "con",
|
|
225
|
-
intelligence: "int",
|
|
226
|
-
wisdom: "wis",
|
|
227
|
-
charisma: "cha"
|
|
228
|
-
};
|
|
229
|
-
function normalizeAbility(value) {
|
|
230
|
-
var _a;
|
|
231
|
-
const k = value.trim().toLowerCase();
|
|
232
|
-
if (ABILITY_KEYS.includes(k)) return k;
|
|
233
|
-
return (_a = ABILITY_NAME_TO_KEY[k]) != null ? _a : null;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export {
|
|
237
|
-
CR_PROFICIENCY,
|
|
238
|
-
CR_XP,
|
|
239
|
-
ALL_CR_VALUES,
|
|
240
|
-
SIZE_HIT_DICE,
|
|
241
|
-
ALL_SIZES,
|
|
242
|
-
SKILL_ABILITY,
|
|
243
|
-
ALL_SKILLS,
|
|
244
|
-
ABILITY_KEYS,
|
|
245
|
-
ABILITY_NAMES,
|
|
246
|
-
DAMAGE_TYPES,
|
|
247
|
-
DAMAGE_NONMAGICAL_VARIANTS,
|
|
248
|
-
CONDITIONS,
|
|
249
|
-
STANDARD_SENSES,
|
|
250
|
-
STANDARD_ACTIONS,
|
|
251
|
-
ALIGNMENT_ETHICAL,
|
|
252
|
-
ALIGNMENT_MORAL,
|
|
253
|
-
ALL_SECTIONS,
|
|
254
|
-
ABILITY_NAME_TO_KEY,
|
|
255
|
-
normalizeAbility
|
|
256
|
-
};
|
package/dist/chunk-WSVMLNTO.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
STATIC_FALLBACK_CONTEXT,
|
|
3
|
-
convertDescToTags
|
|
4
|
-
} from "./chunk-DEEHHLAP.js";
|
|
5
|
-
|
|
6
|
-
// src/spell/spell.enrichment.ts
|
|
7
|
-
function enrichSpell(raw) {
|
|
8
|
-
var _a, _b, _c, _d;
|
|
9
|
-
const duration = raw.duration;
|
|
10
|
-
const concentration = (_b = raw.concentration) != null ? _b : (_a = duration == null ? void 0 : duration.toLowerCase().includes("concentration")) != null ? _a : false;
|
|
11
|
-
const classes = ((_c = raw.classes) == null ? void 0 : _c.length) ? raw.classes : ["Wizard", "Sorcerer"];
|
|
12
|
-
const enriched = {
|
|
13
|
-
...raw,
|
|
14
|
-
concentration,
|
|
15
|
-
ritual: (_d = raw.ritual) != null ? _d : false,
|
|
16
|
-
classes
|
|
17
|
-
};
|
|
18
|
-
if (typeof enriched.description === "string") {
|
|
19
|
-
enriched.description = convertDescToTags(enriched.description, STATIC_FALLBACK_CONTEXT);
|
|
20
|
-
}
|
|
21
|
-
if (Array.isArray(enriched.at_higher_levels)) {
|
|
22
|
-
enriched.at_higher_levels = enriched.at_higher_levels.map(
|
|
23
|
-
(p) => convertDescToTags(p, STATIC_FALLBACK_CONTEXT)
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
return enriched;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
enrichSpell
|
|
31
|
-
};
|
package/dist/chunk-WYGD2UGN.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// src/schemas/duration-schema.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
var durationSchema = z.union([
|
|
4
|
-
z.literal("instantaneous"),
|
|
5
|
-
z.literal("until-dispelled"),
|
|
6
|
-
z.object({
|
|
7
|
-
amount: z.number().int().positive(),
|
|
8
|
-
unit: z.enum(["round", "minute", "hour", "day"])
|
|
9
|
-
}).strict()
|
|
10
|
-
]);
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
durationSchema
|
|
14
|
-
};
|
package/dist/chunk-XCFC7LGF.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
weaponEntitySchema
|
|
3
|
-
} from "./chunk-5GKJAUMX.js";
|
|
4
|
-
|
|
5
|
-
// src/weapon/weapon.parser.ts
|
|
6
|
-
import { parseYaml } from "@archivist-gg/core";
|
|
7
|
-
var KNOWN_KEYS = /* @__PURE__ */ new Set([
|
|
8
|
-
"name",
|
|
9
|
-
"slug",
|
|
10
|
-
"category",
|
|
11
|
-
"damage",
|
|
12
|
-
"properties",
|
|
13
|
-
"range",
|
|
14
|
-
"reload",
|
|
15
|
-
"mastery",
|
|
16
|
-
"type_tags",
|
|
17
|
-
"ammo_type",
|
|
18
|
-
"weight",
|
|
19
|
-
"cost",
|
|
20
|
-
"source",
|
|
21
|
-
"page",
|
|
22
|
-
"edition",
|
|
23
|
-
"entries",
|
|
24
|
-
"raw",
|
|
25
|
-
// Root extras declared on weaponEntitySchema (spec §5). The schema declaring them is NOT
|
|
26
|
-
// enough: this set is the second, independent gate — a key missing here is copied into
|
|
27
|
-
// `raw` as well, so the two lists must move together.
|
|
28
|
-
"rendering_hint",
|
|
29
|
-
"icon",
|
|
30
|
-
"has_fluff",
|
|
31
|
-
"has_fluff_images",
|
|
32
|
-
"image"
|
|
33
|
-
]);
|
|
34
|
-
var FLAG_PROPERTIES = /* @__PURE__ */ new Set([
|
|
35
|
-
"finesse",
|
|
36
|
-
"light",
|
|
37
|
-
"heavy",
|
|
38
|
-
"two_handed",
|
|
39
|
-
"reach",
|
|
40
|
-
"special",
|
|
41
|
-
"thrown",
|
|
42
|
-
"ammunition",
|
|
43
|
-
"versatile",
|
|
44
|
-
"loading"
|
|
45
|
-
]);
|
|
46
|
-
var VERSATILE_RE = /^versatile\s*\(\s*(\d+d\d+)\s*\)$/i;
|
|
47
|
-
var THROWN_RE = /^thrown\s*\(\s*range\s+(\d+)\s*\/\s*(\d+)\s*\)$/i;
|
|
48
|
-
var AMMUNITION_RE = /^ammunition\s*\(\s*range\s+(\d+)\s*\/\s*(\d+)\s*\)$/i;
|
|
49
|
-
function extractFromPropertyStrings(input) {
|
|
50
|
-
const out = { properties: [], unparsed: [] };
|
|
51
|
-
if (!Array.isArray(input)) return out;
|
|
52
|
-
for (const raw of input) {
|
|
53
|
-
if (typeof raw !== "string") {
|
|
54
|
-
out.properties.push(raw);
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
const lower = raw.toLowerCase().trim();
|
|
58
|
-
if (FLAG_PROPERTIES.has(lower)) {
|
|
59
|
-
out.properties.push(lower);
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
const v = lower.match(VERSATILE_RE);
|
|
63
|
-
if (v) {
|
|
64
|
-
out.properties.push("versatile");
|
|
65
|
-
out.versatile_dice = v[1];
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
const t = lower.match(THROWN_RE);
|
|
69
|
-
if (t) {
|
|
70
|
-
out.properties.push("thrown");
|
|
71
|
-
out.range = { normal: Number.parseInt(t[1], 10), long: Number.parseInt(t[2], 10) };
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
const a = lower.match(AMMUNITION_RE);
|
|
75
|
-
if (a) {
|
|
76
|
-
out.properties.push("ammunition");
|
|
77
|
-
out.range = { normal: Number.parseInt(a[1], 10), long: Number.parseInt(a[2], 10) };
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
out.unparsed.push(raw);
|
|
81
|
-
}
|
|
82
|
-
return out;
|
|
83
|
-
}
|
|
84
|
-
function parseWeapon(source) {
|
|
85
|
-
var _a, _b;
|
|
86
|
-
const raw = parseYaml(source, ["name", "slug", "category", "damage"]);
|
|
87
|
-
if (!raw.success) return raw;
|
|
88
|
-
const propsInput = raw.data.properties;
|
|
89
|
-
if (Array.isArray(propsInput)) {
|
|
90
|
-
const extracted = extractFromPropertyStrings(propsInput);
|
|
91
|
-
raw.data.properties = extracted.properties;
|
|
92
|
-
if (extracted.versatile_dice && raw.data.damage && typeof raw.data.damage === "object") {
|
|
93
|
-
const dmg = raw.data.damage;
|
|
94
|
-
if (dmg.versatile_dice === void 0) dmg.versatile_dice = extracted.versatile_dice;
|
|
95
|
-
}
|
|
96
|
-
if (extracted.range && raw.data.range === void 0) {
|
|
97
|
-
raw.data.range = extracted.range;
|
|
98
|
-
}
|
|
99
|
-
if (extracted.unparsed.length > 0) {
|
|
100
|
-
const existingRaw = (_a = raw.data.raw) != null ? _a : {};
|
|
101
|
-
existingRaw.unparsed_properties = extracted.unparsed;
|
|
102
|
-
raw.data.raw = existingRaw;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
const result = weaponEntitySchema.safeParse(raw.data);
|
|
106
|
-
if (!result.success) {
|
|
107
|
-
return { success: false, error: `weapon schema validation failed: ${result.error.message}` };
|
|
108
|
-
}
|
|
109
|
-
const entity = result.data;
|
|
110
|
-
const extras = {};
|
|
111
|
-
for (const [k, v] of Object.entries(raw.data)) {
|
|
112
|
-
if (!KNOWN_KEYS.has(k)) extras[k] = v;
|
|
113
|
-
}
|
|
114
|
-
if (Object.keys(extras).length > 0) {
|
|
115
|
-
entity.raw = { ...(_b = entity.raw) != null ? _b : {}, ...extras };
|
|
116
|
-
}
|
|
117
|
-
return { success: true, data: entity };
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export {
|
|
121
|
-
parseWeapon
|
|
122
|
-
};
|
package/dist/chunk-XJ2F2WO6.js
DELETED
package/dist/chunk-Y5VVP73C.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
raceEntitySchema
|
|
3
|
-
} from "./chunk-FANQVQ3D.js";
|
|
4
|
-
import {
|
|
5
|
-
aliasFeatureListActionCost
|
|
6
|
-
} from "./chunk-4U55VNC7.js";
|
|
7
|
-
|
|
8
|
-
// src/race/race.parser.ts
|
|
9
|
-
import { parseYaml } from "@archivist-gg/core";
|
|
10
|
-
function parseRace(source) {
|
|
11
|
-
const raw = parseYaml(source, ["name", "slug"]);
|
|
12
|
-
if (!raw.success) return raw;
|
|
13
|
-
aliasFeatureListActionCost(raw.data.traits);
|
|
14
|
-
const result = raceEntitySchema.safeParse({ edition: "2014", ...raw.data });
|
|
15
|
-
if (!result.success) {
|
|
16
|
-
return { success: false, error: `race schema validation failed: ${result.error.message}` };
|
|
17
|
-
}
|
|
18
|
-
return { success: true, data: result.data };
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
parseRace
|
|
23
|
-
};
|
package/dist/chunk-YBLDE5CG.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// src/feat/feat.category-codes.ts
|
|
2
|
-
var FEAT_CATEGORY_CODE_LABELS = {
|
|
3
|
-
D: "Dragonmark",
|
|
4
|
-
G: "General",
|
|
5
|
-
O: "Origin",
|
|
6
|
-
FS: "Fighting Style",
|
|
7
|
-
EB: "Epic Boon",
|
|
8
|
-
DG: "Dark Gift",
|
|
9
|
-
"FS:P": "Fighting Style",
|
|
10
|
-
"FS:R": "Fighting Style"
|
|
11
|
-
};
|
|
12
|
-
function featCategoryLabel(code) {
|
|
13
|
-
var _a;
|
|
14
|
-
return (_a = FEAT_CATEGORY_CODE_LABELS[code]) != null ? _a : code;
|
|
15
|
-
}
|
|
16
|
-
var FEAT_PROGRESSION_CATEGORY = {
|
|
17
|
-
FS: "fighting-style",
|
|
18
|
-
"FS:P": "fighting-style",
|
|
19
|
-
"FS:R": "fighting-style",
|
|
20
|
-
EB: "epic-boon",
|
|
21
|
-
O: "origin",
|
|
22
|
-
G: "general"
|
|
23
|
-
};
|
|
24
|
-
var FEATURE_TYPE_FOR_CATEGORY = {
|
|
25
|
-
"fighting-style": "fighting_style"
|
|
26
|
-
};
|
|
27
|
-
function featProgressionCategory(codes) {
|
|
28
|
-
for (const code of codes != null ? codes : []) {
|
|
29
|
-
if (Object.prototype.hasOwnProperty.call(FEAT_PROGRESSION_CATEGORY, code)) {
|
|
30
|
-
return FEAT_PROGRESSION_CATEGORY[code];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return void 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export {
|
|
37
|
-
FEAT_CATEGORY_CODE_LABELS,
|
|
38
|
-
featCategoryLabel,
|
|
39
|
-
FEAT_PROGRESSION_CATEGORY,
|
|
40
|
-
FEATURE_TYPE_FOR_CATEGORY,
|
|
41
|
-
featProgressionCategory
|
|
42
|
-
};
|