@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
package/dist/chunk-2FRUSVZS.js
DELETED
|
@@ -1,489 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CR_TO_XP,
|
|
3
|
-
getProficiencyBonus
|
|
4
|
-
} from "./chunk-6PXTNCBP.js";
|
|
5
|
-
import {
|
|
6
|
-
abilityModifier
|
|
7
|
-
} from "./chunk-PDJSUH24.js";
|
|
8
|
-
import {
|
|
9
|
-
ALL_SKILLS
|
|
10
|
-
} from "./chunk-WELIKLZF.js";
|
|
11
|
-
|
|
12
|
-
// src/monster/monster.format.ts
|
|
13
|
-
function capitalizeWords(str) {
|
|
14
|
-
return str.replace(/\b\w/g, (c) => c.toUpperCase());
|
|
15
|
-
}
|
|
16
|
-
function capitalizeOutsideLinks(str) {
|
|
17
|
-
return str.replace(/\[\[([^\]|]+)(?:\|([^\]]*))?\]\]|([^[]+|\[)/g, (m, target, alias, plain) => {
|
|
18
|
-
if (target !== void 0) return alias !== void 0 ? `[[${target}|${capitalizeWords(alias)}]]` : `[[${target}]]`;
|
|
19
|
-
return capitalizeWords(plain != null ? plain : m);
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
var SIZE_CODES = { T: "Tiny", S: "Small", M: "Medium", L: "Large", H: "Huge", G: "Gargantuan" };
|
|
23
|
-
function sizeWords(size) {
|
|
24
|
-
if (size === void 0) return [];
|
|
25
|
-
const arr = Array.isArray(size) ? size : [size];
|
|
26
|
-
return arr.map((s) => {
|
|
27
|
-
var _a;
|
|
28
|
-
return (_a = SIZE_CODES[s]) != null ? _a : capitalizeWords(s);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function joinOr(words) {
|
|
32
|
-
if (words.length <= 1) return words.join("");
|
|
33
|
-
if (words.length === 2) return `${words[0]} or ${words[1]}`;
|
|
34
|
-
return `${words.slice(0, -1).join(", ")}, or ${words[words.length - 1]}`;
|
|
35
|
-
}
|
|
36
|
-
function formatSize(size, note) {
|
|
37
|
-
const text = joinOr(sizeWords(size));
|
|
38
|
-
return note ? `${text} ${note}` : text;
|
|
39
|
-
}
|
|
40
|
-
function sizeWord(size) {
|
|
41
|
-
const first = sizeWords(size)[0];
|
|
42
|
-
return (first != null ? first : "Medium").toLowerCase();
|
|
43
|
-
}
|
|
44
|
-
var ALIGNMENT_CODES = {
|
|
45
|
-
L: "lawful",
|
|
46
|
-
N: "neutral",
|
|
47
|
-
NX: "neutral",
|
|
48
|
-
NY: "neutral",
|
|
49
|
-
C: "chaotic",
|
|
50
|
-
G: "good",
|
|
51
|
-
E: "evil",
|
|
52
|
-
U: "unaligned",
|
|
53
|
-
A: "any alignment"
|
|
54
|
-
};
|
|
55
|
-
var ALIGNMENT_SETS = {
|
|
56
|
-
"C,E,L,NX,NY": "any non-good alignment",
|
|
57
|
-
"C,E,G,NX,NY": "any non-lawful alignment",
|
|
58
|
-
"C,E,L,NX": "any evil alignment",
|
|
59
|
-
"C,E,G,NY": "any chaotic alignment",
|
|
60
|
-
"N,NX,NY": "any neutral alignment"
|
|
61
|
-
};
|
|
62
|
-
function decodeCodes(codes) {
|
|
63
|
-
const key = [...codes].sort().join(",");
|
|
64
|
-
if (ALIGNMENT_SETS[key]) return ALIGNMENT_SETS[key];
|
|
65
|
-
return codes.map((c) => {
|
|
66
|
-
var _a;
|
|
67
|
-
return (_a = ALIGNMENT_CODES[c]) != null ? _a : c;
|
|
68
|
-
}).join(" ");
|
|
69
|
-
}
|
|
70
|
-
function alignmentText(alignment, prefix) {
|
|
71
|
-
if (alignment === void 0) return "";
|
|
72
|
-
let body;
|
|
73
|
-
if (typeof alignment === "string") body = alignment;
|
|
74
|
-
else if (alignment.every((a) => typeof a === "string")) body = decodeCodes(alignment);
|
|
75
|
-
else {
|
|
76
|
-
body = alignment.map((a) => {
|
|
77
|
-
var _a, _b;
|
|
78
|
-
if (typeof a === "string") return (_a = ALIGNMENT_CODES[a]) != null ? _a : a;
|
|
79
|
-
if (a.special) return a.special;
|
|
80
|
-
let t = decodeCodes((_b = a.alignment) != null ? _b : []);
|
|
81
|
-
if (a.chance !== void 0) t += ` (${a.chance}%)`;
|
|
82
|
-
if (a.note) t += ` (${a.note})`;
|
|
83
|
-
return t;
|
|
84
|
-
}).join(" or ");
|
|
85
|
-
}
|
|
86
|
-
return `${prefix != null ? prefix : ""}${body}`;
|
|
87
|
-
}
|
|
88
|
-
function formatAlignment(alignment, prefix) {
|
|
89
|
-
return capitalizeWords(alignmentText(alignment, prefix));
|
|
90
|
-
}
|
|
91
|
-
function alignmentWords(alignment) {
|
|
92
|
-
return alignmentText(alignment).toLowerCase();
|
|
93
|
-
}
|
|
94
|
-
var IRREGULAR_PLURALS = { fey: "fey", undead: "undead" };
|
|
95
|
-
function plural(word) {
|
|
96
|
-
var _a;
|
|
97
|
-
return (_a = IRREGULAR_PLURALS[word.toLowerCase()]) != null ? _a : `${word}s`;
|
|
98
|
-
}
|
|
99
|
-
function formatType(type, level) {
|
|
100
|
-
var _a, _b;
|
|
101
|
-
if (type === void 0) return "";
|
|
102
|
-
if (typeof type === "string") return capitalizeWords(type);
|
|
103
|
-
const baseText = typeof type.type === "string" ? capitalizeWords(type.type) : type.type.choose.map(capitalizeWords).join(" or ");
|
|
104
|
-
let text = type.swarm_size !== void 0 ? `Swarm of ${(_a = SIZE_CODES[type.swarm_size]) != null ? _a : capitalizeWords(type.swarm_size)} ${capitalizeWords(plural(typeof type.type === "string" ? type.type : type.type.choose.join(" or ")))}` : baseText;
|
|
105
|
-
const tags = ((_b = type.tags) != null ? _b : []).map((t) => typeof t === "string" ? t : t.prefix_hidden ? t.tag : `${t.prefix} ${t.tag}`);
|
|
106
|
-
if (tags.length > 0) text += ` (${tags.map(capitalizeWords).join(", ")})`;
|
|
107
|
-
if (type.sidekick_type && !type.sidekick_hidden) {
|
|
108
|
-
text += `, ${capitalizeWords(type.sidekick_type)} Sidekick`;
|
|
109
|
-
if (type.sidekick_tags && type.sidekick_tags.length > 0) text += ` (${type.sidekick_tags.map(capitalizeWords).join(", ")})`;
|
|
110
|
-
if (level !== void 0) text += ` (level ${level})`;
|
|
111
|
-
}
|
|
112
|
-
return text;
|
|
113
|
-
}
|
|
114
|
-
var CR_DECIMAL_KEYS = { "0.125": "1/8", "0.25": "1/4", "0.5": "1/2" };
|
|
115
|
-
function hasOwn(table, key) {
|
|
116
|
-
return Object.prototype.hasOwnProperty.call(table, key);
|
|
117
|
-
}
|
|
118
|
-
function crKey(text) {
|
|
119
|
-
return hasOwn(CR_DECIMAL_KEYS, text) ? CR_DECIMAL_KEYS[text] : text;
|
|
120
|
-
}
|
|
121
|
-
function xpFor(cr) {
|
|
122
|
-
const key = crKey(cr);
|
|
123
|
-
return hasOwn(CR_TO_XP, key) ? CR_TO_XP[key] : 0;
|
|
124
|
-
}
|
|
125
|
-
function formatCR(cr) {
|
|
126
|
-
var _a;
|
|
127
|
-
if (cr === void 0 || cr === null) return void 0;
|
|
128
|
-
const obj = typeof cr === "object" ? cr : { cr: String(cr) };
|
|
129
|
-
const text = String(obj.cr);
|
|
130
|
-
const key = crKey(text);
|
|
131
|
-
const tableMiss = !hasOwn(CR_TO_XP, key);
|
|
132
|
-
return {
|
|
133
|
-
crText: text,
|
|
134
|
-
xp: (_a = obj.xp) != null ? _a : xpFor(text),
|
|
135
|
-
pb: getProficiencyBonus(key),
|
|
136
|
-
tableMiss,
|
|
137
|
-
lair: obj.lair,
|
|
138
|
-
coven: obj.coven,
|
|
139
|
-
xpLair: obj.xp_lair,
|
|
140
|
-
xpOverride: obj.xp
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
function formatXP(xp) {
|
|
144
|
-
return String(xp).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
145
|
-
}
|
|
146
|
-
function crString(cr) {
|
|
147
|
-
var _a;
|
|
148
|
-
return (_a = formatCR(cr)) == null ? void 0 : _a.crText;
|
|
149
|
-
}
|
|
150
|
-
function challengeLine(cr, pbNote) {
|
|
151
|
-
const f = formatCR(cr);
|
|
152
|
-
if (!f) return void 0;
|
|
153
|
-
const pbText = pbNote ? `PB ${pbNote}` : `PB +${f.pb}`;
|
|
154
|
-
if (f.tableMiss && f.xpOverride === void 0) return `${f.crText} (${pbText})`;
|
|
155
|
-
const xpText = `${formatXP(f.xp)} XP`;
|
|
156
|
-
if (f.xpLair !== void 0) return `${f.crText} (${xpText}, or ${formatXP(f.xpLair)} XP in its lair; ${pbText})`;
|
|
157
|
-
let line = `${f.crText} (${xpText}; ${pbText})`;
|
|
158
|
-
if (f.lair !== void 0) line += `, or ${f.lair} (${formatXP(xpFor(f.lair))} XP) in its lair`;
|
|
159
|
-
if (f.coven !== void 0) line += `, or ${f.coven} (${formatXP(xpFor(f.coven))} XP) as a coven`;
|
|
160
|
-
return line;
|
|
161
|
-
}
|
|
162
|
-
function formatAC(ac) {
|
|
163
|
-
const parts = [];
|
|
164
|
-
for (const entry of ac != null ? ac : []) {
|
|
165
|
-
if (entry.special !== void 0) {
|
|
166
|
-
parts.push({ text: entry.special, braced: false });
|
|
167
|
-
continue;
|
|
168
|
-
}
|
|
169
|
-
if (entry.ac === void 0) continue;
|
|
170
|
-
let text = String(entry.ac);
|
|
171
|
-
if (entry.from && entry.from.length > 0) text += ` (${entry.from.map(capitalizeOutsideLinks).join(", ")})`;
|
|
172
|
-
if (entry.condition) text += ` ${entry.condition}`;
|
|
173
|
-
parts.push(entry.braces ? { text: `(${text})`, braced: true } : { text, braced: false });
|
|
174
|
-
}
|
|
175
|
-
if (parts.length === 0) return "10";
|
|
176
|
-
return parts.reduce((acc, p, i) => i === 0 ? p.text : `${acc}${p.braced ? " " : ", "}${p.text}`, "");
|
|
177
|
-
}
|
|
178
|
-
function formatHP(hp) {
|
|
179
|
-
if (!hp) return { text: "0" };
|
|
180
|
-
if (hp.special !== void 0) return { text: hp.special };
|
|
181
|
-
if (hp.average === void 0) return { text: "0" };
|
|
182
|
-
return hp.formula ? { text: String(hp.average), formula: hp.formula } : { text: String(hp.average) };
|
|
183
|
-
}
|
|
184
|
-
var SPEED_MODES = ["walk", "fly", "swim", "climb", "burrow"];
|
|
185
|
-
function speedEntry(mode, value, hoverAppend) {
|
|
186
|
-
if (value === void 0 || value === null) return void 0;
|
|
187
|
-
const n = typeof value === "number" ? value : value.number;
|
|
188
|
-
if (!n) return void 0;
|
|
189
|
-
let text = `${capitalizeWords(mode)} ${n} ft.`;
|
|
190
|
-
const cond = typeof value === "number" ? void 0 : value.condition;
|
|
191
|
-
if (cond) text += ` ${cond}`;
|
|
192
|
-
if (hoverAppend && !(cond != null ? cond : "").toLowerCase().includes("hover")) text += " (hover)";
|
|
193
|
-
return text;
|
|
194
|
-
}
|
|
195
|
-
function formatSpeed(speed) {
|
|
196
|
-
var _a;
|
|
197
|
-
if (!speed) return "0 ft.";
|
|
198
|
-
const parts = [];
|
|
199
|
-
for (const mode of SPEED_MODES) {
|
|
200
|
-
const e = speedEntry(mode, speed[mode], mode === "fly" && speed.can_hover === true);
|
|
201
|
-
if (e) parts.push(e);
|
|
202
|
-
}
|
|
203
|
-
for (const [mode, entries] of Object.entries((_a = speed.alternate) != null ? _a : {})) {
|
|
204
|
-
for (const alt of entries) {
|
|
205
|
-
const e = speedEntry(mode, alt, false);
|
|
206
|
-
if (e) parts.push(e);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
if (speed.choose) {
|
|
210
|
-
let t = `${speed.choose.amount} ft. ${speed.choose.from.join(" or ")}`;
|
|
211
|
-
if (speed.choose.note) t += ` ${speed.choose.note}`;
|
|
212
|
-
parts.push(t);
|
|
213
|
-
}
|
|
214
|
-
return parts.join(", ");
|
|
215
|
-
}
|
|
216
|
-
function speedNumber(speed, mode) {
|
|
217
|
-
const v = speed == null ? void 0 : speed[mode];
|
|
218
|
-
if (v === void 0 || v === null) return 0;
|
|
219
|
-
return typeof v === "number" ? v : v.number;
|
|
220
|
-
}
|
|
221
|
-
function qualifierText(q) {
|
|
222
|
-
var _a;
|
|
223
|
-
if (typeof q === "string") return capitalizeWords(q);
|
|
224
|
-
if (q.special !== void 0) return q.special;
|
|
225
|
-
const inner = ((_a = q.types) != null ? _a : []).map(qualifierText).join(", ");
|
|
226
|
-
let text = inner;
|
|
227
|
-
if (q.pre_note) text = `${q.pre_note} ${text}`;
|
|
228
|
-
if (q.note) text = `${text} ${q.note}`;
|
|
229
|
-
return text;
|
|
230
|
-
}
|
|
231
|
-
function formatQualifiers(list) {
|
|
232
|
-
return (list != null ? list : []).map(qualifierText);
|
|
233
|
-
}
|
|
234
|
-
function qualifierStrings(list) {
|
|
235
|
-
return (list != null ? list : []).filter((q) => typeof q === "string");
|
|
236
|
-
}
|
|
237
|
-
var INITIATIVE_MODES = { advantage: "advantage", adv: "advantage", disadvantage: "disadvantage", dis: "disadvantage" };
|
|
238
|
-
function formatInitiative(initiative, abilities, pb) {
|
|
239
|
-
var _a;
|
|
240
|
-
if (initiative === void 0 || initiative === null) return void 0;
|
|
241
|
-
const dex = abilities ? abilityModifier(abilities.dex) : 0;
|
|
242
|
-
const bonus = typeof initiative === "number" ? initiative : dex + ((_a = initiative.proficiency) != null ? _a : 0) * pb;
|
|
243
|
-
const sign = bonus >= 0 ? `+${bonus}` : `${bonus}`;
|
|
244
|
-
let text = `${sign} (${10 + bonus})`;
|
|
245
|
-
const mode = typeof initiative === "number" ? void 0 : initiative.advantage_mode;
|
|
246
|
-
if (mode && INITIATIVE_MODES[mode]) text += ` (${INITIATIVE_MODES[mode]})`;
|
|
247
|
-
return text;
|
|
248
|
-
}
|
|
249
|
-
function itemName(uid) {
|
|
250
|
-
return capitalizeWords(uid.split("|")[0]);
|
|
251
|
-
}
|
|
252
|
-
function formatGear(gear) {
|
|
253
|
-
return (gear != null ? gear : []).map((g) => {
|
|
254
|
-
var _a;
|
|
255
|
-
if (typeof g === "string") return itemName(g);
|
|
256
|
-
const name = (_a = g.displayName) != null ? _a : itemName(g.item);
|
|
257
|
-
return g.quantity !== void 0 && g.quantity > 1 ? `${name} \xD7 ${g.quantity}` : name;
|
|
258
|
-
}).join(", ");
|
|
259
|
-
}
|
|
260
|
-
function formatLanguages(list) {
|
|
261
|
-
return (list != null ? list : []).map((entry) => entry.replace(/([\d,]*\d[\d,]*\s+)?\b(\w)/g, (m, amount, ch) => amount ? m : ch.toUpperCase())).join(", ");
|
|
262
|
-
}
|
|
263
|
-
var SKILL_DISPLAY = new Map(ALL_SKILLS.map((s) => [s.toLowerCase(), s]));
|
|
264
|
-
function skillDisplayName(key) {
|
|
265
|
-
var _a;
|
|
266
|
-
return (_a = SKILL_DISPLAY.get(key.replace(/[_-]+/g, " ").trim().toLowerCase())) != null ? _a : capitalizeWords(key);
|
|
267
|
-
}
|
|
268
|
-
function formatSkillsOther(list) {
|
|
269
|
-
if (!list || list.length === 0) return void 0;
|
|
270
|
-
const parts = [];
|
|
271
|
-
for (const entry of list) {
|
|
272
|
-
const oneOf = entry == null ? void 0 : entry.one_of;
|
|
273
|
-
if (!oneOf) continue;
|
|
274
|
-
parts.push(Object.entries(oneOf).map(([k, v]) => `${skillDisplayName(k)} ${String(v)}`).join(", "));
|
|
275
|
-
}
|
|
276
|
-
return parts.length > 0 ? `plus one of: ${parts.join("; ")}` : void 0;
|
|
277
|
-
}
|
|
278
|
-
function shortNameOfNamed(name) {
|
|
279
|
-
return name.includes(",") ? name.split(",")[0].trim() : name;
|
|
280
|
-
}
|
|
281
|
-
function legendaryIntro(m, count) {
|
|
282
|
-
const subject = m.is_named_creature ? typeof m.short_name === "string" ? m.short_name : m.short_name === void 0 ? shortNameOfNamed(m.name) : m.name : `the ${m.name.toLowerCase()}`;
|
|
283
|
-
const Subject = m.is_named_creature ? subject : `The ${m.name.toLowerCase()}`;
|
|
284
|
-
const lair = m.legendary_actions_lair_count !== void 0 ? ` (${m.legendary_actions_lair_count} in its lair)` : "";
|
|
285
|
-
return `${Subject} can take ${count} legendary actions${lair}, choosing from the options below. Only one legendary action option can be used at a time and only at the end of another creature's turn. ${Subject} regains spent legendary actions at the start of its turn.`;
|
|
286
|
-
}
|
|
287
|
-
function sectionHeader(m, section) {
|
|
288
|
-
var _a;
|
|
289
|
-
const entry = ((_a = m.section_headers) != null ? _a : []).find((h) => h.section === section);
|
|
290
|
-
if (entry) return entry.header;
|
|
291
|
-
if (section === "mythic" && m.mythic_header && m.mythic_header.length > 0) return m.mythic_header;
|
|
292
|
-
return void 0;
|
|
293
|
-
}
|
|
294
|
-
var DISPLAY_AS_SECTION = {
|
|
295
|
-
action: "actions",
|
|
296
|
-
bonus: "bonus_actions",
|
|
297
|
-
reaction: "reactions",
|
|
298
|
-
legendary: "legendary_actions"
|
|
299
|
-
};
|
|
300
|
-
function displayAsSection(displayAs) {
|
|
301
|
-
return displayAs !== void 0 && DISPLAY_AS_SECTION[displayAs] || "traits";
|
|
302
|
-
}
|
|
303
|
-
var GROUP_ORDER = ["will", "daily", "rest", "restLong", "recharge", "legendary", "charges", "ritual"];
|
|
304
|
-
var SPELLCASTING_LABELS = {
|
|
305
|
-
will: { plain: "At Will:" },
|
|
306
|
-
daily: { plain: "N/Day:", each: "N/Day Each:" },
|
|
307
|
-
rest: { plain: "N/Rest:", each: "N/Rest Each:" },
|
|
308
|
-
restLong: { plain: "N/Long Rest:", each: "N/Long Rest Each:" },
|
|
309
|
-
recharge: { plain: "Recharge N-6:", six: "Recharge 6:" },
|
|
310
|
-
legendary: { plain: "N/Legendary Action:", each: "N/Legendary Action Each:" },
|
|
311
|
-
charges: { plain: "N Charges", each: "N Charges Each" },
|
|
312
|
-
ritual: { plain: "Rituals:" }
|
|
313
|
-
};
|
|
314
|
-
function spellText(e) {
|
|
315
|
-
if (typeof e === "string") return e;
|
|
316
|
-
if (!e || typeof e !== "object") return void 0;
|
|
317
|
-
return e.hidden ? void 0 : e.entry;
|
|
318
|
-
}
|
|
319
|
-
function spellsOf(list) {
|
|
320
|
-
return (Array.isArray(list) ? list : []).map(spellText).filter((s) => s !== void 0).join(", ");
|
|
321
|
-
}
|
|
322
|
-
function sortedKeys(record) {
|
|
323
|
-
return Object.keys(record).sort((a, b) => {
|
|
324
|
-
const na = parseInt(a, 10), nb = parseInt(b, 10);
|
|
325
|
-
if (na !== nb) return nb - na;
|
|
326
|
-
return (a.endsWith("e") ? 1 : 0) - (b.endsWith("e") ? 1 : 0);
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
function ordinal(n) {
|
|
330
|
-
var _a, _b;
|
|
331
|
-
const s = ["th", "st", "nd", "rd"], v = n % 100;
|
|
332
|
-
return `${n}${(_b = (_a = s[(v - 20) % 10]) != null ? _a : s[v]) != null ? _b : s[0]}`;
|
|
333
|
-
}
|
|
334
|
-
function spellcastingLines(block) {
|
|
335
|
-
var _a, _b, _c, _d;
|
|
336
|
-
const hidden = new Set(Array.isArray(block.hidden) ? block.hidden : []);
|
|
337
|
-
const lines = Array.isArray(block.headerEntries) ? [...block.headerEntries] : [];
|
|
338
|
-
for (const group of GROUP_ORDER) {
|
|
339
|
-
if (hidden.has(group)) continue;
|
|
340
|
-
const label = SPELLCASTING_LABELS[group];
|
|
341
|
-
if (group === "will" || group === "ritual") {
|
|
342
|
-
const s = spellsOf(group === "will" ? block.will : block.ritual);
|
|
343
|
-
if (s) lines.push(`${label.plain} ${s}`);
|
|
344
|
-
continue;
|
|
345
|
-
}
|
|
346
|
-
if (group === "recharge") {
|
|
347
|
-
for (const k of sortedKeys((_a = block.recharge) != null ? _a : {})) {
|
|
348
|
-
const s = spellsOf(block.recharge[k]);
|
|
349
|
-
if (!s) continue;
|
|
350
|
-
lines.push(`${(k === "6" ? (_b = label.six) != null ? _b : label.plain : label.plain).replace("N", k)} ${s}`);
|
|
351
|
-
}
|
|
352
|
-
continue;
|
|
353
|
-
}
|
|
354
|
-
const record = (_c = block[group]) != null ? _c : {};
|
|
355
|
-
for (const k of sortedKeys(record)) {
|
|
356
|
-
const s = spellsOf(record[k]);
|
|
357
|
-
if (!s) continue;
|
|
358
|
-
const text = (k.endsWith("e") ? (_d = label.each) != null ? _d : label.plain : label.plain).replace("N", String(parseInt(k, 10)));
|
|
359
|
-
lines.push(group === "charges" ? `${text}${block.chargesItem ? ` (${block.chargesItem})` : ""}: ${s}` : `${text} ${s}`);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
if (!hidden.has("spells") && block.spells) {
|
|
363
|
-
const levelKeys = Object.keys(block.spells).filter((k) => String(Number(k)) === k).sort((a, b) => Number(a) - Number(b));
|
|
364
|
-
for (const key of levelKeys) {
|
|
365
|
-
const level = block.spells[key];
|
|
366
|
-
if (!level || !Array.isArray(level.spells)) continue;
|
|
367
|
-
const lvl = Number(key);
|
|
368
|
-
const s = level.spells.join(", ");
|
|
369
|
-
if (!s) continue;
|
|
370
|
-
if (lvl === 0) {
|
|
371
|
-
lines.push(`Cantrips (At Will): ${s}`);
|
|
372
|
-
continue;
|
|
373
|
-
}
|
|
374
|
-
const plural2 = level.slots === 1 ? "Slot" : "Slots";
|
|
375
|
-
const slots = level.slots !== void 0 ? level.lower !== void 0 ? `${level.slots} ${ordinal(level.lower)}-Level ${plural2}` : `${level.slots} ${plural2}` : void 0;
|
|
376
|
-
lines.push(`${ordinal(lvl)} Level${slots ? ` (${slots})` : ""}: ${s}`);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
if (Array.isArray(block.footerEntries)) lines.push(...block.footerEntries);
|
|
380
|
-
return lines;
|
|
381
|
-
}
|
|
382
|
-
function inline(v) {
|
|
383
|
-
if (typeof v === "string") return v;
|
|
384
|
-
if (Array.isArray(v)) return v.map(inline).filter(Boolean).join(" ");
|
|
385
|
-
if (v && typeof v === "object") {
|
|
386
|
-
const n = v;
|
|
387
|
-
const parts = [];
|
|
388
|
-
if (typeof n.name === "string") parts.push(`**${n.name}.**`);
|
|
389
|
-
if (n.entry !== void 0) parts.push(inline(n.entry));
|
|
390
|
-
if (n.entries !== void 0) parts.push(inline(n.entries));
|
|
391
|
-
if (n.items !== void 0) parts.push(inline(n.items));
|
|
392
|
-
return parts.join(" ");
|
|
393
|
-
}
|
|
394
|
-
return v === void 0 || v === null ? "" : String(v);
|
|
395
|
-
}
|
|
396
|
-
function blocksOf(v) {
|
|
397
|
-
if (typeof v === "string") return [v];
|
|
398
|
-
if (Array.isArray(v)) return v.flatMap(blocksOf);
|
|
399
|
-
if (!v || typeof v !== "object") return [];
|
|
400
|
-
const n = v;
|
|
401
|
-
const type = typeof n.type === "string" ? n.type : "entries";
|
|
402
|
-
switch (type) {
|
|
403
|
-
case "entries":
|
|
404
|
-
case "section": {
|
|
405
|
-
const body = blocksOf(n.entries);
|
|
406
|
-
if (typeof n.name === "string" && body.length > 0) body[0] = `**${n.name}.** ${body[0]}`;
|
|
407
|
-
else if (typeof n.name === "string") body.push(`**${n.name}.**`);
|
|
408
|
-
return body;
|
|
409
|
-
}
|
|
410
|
-
case "list": {
|
|
411
|
-
const items = Array.isArray(n.items) ? n.items : [];
|
|
412
|
-
return [items.map((it) => `- ${inline(it)}`).join("\n")];
|
|
413
|
-
}
|
|
414
|
-
case "item":
|
|
415
|
-
return [inline(n)];
|
|
416
|
-
case "table": {
|
|
417
|
-
const out = [];
|
|
418
|
-
if (typeof n.caption === "string") out.push(`**${n.caption}**`);
|
|
419
|
-
const cell = (v2) => inline(v2).replace(/\\?\|/g, "\\|");
|
|
420
|
-
const styles = Array.isArray(n.colStyles) ? n.colStyles.map((x) => String(x)) : [];
|
|
421
|
-
const alignment = (i) => {
|
|
422
|
-
var _a;
|
|
423
|
-
const s = (_a = styles[i]) != null ? _a : "";
|
|
424
|
-
if (/\btext-center\b/.test(s)) return ":---:";
|
|
425
|
-
if (/\btext-right\b/.test(s)) return "---:";
|
|
426
|
-
return "---";
|
|
427
|
-
};
|
|
428
|
-
const cols = Array.isArray(n.colLabels) ? n.colLabels.map(cell) : [];
|
|
429
|
-
const rows = Array.isArray(n.rows) ? n.rows : [];
|
|
430
|
-
const table = [`| ${cols.join(" | ")} |`, `| ${cols.map((_, i) => alignment(i)).join(" | ")} |`];
|
|
431
|
-
for (const r of rows) table.push(`| ${(Array.isArray(r) ? r : [r]).map(cell).join(" | ")} |`);
|
|
432
|
-
out.push(table.join("\n"));
|
|
433
|
-
return out;
|
|
434
|
-
}
|
|
435
|
-
case "inset":
|
|
436
|
-
case "variant":
|
|
437
|
-
case "variantInner":
|
|
438
|
-
case "variantSub": {
|
|
439
|
-
const body = blocksOf(n.entries).map((b) => b.split("\n").map((l) => `> ${l}`).join("\n"));
|
|
440
|
-
const head = typeof n.name === "string" ? [`> **${n.name}**`] : [];
|
|
441
|
-
return [[...head, ...body].join("\n>\n")];
|
|
442
|
-
}
|
|
443
|
-
case "spellcasting":
|
|
444
|
-
return [spellcastingLines(n).join("\n")];
|
|
445
|
-
default:
|
|
446
|
-
return [...blocksOf(n.entries), ...blocksOf(n.items), ...blocksOf(n.entry)];
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
function entriesToMarkdown(tree) {
|
|
450
|
-
return blocksOf(tree).filter((b) => b.length > 0).join("\n\n");
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
export {
|
|
454
|
-
capitalizeWords,
|
|
455
|
-
capitalizeOutsideLinks,
|
|
456
|
-
SIZE_CODES,
|
|
457
|
-
formatSize,
|
|
458
|
-
sizeWord,
|
|
459
|
-
ALIGNMENT_CODES,
|
|
460
|
-
ALIGNMENT_SETS,
|
|
461
|
-
formatAlignment,
|
|
462
|
-
alignmentWords,
|
|
463
|
-
IRREGULAR_PLURALS,
|
|
464
|
-
formatType,
|
|
465
|
-
formatCR,
|
|
466
|
-
formatXP,
|
|
467
|
-
crString,
|
|
468
|
-
challengeLine,
|
|
469
|
-
formatAC,
|
|
470
|
-
formatHP,
|
|
471
|
-
SPEED_MODES,
|
|
472
|
-
formatSpeed,
|
|
473
|
-
speedNumber,
|
|
474
|
-
formatQualifiers,
|
|
475
|
-
qualifierStrings,
|
|
476
|
-
INITIATIVE_MODES,
|
|
477
|
-
formatInitiative,
|
|
478
|
-
formatGear,
|
|
479
|
-
formatLanguages,
|
|
480
|
-
skillDisplayName,
|
|
481
|
-
formatSkillsOther,
|
|
482
|
-
legendaryIntro,
|
|
483
|
-
sectionHeader,
|
|
484
|
-
DISPLAY_AS_SECTION,
|
|
485
|
-
displayAsSection,
|
|
486
|
-
SPELLCASTING_LABELS,
|
|
487
|
-
spellcastingLines,
|
|
488
|
-
entriesToMarkdown
|
|
489
|
-
};
|
package/dist/chunk-2LULMQTF.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// src/types/equipment-grant.ts
|
|
2
|
-
function isCategoryGrant(g) {
|
|
3
|
-
return !!g && typeof g === "object" && typeof g.category === "string" && g.category.length > 0;
|
|
4
|
-
}
|
|
5
|
-
var equipmentCategoryKey = (i, j, k) => `equipment-${i}-opt-${j}-cat-${k}`;
|
|
6
|
-
var equipmentCategoryKeys = (grants, i, j) => grants.flatMap((g, k) => isCategoryGrant(g) ? [equipmentCategoryKey(i, j, k)] : []);
|
|
7
|
-
var isStartingEquipmentKey = (key) => key.startsWith("equipment-");
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
isCategoryGrant,
|
|
11
|
-
equipmentCategoryKey,
|
|
12
|
-
equipmentCategoryKeys,
|
|
13
|
-
isStartingEquipmentKey
|
|
14
|
-
};
|
package/dist/chunk-3LWMFYKS.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
classifyWeaponRange
|
|
3
|
-
} from "./chunk-YDGMBMYI.js";
|
|
4
|
-
|
|
5
|
-
// src/pc/pc.weapon-grant.ts
|
|
6
|
-
var PROPERTY_KEY = {
|
|
7
|
-
"2h": "two_handed",
|
|
8
|
-
"two-handed": "two_handed",
|
|
9
|
-
"two handed": "two_handed",
|
|
10
|
-
h: "heavy",
|
|
11
|
-
l: "light",
|
|
12
|
-
f: "finesse",
|
|
13
|
-
t: "thrown",
|
|
14
|
-
v: "versatile",
|
|
15
|
-
r: "reach",
|
|
16
|
-
a: "ammunition",
|
|
17
|
-
ld: "loading",
|
|
18
|
-
s: "special"
|
|
19
|
-
};
|
|
20
|
-
var propertyKey = (word) => {
|
|
21
|
-
var _a;
|
|
22
|
-
const w = word.trim().toLowerCase();
|
|
23
|
-
return (_a = PROPERTY_KEY[w]) != null ? _a : w.replace(/[\s-]+/g, "_");
|
|
24
|
-
};
|
|
25
|
-
var GRANT_RE = new RegExp(
|
|
26
|
-
"^(?:all\\s+)?(?:(melee|ranged)\\s+)?(simple|martial)(?:\\s+(melee|ranged))?\\s+weapons?\\s+(?:that|which)\\s+(have|has|don'?t\\s+have|do\\s+not\\s+have|doesn'?t\\s+have|does\\s+not\\s+have)\\s+the\\s+(.+?)\\s+propert(?:y|ies)\\.?$",
|
|
27
|
-
"i"
|
|
28
|
-
);
|
|
29
|
-
function parseQualifiedWeaponGrant(text) {
|
|
30
|
-
var _a, _b;
|
|
31
|
-
const m = GRANT_RE.exec(text.replace(/’/g, "'").trim().replace(/\s+/g, " "));
|
|
32
|
-
if (!m) return null;
|
|
33
|
-
const range = (_b = (_a = m[1]) != null ? _a : m[3]) == null ? void 0 : _b.toLowerCase();
|
|
34
|
-
const properties = m[5].split(/\s*,\s*|\s+or\s+|\s+and\s+/i).map((w) => w.trim()).filter(Boolean).map(propertyKey);
|
|
35
|
-
if (properties.length === 0) return null;
|
|
36
|
-
return {
|
|
37
|
-
category: m[2].toLowerCase(),
|
|
38
|
-
...range ? { range } : {},
|
|
39
|
-
properties,
|
|
40
|
-
without: /n'?t|not/i.test(m[4])
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function qualifiedGrantCovers(text, weapon) {
|
|
44
|
-
const g = parseQualifiedWeaponGrant(text);
|
|
45
|
-
if (!g || typeof weapon.category !== "string") return false;
|
|
46
|
-
if (!new RegExp(`^${g.category}\\b`).test(weapon.category)) return false;
|
|
47
|
-
if (g.range) {
|
|
48
|
-
const melee = classifyWeaponRange(weapon).melee !== null;
|
|
49
|
-
if (g.range === "melee" !== melee) return false;
|
|
50
|
-
}
|
|
51
|
-
const has = g.properties.some((p) => weapon.properties.some((x) => x === p));
|
|
52
|
-
return g.without ? !has : has;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export {
|
|
56
|
-
qualifiedGrantCovers
|
|
57
|
-
};
|
package/dist/chunk-3SFGWFVQ.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
featEntitySchema
|
|
3
|
-
} from "./chunk-FMYWORTP.js";
|
|
4
|
-
|
|
5
|
-
// src/feat/feat.parser.ts
|
|
6
|
-
import { parseYaml } from "@archivist-gg/core";
|
|
7
|
-
function parseFeat(source) {
|
|
8
|
-
const raw = parseYaml(source, ["name", "slug"]);
|
|
9
|
-
if (!raw.success) return raw;
|
|
10
|
-
const result = featEntitySchema.safeParse({ edition: "2014", ...raw.data });
|
|
11
|
-
if (!result.success) {
|
|
12
|
-
return { success: false, error: `feat schema validation failed: ${result.error.message}` };
|
|
13
|
-
}
|
|
14
|
-
return { success: true, data: result.data };
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
parseFeat
|
|
19
|
-
};
|
package/dist/chunk-3SIUAFDQ.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseBackground
|
|
3
|
-
} from "./chunk-NKZMQV2C.js";
|
|
4
|
-
|
|
5
|
-
// src/background/background.codec.ts
|
|
6
|
-
import yaml from "js-yaml";
|
|
7
|
-
var backgroundCodec = {
|
|
8
|
-
parse(doc) {
|
|
9
|
-
return parseBackground(doc.body);
|
|
10
|
-
},
|
|
11
|
-
serialize(entity) {
|
|
12
|
-
return yaml.dump(entity, { lineWidth: -1, sortKeys: false });
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
backgroundCodec
|
|
18
|
-
};
|
package/dist/chunk-3TM34RSJ.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// src/inline-tag-parser.ts
|
|
2
|
-
var VALID_PREFIXES = ["dice", "damage", "dc", "atk", "mod", "check"];
|
|
3
|
-
var PREFIX_ALIASES = {
|
|
4
|
-
roll: "dice",
|
|
5
|
-
d: "dice",
|
|
6
|
-
attack: "atk",
|
|
7
|
-
dmg: "damage"
|
|
8
|
-
};
|
|
9
|
-
function parseInlineTag(text) {
|
|
10
|
-
var _a;
|
|
11
|
-
const colonIndex = text.indexOf(":");
|
|
12
|
-
if (colonIndex === -1) return null;
|
|
13
|
-
const prefix = text.slice(0, colonIndex).trim().toLowerCase();
|
|
14
|
-
const resolved = (_a = PREFIX_ALIASES[prefix]) != null ? _a : prefix;
|
|
15
|
-
if (!VALID_PREFIXES.includes(resolved)) return null;
|
|
16
|
-
const content = text.slice(colonIndex + 1).trim();
|
|
17
|
-
if (content.length === 0) return null;
|
|
18
|
-
return { type: resolved, content, formula: null };
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
parseInlineTag
|
|
23
|
-
};
|
package/dist/chunk-4J6DS3EJ.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// src/entities/registry-revision.ts
|
|
2
|
-
function registryRevision(registry) {
|
|
3
|
-
const r = registry == null ? void 0 : registry.revision;
|
|
4
|
-
return typeof r === "number" ? r : void 0;
|
|
5
|
-
}
|
|
6
|
-
function memoByRevision(cache, registry, compute) {
|
|
7
|
-
const revision = registryRevision(registry);
|
|
8
|
-
if (revision === void 0) return compute();
|
|
9
|
-
const hit = cache.get(registry);
|
|
10
|
-
if (hit && hit.revision === revision) return hit.value;
|
|
11
|
-
const value = compute();
|
|
12
|
-
cache.set(registry, { revision, value });
|
|
13
|
-
return value;
|
|
14
|
-
}
|
|
15
|
-
var BUCKETS = /* @__PURE__ */ new WeakMap();
|
|
16
|
-
function bucketOf(registry, type) {
|
|
17
|
-
const byType = memoByRevision(BUCKETS, registry, () => /* @__PURE__ */ new Map());
|
|
18
|
-
let bucket = byType.get(type);
|
|
19
|
-
if (!bucket) {
|
|
20
|
-
bucket = registry.search("", type, Number.POSITIVE_INFINITY);
|
|
21
|
-
byType.set(type, bucket);
|
|
22
|
-
}
|
|
23
|
-
return bucket;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
registryRevision,
|
|
28
|
-
memoByRevision,
|
|
29
|
-
bucketOf
|
|
30
|
-
};
|
package/dist/chunk-4U55VNC7.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// src/schemas/feature-alias.ts
|
|
2
|
-
function aliasFeatureActionCost(f) {
|
|
3
|
-
if (f.action === void 0 && typeof f.action_cost === "string") f.action = f.action_cost;
|
|
4
|
-
}
|
|
5
|
-
function aliasFeatureListActionCost(list) {
|
|
6
|
-
if (Array.isArray(list)) {
|
|
7
|
-
for (const f of list) if (f && typeof f === "object") aliasFeatureActionCost(f);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
function aliasFeaturesByLevelActionCost(byLevel) {
|
|
11
|
-
if (byLevel && typeof byLevel === "object")
|
|
12
|
-
for (const list of Object.values(byLevel)) aliasFeatureListActionCost(list);
|
|
13
|
-
}
|
|
14
|
-
function withResolvedActionCost(f) {
|
|
15
|
-
return f.action === void 0 && typeof f.action_cost === "string" ? { ...f, action: f.action_cost } : f;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
aliasFeatureListActionCost,
|
|
20
|
-
aliasFeaturesByLevelActionCost,
|
|
21
|
-
withResolvedActionCost
|
|
22
|
-
};
|