@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-NZO7M5GV.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseSubclass
|
|
3
|
-
} from "./chunk-UNYR5GLI.js";
|
|
4
|
-
|
|
5
|
-
// src/subclass/subclass.codec.ts
|
|
6
|
-
import yaml from "js-yaml";
|
|
7
|
-
var subclassCodec = {
|
|
8
|
-
parse(doc) {
|
|
9
|
-
return parseSubclass(doc.body);
|
|
10
|
-
},
|
|
11
|
-
serialize(entity) {
|
|
12
|
-
return yaml.dump(entity, { lineWidth: -1, sortKeys: false });
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
subclassCodec
|
|
18
|
-
};
|
package/dist/chunk-OOL4KMG2.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
featureEffectSchema
|
|
3
|
-
} from "./chunk-JXWNXIIZ.js";
|
|
4
|
-
|
|
5
|
-
// src/schemas/choice-schema.ts
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
var abilityEnum = z.enum(["str", "dex", "con", "int", "wis", "cha"]);
|
|
8
|
-
var entityFilterSchema = z.object({
|
|
9
|
-
feature_type: z.string().min(1).optional(),
|
|
10
|
-
category: z.string().min(1).optional(),
|
|
11
|
-
parent_class: z.literal("self").optional(),
|
|
12
|
-
available_to: z.literal("self").optional(),
|
|
13
|
-
weapon_category: z.enum(["simple", "martial"]).optional(),
|
|
14
|
-
armor_category: z.enum(["light", "medium", "heavy", "shield"]).optional(),
|
|
15
|
-
item_type: z.array(z.string().min(1)).nonempty().optional(),
|
|
16
|
-
mundane: z.boolean().optional(),
|
|
17
|
-
list: z.string().min(1).optional(),
|
|
18
|
-
level: z.number().int().min(0).max(9).optional(),
|
|
19
|
-
edition: z.string().min(1).optional(),
|
|
20
|
-
// D2b-A (design §2.2 step 1): Pact of the Tome's "level 1 ritual spells".
|
|
21
|
-
ritual: z.boolean().optional()
|
|
22
|
-
}).strict();
|
|
23
|
-
var inlineOptionSchema = z.lazy(() => z.object({
|
|
24
|
-
value: z.string().min(1),
|
|
25
|
-
label: z.string().min(1),
|
|
26
|
-
description: z.string().optional(),
|
|
27
|
-
effects: z.array(featureEffectSchema).optional(),
|
|
28
|
-
choices: z.array(choiceSchema).optional()
|
|
29
|
-
}).strict());
|
|
30
|
-
var choiceSchema = z.lazy(() => z.discriminatedUnion("kind", [
|
|
31
|
-
z.object({
|
|
32
|
-
kind: z.literal("select-inline"),
|
|
33
|
-
id: z.string().min(1),
|
|
34
|
-
label: z.string().optional(),
|
|
35
|
-
count: z.number().int().positive().optional(),
|
|
36
|
-
options: z.array(inlineOptionSchema).nonempty()
|
|
37
|
-
}).strict(),
|
|
38
|
-
z.object({
|
|
39
|
-
kind: z.literal("select-entity"),
|
|
40
|
-
id: z.string().min(1),
|
|
41
|
-
label: z.string().optional(),
|
|
42
|
-
count: z.number().int().positive().optional(),
|
|
43
|
-
entity_type: z.string().min(1),
|
|
44
|
-
from: z.array(z.string().min(1)).nonempty().optional(),
|
|
45
|
-
where: entityFilterSchema.optional(),
|
|
46
|
-
// D2b-A: a pick that names a target (a blast's cantrip), never a grant.
|
|
47
|
-
target: z.literal(true).optional()
|
|
48
|
-
}).strict(),
|
|
49
|
-
z.object({
|
|
50
|
-
kind: z.literal("select-proficiency"),
|
|
51
|
-
id: z.string().min(1),
|
|
52
|
-
label: z.string().optional(),
|
|
53
|
-
count: z.number().int().positive(),
|
|
54
|
-
domain: z.enum(["skill", "tool", "language", "save"]),
|
|
55
|
-
from: z.array(z.string().min(1)).nonempty().optional(),
|
|
56
|
-
from_proficient: z.boolean().optional(),
|
|
57
|
-
expertise: z.boolean().optional()
|
|
58
|
-
}).strict(),
|
|
59
|
-
z.object({
|
|
60
|
-
kind: z.literal("ability-points"),
|
|
61
|
-
id: z.string().min(1),
|
|
62
|
-
label: z.string().optional(),
|
|
63
|
-
points: z.number().int().positive(),
|
|
64
|
-
max_per: z.number().int().positive(),
|
|
65
|
-
pool: z.array(abilityEnum).nonempty().optional()
|
|
66
|
-
}).strict()
|
|
67
|
-
]));
|
|
68
|
-
|
|
69
|
-
export {
|
|
70
|
-
choiceSchema
|
|
71
|
-
};
|
package/dist/chunk-OOSRUJBI.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseSpell
|
|
3
|
-
} from "./chunk-7Q2VPKCD.js";
|
|
4
|
-
|
|
5
|
-
// src/spell/spell.codec.ts
|
|
6
|
-
import yaml from "js-yaml";
|
|
7
|
-
var spellCodec = {
|
|
8
|
-
parse(doc) {
|
|
9
|
-
return parseSpell(doc.body);
|
|
10
|
-
},
|
|
11
|
-
serialize(spell) {
|
|
12
|
-
const { material: _material, ...doc } = spell;
|
|
13
|
-
return yaml.dump(doc, { lineWidth: -1, sortKeys: false });
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
spellCodec
|
|
19
|
-
};
|
package/dist/chunk-PDJSUH24.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ABILITY_KEYS,
|
|
3
|
-
CR_PROFICIENCY,
|
|
4
|
-
CR_XP,
|
|
5
|
-
DAMAGE_TYPES,
|
|
6
|
-
SIZE_HIT_DICE
|
|
7
|
-
} from "./chunk-WELIKLZF.js";
|
|
8
|
-
|
|
9
|
-
// src/dnd/math.ts
|
|
10
|
-
function abilityModifier(score) {
|
|
11
|
-
return Math.floor((score - 10) / 2);
|
|
12
|
-
}
|
|
13
|
-
function formatModifier(mod) {
|
|
14
|
-
return mod >= 0 ? `+${mod}` : `${mod}`;
|
|
15
|
-
}
|
|
16
|
-
function proficiencyBonusFromCR(cr) {
|
|
17
|
-
var _a;
|
|
18
|
-
return (_a = CR_PROFICIENCY[cr]) != null ? _a : 2;
|
|
19
|
-
}
|
|
20
|
-
function proficiencyFromLevel(level) {
|
|
21
|
-
if (level < 5) return 2;
|
|
22
|
-
if (level < 9) return 3;
|
|
23
|
-
if (level < 13) return 4;
|
|
24
|
-
if (level < 17) return 5;
|
|
25
|
-
return 6;
|
|
26
|
-
}
|
|
27
|
-
function crToXP(cr) {
|
|
28
|
-
var _a;
|
|
29
|
-
return (_a = CR_XP[cr]) != null ? _a : 0;
|
|
30
|
-
}
|
|
31
|
-
function hitDiceSizeFromCreatureSize(size) {
|
|
32
|
-
var _a;
|
|
33
|
-
return (_a = SIZE_HIT_DICE[size.toLowerCase()]) != null ? _a : 8;
|
|
34
|
-
}
|
|
35
|
-
function hpFromHitDice(hitDiceCount, hitDiceSize, conMod) {
|
|
36
|
-
const avg = Math.floor(hitDiceCount * (hitDiceSize + 1) / 2 + hitDiceCount * conMod);
|
|
37
|
-
return Math.max(1, avg);
|
|
38
|
-
}
|
|
39
|
-
function parseHitDiceFormula(formula) {
|
|
40
|
-
const match = formula.match(/^(\d+)d(\d+)/i);
|
|
41
|
-
if (!match) return null;
|
|
42
|
-
return { count: parseInt(match[1], 10), size: parseInt(match[2], 10) };
|
|
43
|
-
}
|
|
44
|
-
function savingThrow(abilityScore, isProficient, profBonus) {
|
|
45
|
-
return abilityModifier(abilityScore) + (isProficient ? profBonus : 0);
|
|
46
|
-
}
|
|
47
|
-
function skillBonus(abilityScore, proficiency, profBonus) {
|
|
48
|
-
const mod = abilityModifier(abilityScore);
|
|
49
|
-
if (proficiency === "expertise") return mod + profBonus * 2;
|
|
50
|
-
if (proficiency === "proficient") return mod + profBonus;
|
|
51
|
-
return mod;
|
|
52
|
-
}
|
|
53
|
-
function passive(abilityScore, proficiency, profBonus) {
|
|
54
|
-
return 10 + skillBonus(abilityScore, proficiency, profBonus);
|
|
55
|
-
}
|
|
56
|
-
function passivePerception(wisScore, perceptionProf, profBonus) {
|
|
57
|
-
return passive(wisScore, perceptionProf, profBonus);
|
|
58
|
-
}
|
|
59
|
-
function attackBonus(abilityScore, profBonus) {
|
|
60
|
-
return abilityModifier(abilityScore) + profBonus;
|
|
61
|
-
}
|
|
62
|
-
function saveDC(abilityScore, profBonus) {
|
|
63
|
-
return 8 + profBonus + abilityModifier(abilityScore);
|
|
64
|
-
}
|
|
65
|
-
function abilityNameToKey(name) {
|
|
66
|
-
const lower = name.toLowerCase();
|
|
67
|
-
if (ABILITY_KEYS.includes(lower)) {
|
|
68
|
-
return lower;
|
|
69
|
-
}
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
var CANONICAL_DAMAGE_TYPES = new Set(DAMAGE_TYPES.map((t) => t.toLowerCase()));
|
|
73
|
-
function isCanonicalDamageType(type) {
|
|
74
|
-
return CANONICAL_DAMAGE_TYPES.has(type.trim().toLowerCase());
|
|
75
|
-
}
|
|
76
|
-
var CHOSEN_DAMAGE_TYPE = "chosen";
|
|
77
|
-
var CHOSEN_DAMAGE_TYPE_NOTE = "damage type of your choice";
|
|
78
|
-
function isChosenDamageType(type) {
|
|
79
|
-
return type !== void 0 && type.trim().toLowerCase() === CHOSEN_DAMAGE_TYPE;
|
|
80
|
-
}
|
|
81
|
-
function isRenderableDamageText(text) {
|
|
82
|
-
var _a;
|
|
83
|
-
const m = /^(?:\d*d\d+(?:\s*[+-]\s*\d+)?|[+-]?\d+)(?:\s+(.*))?$/i.exec(text.trim());
|
|
84
|
-
if (!m) return false;
|
|
85
|
-
const type = ((_a = m[1]) != null ? _a : "").trim();
|
|
86
|
-
return type === "" || isCanonicalDamageType(type);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export {
|
|
90
|
-
abilityModifier,
|
|
91
|
-
formatModifier,
|
|
92
|
-
proficiencyBonusFromCR,
|
|
93
|
-
proficiencyFromLevel,
|
|
94
|
-
crToXP,
|
|
95
|
-
hitDiceSizeFromCreatureSize,
|
|
96
|
-
hpFromHitDice,
|
|
97
|
-
parseHitDiceFormula,
|
|
98
|
-
savingThrow,
|
|
99
|
-
skillBonus,
|
|
100
|
-
passive,
|
|
101
|
-
passivePerception,
|
|
102
|
-
attackBonus,
|
|
103
|
-
saveDC,
|
|
104
|
-
abilityNameToKey,
|
|
105
|
-
isCanonicalDamageType,
|
|
106
|
-
CHOSEN_DAMAGE_TYPE,
|
|
107
|
-
CHOSEN_DAMAGE_TYPE_NOTE,
|
|
108
|
-
isChosenDamageType,
|
|
109
|
-
isRenderableDamageText
|
|
110
|
-
};
|
package/dist/chunk-PTXBIDG7.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// src/monster/monster.ai-schema.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
var abilitiesSchema = z.object({
|
|
4
|
-
str: z.number().min(1).max(30),
|
|
5
|
-
dex: z.number().min(1).max(30),
|
|
6
|
-
con: z.number().min(1).max(30),
|
|
7
|
-
int: z.number().min(1).max(30),
|
|
8
|
-
wis: z.number().min(1).max(30),
|
|
9
|
-
cha: z.number().min(1).max(30)
|
|
10
|
-
});
|
|
11
|
-
var acSchema = z.object({
|
|
12
|
-
ac: z.number(),
|
|
13
|
-
from: z.array(z.string()).optional(),
|
|
14
|
-
condition: z.string().optional()
|
|
15
|
-
});
|
|
16
|
-
var hpSchema = z.object({
|
|
17
|
-
average: z.number(),
|
|
18
|
-
formula: z.string()
|
|
19
|
-
});
|
|
20
|
-
var speedSchema = z.object({
|
|
21
|
-
walk: z.number().optional(),
|
|
22
|
-
fly: z.number().optional(),
|
|
23
|
-
swim: z.number().optional(),
|
|
24
|
-
climb: z.number().optional(),
|
|
25
|
-
burrow: z.number().optional()
|
|
26
|
-
});
|
|
27
|
-
var featureSchema = z.object({
|
|
28
|
-
name: z.string(),
|
|
29
|
-
entries: z.array(z.string().describe(
|
|
30
|
-
"Inline tag forms: `atk:ABILITY` for non-proficient attacks (ability mod alone), `atk:ABILITY+PB` for proficient attacks (ability mod + proficiency), `atk:+N` for literal attack bonuses, `dmg:DICE+ABILITY` for damage rolls (PB never added to damage), `dc:ABILITY` for save DCs (proficiency always included implicitly)."
|
|
31
|
-
))
|
|
32
|
-
});
|
|
33
|
-
var monsterInputSchema = z.object({
|
|
34
|
-
name: z.string().describe("Monster name"),
|
|
35
|
-
size: z.enum(["Tiny", "Small", "Medium", "Large", "Huge", "Gargantuan"]),
|
|
36
|
-
type: z.string().describe("Creature type (e.g., aberration, beast, dragon)"),
|
|
37
|
-
subtype: z.string().optional(),
|
|
38
|
-
alignment: z.string(),
|
|
39
|
-
cr: z.string().describe('Challenge rating (e.g., "0", "1/8", "1/4", "1/2", "1" through "30")'),
|
|
40
|
-
abilities: abilitiesSchema,
|
|
41
|
-
ac: z.array(acSchema),
|
|
42
|
-
hp: hpSchema,
|
|
43
|
-
speed: speedSchema,
|
|
44
|
-
saves: z.record(z.string(), z.number()).optional(),
|
|
45
|
-
skills: z.record(z.string(), z.number()).optional(),
|
|
46
|
-
damage_vulnerabilities: z.array(z.string()).optional(),
|
|
47
|
-
damage_resistances: z.array(z.string()).optional(),
|
|
48
|
-
damage_immunities: z.array(z.string()).optional(),
|
|
49
|
-
condition_immunities: z.array(z.string()).optional(),
|
|
50
|
-
senses: z.array(z.string()).optional(),
|
|
51
|
-
passive_perception: z.number().optional(),
|
|
52
|
-
languages: z.array(z.string()).optional(),
|
|
53
|
-
traits: z.array(featureSchema).optional(),
|
|
54
|
-
actions: z.array(featureSchema).optional(),
|
|
55
|
-
reactions: z.array(featureSchema).optional(),
|
|
56
|
-
legendary_actions: z.array(featureSchema).optional(),
|
|
57
|
-
legendary_action_uses: z.number().optional(),
|
|
58
|
-
legendary_resistance: z.number().optional()
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export {
|
|
62
|
-
monsterInputSchema
|
|
63
|
-
};
|
package/dist/chunk-PVCEA4HZ.js
DELETED
package/dist/chunk-QA3YCOML.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ALL_TOOLS,
|
|
3
|
-
ARTISANS_TOOLS,
|
|
4
|
-
GAMING_SETS,
|
|
5
|
-
MUSICAL_INSTRUMENTS
|
|
6
|
-
} from "./chunk-KU3YLF6D.js";
|
|
7
|
-
import {
|
|
8
|
-
toProfSlug
|
|
9
|
-
} from "./chunk-5JXFJ5AU.js";
|
|
10
|
-
|
|
11
|
-
// src/pc/pc.tool-picks.ts
|
|
12
|
-
var TOOL_CATEGORIES = {
|
|
13
|
-
"musical-instrument": { pool: MUSICAL_INSTRUMENTS, itemType: "instrument", label: "a musical instrument" },
|
|
14
|
-
"artisan's-tools": { pool: ARTISANS_TOOLS, itemType: "artisan's tools", label: "artisan's tools" },
|
|
15
|
-
"gaming-set": { pool: GAMING_SETS, itemType: "gaming set", label: "a gaming set" }
|
|
16
|
-
};
|
|
17
|
-
function categoryWords(token) {
|
|
18
|
-
return token.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase().replace(/['’ʼ]/g, "").split(/[\s_-]+/).filter(Boolean).map((w) => w.length > 3 && w.endsWith("s") && !w.endsWith("ss") ? w.slice(0, -1) : w);
|
|
19
|
-
}
|
|
20
|
-
var CATEGORY_BY_WORDS = /* @__PURE__ */ new Map([
|
|
21
|
-
["musical instrument", "musical-instrument"],
|
|
22
|
-
["artisan tool", "artisan's-tools"],
|
|
23
|
-
["gaming set", "gaming-set"]
|
|
24
|
-
]);
|
|
25
|
-
function toolCategoriesOf(token) {
|
|
26
|
-
const parts = [[]];
|
|
27
|
-
for (const w of categoryWords(token)) {
|
|
28
|
-
if (w === "or") parts.push([]);
|
|
29
|
-
else parts[parts.length - 1].push(w);
|
|
30
|
-
}
|
|
31
|
-
const out = [];
|
|
32
|
-
for (const p of parts) {
|
|
33
|
-
const c = CATEGORY_BY_WORDS.get(p.filter((w) => w !== "any" && w !== "one").join(" "));
|
|
34
|
-
if (!c) return void 0;
|
|
35
|
-
if (!out.includes(c)) out.push(c);
|
|
36
|
-
}
|
|
37
|
-
return out;
|
|
38
|
-
}
|
|
39
|
-
function expandToolPool(from) {
|
|
40
|
-
const out = [];
|
|
41
|
-
const seen = /* @__PURE__ */ new Set();
|
|
42
|
-
const add = (v) => {
|
|
43
|
-
const k = toProfSlug(v);
|
|
44
|
-
if (seen.has(k)) return;
|
|
45
|
-
seen.add(k);
|
|
46
|
-
out.push(v);
|
|
47
|
-
};
|
|
48
|
-
for (const v of from) {
|
|
49
|
-
const cats = toolCategoriesOf(v);
|
|
50
|
-
if (cats) for (const c of cats) for (const t of TOOL_CATEGORIES[c].pool) add(t);
|
|
51
|
-
else add(v);
|
|
52
|
-
}
|
|
53
|
-
return out;
|
|
54
|
-
}
|
|
55
|
-
var EMPTY = { decisions: [], grants: [] };
|
|
56
|
-
var poolOf = (from) => Array.isArray(from) ? from.filter((v) => typeof v === "string" && v.length > 0) : typeof from === "string" && from.length > 0 ? [from] : [];
|
|
57
|
-
var countOf = (count) => {
|
|
58
|
-
const n = Number(count != null ? count : 1);
|
|
59
|
-
return Number.isFinite(n) && n > 0 ? Math.floor(n) : 1;
|
|
60
|
-
};
|
|
61
|
-
var KNOWN_TOOLS = new Set(ALL_TOOLS.map(toProfSlug));
|
|
62
|
-
var namesToolsOutright = (from) => from.every((v) => !toolCategoriesOf(v) && KNOWN_TOOLS.has(toProfSlug(v)));
|
|
63
|
-
var authorsToolPick = (choices) => Array.isArray(choices) && choices.some((c) => !!c && typeof c === "object" && c.kind === "select-proficiency" && c.domain === "tool");
|
|
64
|
-
function toolPick(count, from, id, allowDecision) {
|
|
65
|
-
const authored = poolOf(from);
|
|
66
|
-
const pool = expandToolPool(authored);
|
|
67
|
-
const n = countOf(count);
|
|
68
|
-
if (pool.length === 0) return EMPTY;
|
|
69
|
-
if (n >= pool.length && namesToolsOutright(authored)) return { decisions: [], grants: pool };
|
|
70
|
-
if (!allowDecision) return EMPTY;
|
|
71
|
-
return { decisions: [{ kind: "select-proficiency", id, count: n, domain: "tool", from: pool }], grants: [] };
|
|
72
|
-
}
|
|
73
|
-
function classToolPicks(entity) {
|
|
74
|
-
var _a;
|
|
75
|
-
const tools = (_a = entity == null ? void 0 : entity.proficiencies) == null ? void 0 : _a.tools;
|
|
76
|
-
const choice = tools == null ? void 0 : tools.choice;
|
|
77
|
-
if (!choice || typeof choice !== "object") return EMPTY;
|
|
78
|
-
return toolPick(choice.count, choice.from, "tool", !authorsToolPick(entity == null ? void 0 : entity.choices));
|
|
79
|
-
}
|
|
80
|
-
function backgroundToolPicks(bg) {
|
|
81
|
-
const entries = Array.isArray(bg == null ? void 0 : bg.tool_proficiencies) ? bg.tool_proficiencies : [];
|
|
82
|
-
const allowDecision = !authorsToolPick(bg == null ? void 0 : bg.choices);
|
|
83
|
-
const out = { decisions: [], grants: [] };
|
|
84
|
-
for (const e of entries) {
|
|
85
|
-
if (!e || typeof e !== "object" || e.kind !== "choice") continue;
|
|
86
|
-
const id = out.decisions.length === 0 ? "tool" : `tool-${out.decisions.length + 1}`;
|
|
87
|
-
const r = toolPick(e.count, e.from, id, allowDecision);
|
|
88
|
-
out.decisions.push(...r.decisions);
|
|
89
|
-
out.grants.push(...r.grants);
|
|
90
|
-
}
|
|
91
|
-
return out;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export {
|
|
95
|
-
TOOL_CATEGORIES,
|
|
96
|
-
categoryWords,
|
|
97
|
-
toolCategoriesOf,
|
|
98
|
-
expandToolPool,
|
|
99
|
-
classToolPicks,
|
|
100
|
-
backgroundToolPicks
|
|
101
|
-
};
|
package/dist/chunk-QFWQKS3M.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
startingEquipmentEntrySchema
|
|
3
|
-
} from "./chunk-IN4M4X7P.js";
|
|
4
|
-
import {
|
|
5
|
-
choiceSchema
|
|
6
|
-
} from "./chunk-OOL4KMG2.js";
|
|
7
|
-
import {
|
|
8
|
-
additionalSpellsEntrySchema,
|
|
9
|
-
imageField
|
|
10
|
-
} from "./chunk-UA5KS2PL.js";
|
|
11
|
-
|
|
12
|
-
// src/background/background.schema.ts
|
|
13
|
-
import { z } from "zod";
|
|
14
|
-
var abilityEnum = z.enum(["str", "dex", "con", "int", "wis", "cha"]);
|
|
15
|
-
var editionEnum = z.enum(["2014", "2024"]);
|
|
16
|
-
var skillEnum = z.enum([
|
|
17
|
-
"acrobatics",
|
|
18
|
-
"animal-handling",
|
|
19
|
-
"arcana",
|
|
20
|
-
"athletics",
|
|
21
|
-
"deception",
|
|
22
|
-
"history",
|
|
23
|
-
"insight",
|
|
24
|
-
"intimidation",
|
|
25
|
-
"investigation",
|
|
26
|
-
"medicine",
|
|
27
|
-
"nature",
|
|
28
|
-
"perception",
|
|
29
|
-
"performance",
|
|
30
|
-
"persuasion",
|
|
31
|
-
"religion",
|
|
32
|
-
"sleight-of-hand",
|
|
33
|
-
"stealth",
|
|
34
|
-
"survival"
|
|
35
|
-
]);
|
|
36
|
-
var wikilinkRegex = /^\[\[[^[\]]+\]\]$/;
|
|
37
|
-
var toolProfSchema = z.discriminatedUnion("kind", [
|
|
38
|
-
z.object({ kind: z.literal("fixed"), items: z.array(z.string()).nonempty() }),
|
|
39
|
-
z.object({
|
|
40
|
-
kind: z.literal("choice"),
|
|
41
|
-
count: z.number().int().positive(),
|
|
42
|
-
from: z.array(z.string()).nonempty()
|
|
43
|
-
})
|
|
44
|
-
]);
|
|
45
|
-
var langProfSchema = z.discriminatedUnion("kind", [
|
|
46
|
-
z.object({ kind: z.literal("fixed"), languages: z.array(z.string()).nonempty() }),
|
|
47
|
-
z.object({
|
|
48
|
-
kind: z.literal("choice"),
|
|
49
|
-
count: z.number().int().positive(),
|
|
50
|
-
from: z.union([z.string(), z.array(z.string())])
|
|
51
|
-
})
|
|
52
|
-
]);
|
|
53
|
-
var suggestedCharSchema = z.object({
|
|
54
|
-
personality_traits: z.record(z.string(), z.string()).optional(),
|
|
55
|
-
ideals: z.record(z.string(), z.object({
|
|
56
|
-
name: z.string().optional(),
|
|
57
|
-
desc: z.string(),
|
|
58
|
-
alignment: z.string().optional()
|
|
59
|
-
})).optional(),
|
|
60
|
-
bonds: z.record(z.string(), z.string()).optional(),
|
|
61
|
-
flaws: z.record(z.string(), z.string()).optional()
|
|
62
|
-
});
|
|
63
|
-
var backgroundEntitySchema = z.object({
|
|
64
|
-
slug: z.string().min(1),
|
|
65
|
-
name: z.string().min(1),
|
|
66
|
-
edition: editionEnum,
|
|
67
|
-
source: z.string().min(1),
|
|
68
|
-
description: z.string(),
|
|
69
|
-
skill_proficiencies: z.array(skillEnum),
|
|
70
|
-
tool_proficiencies: z.array(toolProfSchema),
|
|
71
|
-
language_proficiencies: z.array(langProfSchema),
|
|
72
|
-
equipment: z.array(startingEquipmentEntrySchema),
|
|
73
|
-
feature: z.object({
|
|
74
|
-
name: z.string().min(1),
|
|
75
|
-
description: z.string().min(1)
|
|
76
|
-
}),
|
|
77
|
-
ability_score_increases: z.object({
|
|
78
|
-
pool: z.array(abilityEnum).length(3)
|
|
79
|
-
}).nullable(),
|
|
80
|
-
origin_feat: z.string().regex(wikilinkRegex).nullable(),
|
|
81
|
-
suggested_characteristics: suggestedCharSchema.nullable(),
|
|
82
|
-
choices: z.array(choiceSchema).optional(),
|
|
83
|
-
rendering_hint: z.string().optional(),
|
|
84
|
-
// 175
|
|
85
|
-
has_fluff_images: z.boolean().optional(),
|
|
86
|
-
// 87
|
|
87
|
-
tables: z.array(z.object({
|
|
88
|
-
// 88 tables / 67 docs; key-sets EXACT (finding 6)
|
|
89
|
-
name: z.string().min(1),
|
|
90
|
-
dice: z.string().min(1),
|
|
91
|
-
rows: z.array(z.object({ roll: z.string(), text: z.string() }))
|
|
92
|
-
})).optional(),
|
|
93
|
-
additional_spells: z.array(additionalSpellsEntrySchema).optional(),
|
|
94
|
-
// 15
|
|
95
|
-
prerequisites: z.array(z.object({
|
|
96
|
-
// 4 docs; kind CLOSED AT THE EMITTER
|
|
97
|
-
kind: z.literal("campaign"),
|
|
98
|
-
slug: z.string().min(1)
|
|
99
|
-
// (background-mapper.ts pushes
|
|
100
|
-
})).optional(),
|
|
101
|
-
// {kind:"campaign", slug} literally — finding 24)
|
|
102
|
-
// The one-arm union STAYS (§2.6 adjudication): it is closed by CONSTRUCTION at the converter's
|
|
103
|
-
// only push site, and a future kind turns into a visible census REFUSAL — the correct loud failure.
|
|
104
|
-
image: imageField
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
export {
|
|
108
|
-
langProfSchema,
|
|
109
|
-
backgroundEntitySchema
|
|
110
|
-
};
|
package/dist/chunk-QS5L5YTJ.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// src/item/item.ai-schema.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
var itemInputSchema = z.object({
|
|
4
|
-
name: z.string().describe("Item name"),
|
|
5
|
-
type: z.enum(["weapon", "armor", "potion", "ring", "rod", "scroll", "staff", "wand", "wondrous item", "shield"]),
|
|
6
|
-
rarity: z.enum(["common", "uncommon", "rare", "very rare", "legendary", "artifact"]),
|
|
7
|
-
entries: z.array(z.string()).optional().describe(
|
|
8
|
-
"Item description and properties. Use inline formula tags for attack rolls, damage, and save DCs: `atk:ABILITY` for attack bonus, `damage:DICE+ABILITY` for damage (e.g. `damage:2d6`), `dc:ABILITY` for save DCs. Valid abilities: STR, DEX, CON, INT, WIS, CHA."
|
|
9
|
-
),
|
|
10
|
-
weight: z.number().optional(),
|
|
11
|
-
value: z.number().optional(),
|
|
12
|
-
attunement: z.union([z.boolean(), z.string()]).optional(),
|
|
13
|
-
properties: z.array(z.string()).optional(),
|
|
14
|
-
damage: z.string().optional(),
|
|
15
|
-
damage_type: z.string().optional(),
|
|
16
|
-
ac: z.number().optional(),
|
|
17
|
-
charges: z.number().optional(),
|
|
18
|
-
recharge: z.string().optional(),
|
|
19
|
-
curse: z.boolean().optional()
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
itemInputSchema
|
|
24
|
-
};
|
package/dist/chunk-QYZV2MQA.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
// src/dnd/tag-grammar.ts
|
|
2
|
-
var TAG_TYPE_ALIASES = {
|
|
3
|
-
atk: "atk",
|
|
4
|
-
attack: "atk",
|
|
5
|
-
dmg: "dmg",
|
|
6
|
-
damage: "dmg",
|
|
7
|
-
dc: "dc",
|
|
8
|
-
dice: "dice"
|
|
9
|
-
};
|
|
10
|
-
function normalizeTagType(input) {
|
|
11
|
-
var _a;
|
|
12
|
-
const lower = input.toLowerCase().trim();
|
|
13
|
-
return (_a = TAG_TYPE_ALIASES[lower]) != null ? _a : null;
|
|
14
|
-
}
|
|
15
|
-
var ABILITY_RE = /^(str|dex|con|int|wis|cha)$/i;
|
|
16
|
-
var PB_RE = /^pb$/i;
|
|
17
|
-
var DICE_RE = /^(\d+)d(\d+)$/;
|
|
18
|
-
var LITERAL_RE = /^([+-]?\d+)$/;
|
|
19
|
-
var SLUG_RE = /^\[\[([^[\]]+)\]\]$/;
|
|
20
|
-
function parseTagTerms(content) {
|
|
21
|
-
const out = {
|
|
22
|
-
pbTerm: false,
|
|
23
|
-
literalTerms: [],
|
|
24
|
-
diceTerms: [],
|
|
25
|
-
slugTerms: []
|
|
26
|
-
};
|
|
27
|
-
const trimmed = content.trim();
|
|
28
|
-
if (trimmed.length === 0) return { error: "empty content" };
|
|
29
|
-
const tokens = [];
|
|
30
|
-
let i = 0;
|
|
31
|
-
const advancePastTerm = (start) => {
|
|
32
|
-
let j = start;
|
|
33
|
-
while (j < trimmed.length && trimmed[j] !== "+" && trimmed[j] !== "-") {
|
|
34
|
-
if (trimmed[j] === "[" && trimmed[j + 1] === "[") {
|
|
35
|
-
const close = trimmed.indexOf("]]", j + 2);
|
|
36
|
-
if (close === -1) return trimmed.length;
|
|
37
|
-
j = close + 2;
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
j++;
|
|
41
|
-
}
|
|
42
|
-
return j;
|
|
43
|
-
};
|
|
44
|
-
while (i < trimmed.length) {
|
|
45
|
-
if (trimmed[i] === "+" || trimmed[i] === "-") {
|
|
46
|
-
const j = advancePastTerm(i + 1);
|
|
47
|
-
tokens.push(trimmed.slice(i, j));
|
|
48
|
-
i = j;
|
|
49
|
-
} else {
|
|
50
|
-
const j = advancePastTerm(i);
|
|
51
|
-
tokens.push(trimmed.slice(i, j));
|
|
52
|
-
i = j;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
for (let raw of tokens) {
|
|
56
|
-
raw = raw.trim();
|
|
57
|
-
if (raw.length === 0) return { error: "empty term" };
|
|
58
|
-
let signed = raw;
|
|
59
|
-
let body = raw;
|
|
60
|
-
if (raw[0] === "+" || raw[0] === "-") {
|
|
61
|
-
body = raw.slice(1).trim();
|
|
62
|
-
} else {
|
|
63
|
-
signed = "+" + raw;
|
|
64
|
-
}
|
|
65
|
-
if (DICE_RE.test(body)) {
|
|
66
|
-
const m = body.match(DICE_RE);
|
|
67
|
-
out.diceTerms.push({ count: Number.parseInt(m[1], 10), sides: Number.parseInt(m[2], 10) });
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
|
-
if (ABILITY_RE.test(body)) {
|
|
71
|
-
if (out.abilityTerm) return { error: `multiple ability terms (${out.abilityTerm}, ${body.toLowerCase()})` };
|
|
72
|
-
out.abilityTerm = body.toLowerCase();
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
if (PB_RE.test(body)) {
|
|
76
|
-
if (out.pbTerm) return { error: "duplicate PB term" };
|
|
77
|
-
out.pbTerm = true;
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
const slugMatch = body.match(SLUG_RE);
|
|
81
|
-
if (slugMatch) {
|
|
82
|
-
out.slugTerms.push(slugMatch[1]);
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
if (LITERAL_RE.test(signed)) {
|
|
86
|
-
out.literalTerms.push(Number.parseInt(signed, 10));
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
return { error: `unrecognized term: ${raw}` };
|
|
90
|
-
}
|
|
91
|
-
return out;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export {
|
|
95
|
-
normalizeTagType,
|
|
96
|
-
parseTagTerms
|
|
97
|
-
};
|