@archivist-gg/dnd5e 0.3.19 → 0.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +48 -21
- package/README.md +26 -48
- package/dist/armor/armor.codec.d.ts +0 -7
- package/dist/armor/armor.codec.js +1 -9
- package/dist/armor/armor.parser.js +1 -8
- package/dist/armor/armor.schema.js +1 -7
- package/dist/armor/armor.types.d.ts +0 -3
- package/dist/background/background.codec.d.ts +0 -6
- package/dist/background/background.codec.js +1 -12
- package/dist/background/background.parser.js +1 -11
- package/dist/background/background.schema.js +1 -12
- package/dist/background/background.types.d.ts +0 -5
- package/dist/chunk-2EOGK6R6.js +1 -0
- package/dist/chunk-2HRRH3WL.js +1 -0
- package/dist/chunk-2LCGKNVM.js +1 -0
- package/dist/chunk-2NUDWOFG.js +1 -0
- package/dist/chunk-334WLI7V.js +1 -0
- package/dist/chunk-3LWOVRLA.js +1 -0
- package/dist/chunk-3QQOATV3.js +1 -0
- package/dist/chunk-4E2GIWJE.js +1 -0
- package/dist/chunk-4GN3GYMP.js +1 -0
- package/dist/chunk-4IAMSRHD.js +1 -0
- package/dist/chunk-4JEF3CET.js +1 -0
- package/dist/chunk-4KVVAENP.js +1 -0
- package/dist/chunk-56JK6VCL.js +1 -0
- package/dist/chunk-5FEXHY4U.js +1 -0
- package/dist/chunk-63YJPWTM.js +1 -0
- package/dist/chunk-6ASJ3MVB.js +1 -0
- package/dist/chunk-6IC53O3Q.js +1 -0
- package/dist/chunk-6LCNV26D.js +1 -0
- package/dist/chunk-6W253VHH.js +1 -0
- package/dist/chunk-7AKJBRBD.js +1 -0
- package/dist/chunk-7EL3GWWJ.js +1 -0
- package/dist/chunk-7FPQJDFD.js +1 -0
- package/dist/chunk-7J5BNH2D.js +1 -0
- package/dist/chunk-7LPKI27J.js +1 -0
- package/dist/chunk-7UPYRKMF.js +1 -0
- package/dist/chunk-A7H6LX47.js +1 -0
- package/dist/chunk-AINRPPLH.js +1 -0
- package/dist/chunk-BC52J4LA.js +1 -0
- package/dist/chunk-BCXGB4HP.js +1 -0
- package/dist/chunk-BGX36NPE.js +1 -0
- package/dist/chunk-BPKG6RZ7.js +1 -0
- package/dist/chunk-BREHZNTL.js +1 -0
- package/dist/chunk-BZ6BGGZS.js +1 -0
- package/dist/chunk-CAPYNIGK.js +1 -0
- package/dist/chunk-CCFIINBA.js +1 -0
- package/dist/chunk-CMIEZQL4.js +1 -0
- package/dist/chunk-DVUXUIPV.js +1 -0
- package/dist/chunk-DY6FVAGA.js +1 -0
- package/dist/chunk-DZITM5AG.js +1 -0
- package/dist/chunk-DZKSXSJF.js +1 -0
- package/dist/chunk-EAARMPCW.js +1 -0
- package/dist/chunk-EVT7MGAC.js +1 -0
- package/dist/chunk-FOLHTMSC.js +1 -0
- package/dist/chunk-GCYUCIDN.js +1 -0
- package/dist/chunk-GIOV6JW7.js +1 -0
- package/dist/chunk-HCK6IUB3.js +1 -0
- package/dist/chunk-HR5MKCP2.js +1 -0
- package/dist/chunk-I26FHSI6.js +1 -0
- package/dist/chunk-I4O2FIDT.js +1 -0
- package/dist/chunk-IGVRLGLM.js +1 -0
- package/dist/chunk-IHPLT2ZT.js +1 -0
- package/dist/chunk-IOCJIWCV.js +1 -0
- package/dist/chunk-JXDX2DKF.js +1 -0
- package/dist/chunk-KBFSJ5WE.js +1 -0
- package/dist/chunk-KM75CC6Q.js +1 -0
- package/dist/chunk-KZDDFG4O.js +1 -0
- package/dist/chunk-LJNT3PJP.js +1 -0
- package/dist/chunk-LR6UMA5V.js +1 -0
- package/dist/chunk-M6RPOLKS.js +1 -0
- package/dist/chunk-MC6PLWRZ.js +1 -0
- package/dist/chunk-MGGKZGLG.js +1 -0
- package/dist/chunk-N3RYJ7RE.js +1 -0
- package/dist/chunk-NEMX7QGG.js +1 -0
- package/dist/chunk-NI364WV7.js +1 -0
- package/dist/chunk-O2QZ73GA.js +1 -0
- package/dist/chunk-O776WL7O.js +1 -0
- package/dist/chunk-OTFNINUY.js +1 -0
- package/dist/chunk-PQAVMK3T.js +1 -0
- package/dist/chunk-PZ3ZZ5H5.js +1 -0
- package/dist/chunk-PZ4L2EEG.js +1 -0
- package/dist/chunk-PZUPZBTN.js +1 -0
- package/dist/chunk-QBA757AU.js +1 -0
- package/dist/chunk-QFIGPOFW.js +1 -0
- package/dist/chunk-QMEKQTUT.js +1 -0
- package/dist/chunk-QVWT67WA.js +1 -0
- package/dist/chunk-RDXQAZBA.js +1 -0
- package/dist/chunk-RE5Z5RNK.js +1 -0
- package/dist/chunk-RL4VY2AL.js +1 -0
- package/dist/chunk-RQGTBHJW.js +1 -0
- package/dist/chunk-RQZCGXUZ.js +1 -0
- package/dist/chunk-S5UCI27C.js +1 -0
- package/dist/chunk-SEOASDO4.js +1 -0
- package/dist/chunk-SU4MEZ5P.js +1 -0
- package/dist/chunk-T55DELVL.js +1 -0
- package/dist/chunk-TKIEPC6F.js +1 -0
- package/dist/chunk-TLXFGGWH.js +1 -0
- package/dist/chunk-UBUKCRZ3.js +1 -0
- package/dist/chunk-V6NQ547U.js +1 -0
- package/dist/chunk-VA3ZWV7C.js +1 -0
- package/dist/chunk-VIP3FH2O.js +1 -0
- package/dist/chunk-VTQ4RWEG.js +1 -0
- package/dist/chunk-WUHTSLG4.js +1 -0
- package/dist/chunk-X22SISGM.js +1 -0
- package/dist/chunk-XKJXT2PN.js +1 -0
- package/dist/chunk-XQMKH4R4.js +1 -0
- package/dist/chunk-YGH7S5ZF.js +1 -0
- package/dist/chunk-ZE46ADXS.js +1 -0
- package/dist/chunk-ZI3FEUX3.js +1 -0
- package/dist/class/class.codec.d.ts +0 -7
- package/dist/class/class.codec.js +1 -18
- package/dist/class/class.parser.js +1 -17
- package/dist/class/class.schema.d.ts +2 -1
- package/dist/class/class.schema.js +1 -15
- package/dist/class/class.slug.d.ts +0 -11
- package/dist/class/class.slug.js +1 -8
- package/dist/class/class.standard-array.d.ts +0 -7
- package/dist/class/class.standard-array.js +1 -20
- package/dist/class/class.types.d.ts +0 -20
- package/dist/condition/condition.codec.d.ts +0 -6
- package/dist/condition/condition.parser.d.ts +0 -10
- package/dist/condition/condition.parser.js +1 -7
- package/dist/condition/condition.schema.d.ts +0 -16
- package/dist/condition/condition.types.d.ts +0 -3
- package/dist/data-srd/index.generated.js +1 -146
- package/dist/dnd/amount-text.d.ts +3 -30
- package/dist/dnd/amount-text.js +1 -15
- package/dist/dnd/constants.d.ts +0 -18
- package/dist/dnd/constants.js +1 -42
- package/dist/dnd/formula-tags.d.ts +0 -2
- package/dist/dnd/formula-tags.js +1 -119
- package/dist/dnd/math.d.ts +0 -26
- package/dist/dnd/math.js +1 -45
- package/dist/dnd/prose-tags.d.ts +1 -15
- package/dist/dnd/prose-tags.js +1 -18
- package/dist/dnd/resource-die.d.ts +0 -4
- package/dist/dnd/resource-die.js +1 -17
- package/dist/dnd/resource-formula.d.ts +0 -43
- package/dist/dnd/resource-formula.js +1 -14
- package/dist/dnd/resource-words.d.ts +0 -2
- package/dist/dnd/resource-words.js +1 -30
- package/dist/dnd/srd-tag-converter.d.ts +0 -21
- package/dist/dnd/srd-tag-converter.js +1 -12
- package/dist/dnd/tag-grammar.js +1 -12
- package/dist/dnd/warn-once.js +1 -8
- package/dist/encounter/encounter.ai-schema.js +1 -8
- package/dist/entities/base-item-resolver.d.ts +0 -26
- package/dist/entities/base-item-resolver.js +1 -11
- package/dist/entities/registry-revision.d.ts +0 -15
- package/dist/entities/registry-revision.js +1 -10
- package/dist/entities/slug.d.ts +1 -31
- package/dist/entities/slug.js +1 -12
- package/dist/entities/wikilink-display.d.ts +0 -2
- package/dist/entities/wikilink-display.js +1 -10
- package/dist/feat/feat.category-codes.d.ts +1 -26
- package/dist/feat/feat.category-codes.js +1 -14
- package/dist/feat/feat.codec.d.ts +0 -6
- package/dist/feat/feat.codec.js +1 -12
- package/dist/feat/feat.parser.js +1 -11
- package/dist/feat/feat.schema.d.ts +22 -1
- package/dist/feat/feat.schema.js +1 -10
- package/dist/feat/feat.types.d.ts +0 -6
- package/dist/index.js +45 -141495
- package/dist/inline-tag-parser.js +1 -6
- package/dist/item/item.actions-map.d.ts +4 -63
- package/dist/item/item.actions-map.js +1 -10
- package/dist/item/item.ai-schema.js +1 -6
- package/dist/item/item.attunement.d.ts +0 -14
- package/dist/item/item.attunement.js +1 -6
- package/dist/item/item.bonuses.js +1 -10
- package/dist/item/item.codec.js +1 -9
- package/dist/item/item.conditions.d.ts +0 -7
- package/dist/item/item.conditions.js +1 -11
- package/dist/item/item.conditions.types.d.ts +0 -2
- package/dist/item/item.cost.js +1 -29
- package/dist/item/item.enrichment.js +1 -9
- package/dist/item/item.icon.d.ts +0 -8
- package/dist/item/item.icon.js +1 -211
- package/dist/item/item.parser.js +1 -8
- package/dist/item/item.schema.d.ts +2 -0
- package/dist/item/item.schema.js +1 -11
- package/dist/item/item.types.d.ts +2 -28
- package/dist/monster/monster.ai-schema.js +1 -6
- package/dist/monster/monster.codec.d.ts +0 -10
- package/dist/monster/monster.enrichment.js +1 -19
- package/dist/monster/monster.format.d.ts +0 -69
- package/dist/monster/monster.format.js +1 -78
- package/dist/monster/monster.parser.d.ts +0 -4
- package/dist/monster/monster.parser.js +1 -15
- package/dist/monster/monster.resolve.d.ts +0 -4
- package/dist/monster/monster.schema.d.ts +0 -9
- package/dist/monster/monster.schema.js +1 -34
- package/dist/monster/monster.types.d.ts +0 -3
- package/dist/monster/monster.types.js +1 -1
- package/dist/optional-feature/optional-feature.codec.d.ts +0 -11
- package/dist/optional-feature/optional-feature.codec.js +1 -13
- package/dist/optional-feature/optional-feature.parser.js +1 -12
- package/dist/optional-feature/optional-feature.schema.d.ts +21 -1
- package/dist/optional-feature/optional-feature.schema.js +1 -15
- package/dist/pack.d.ts +0 -9
- package/dist/pc/conditions.constants.js +1 -6
- package/dist/pc/decision-recognizer.js +1 -8
- package/dist/pc/pc.additional-spells.d.ts +0 -24
- package/dist/pc/pc.additional-spells.js +1 -26
- package/dist/pc/pc.amount-bindings.d.ts +0 -25
- package/dist/pc/pc.amount-bindings.js +1 -28
- package/dist/pc/pc.asi-flatten.d.ts +0 -59
- package/dist/pc/pc.asi-flatten.js +1 -16
- package/dist/pc/pc.conditions.d.ts +1 -0
- package/dist/pc/pc.conditions.js +1 -6
- package/dist/pc/pc.containment.d.ts +0 -5
- package/dist/pc/pc.containment.js +1 -24
- package/dist/pc/pc.decision-engine.d.ts +0 -145
- package/dist/pc/pc.decision-engine.js +1 -55
- package/dist/pc/pc.defense-normalize.d.ts +0 -10
- package/dist/pc/pc.defense-normalize.js +1 -6
- package/dist/pc/pc.entry-overrides.d.ts +0 -58
- package/dist/pc/pc.entry-overrides.js +1 -41
- package/dist/pc/pc.equipment.d.ts +2 -22
- package/dist/pc/pc.equipment.js +1 -34
- package/dist/pc/pc.feature-effects.d.ts +22 -281
- package/dist/pc/pc.feature-effects.js +1 -39
- package/dist/pc/pc.formula-context.js +1 -11
- package/dist/pc/pc.infusions.d.ts +0 -65
- package/dist/pc/pc.infusions.js +1 -65
- package/dist/pc/pc.item-effects.d.ts +18 -0
- package/dist/pc/pc.member-choices.d.ts +3 -66
- package/dist/pc/pc.member-choices.js +1 -39
- package/dist/pc/pc.parser.js +1 -58
- package/dist/pc/pc.pools.d.ts +7 -10
- package/dist/pc/pc.pools.js +1 -27
- package/dist/pc/pc.proficiencies.d.ts +0 -40
- package/dist/pc/pc.proficiencies.js +1 -156
- package/dist/pc/pc.proficiency-grants.d.ts +0 -26
- package/dist/pc/pc.proficiency-normalize.d.ts +0 -35
- package/dist/pc/pc.proficiency-normalize.js +1 -18
- package/dist/pc/pc.proficiency-query.d.ts +0 -13
- package/dist/pc/pc.proficiency-query.js +1 -27
- package/dist/pc/pc.recalc.d.ts +7 -131
- package/dist/pc/pc.recalc.js +1 -1042
- package/dist/pc/pc.resolver.d.ts +0 -107
- package/dist/pc/pc.resolver.js +1 -60
- package/dist/pc/pc.resource-seed.d.ts +0 -8
- package/dist/pc/pc.resource-seed.js +1 -42
- package/dist/pc/pc.resources.d.ts +1 -59
- package/dist/pc/pc.resources.js +1 -23
- package/dist/pc/pc.rest.d.ts +1 -20
- package/dist/pc/pc.rest.js +1 -231
- package/dist/pc/pc.schema.d.ts +0 -2
- package/dist/pc/pc.schema.js +1 -9
- package/dist/pc/pc.slotting.d.ts +0 -29
- package/dist/pc/pc.slotting.js +1 -28
- package/dist/pc/pc.speeds.d.ts +19 -0
- package/dist/pc/pc.spell-scope.d.ts +0 -16
- package/dist/pc/pc.spellcasting.d.ts +0 -70
- package/dist/pc/pc.spellcasting.js +1 -28
- package/dist/pc/pc.table-column.d.ts +0 -22
- package/dist/pc/pc.table-column.js +1 -18
- package/dist/pc/pc.tool-picks.d.ts +0 -27
- package/dist/pc/pc.tool-picks.js +1 -18
- package/dist/pc/pc.types.d.ts +54 -374
- package/dist/pc/pc.weapon-grant.d.ts +0 -6
- package/dist/pc/pool-layout.d.ts +0 -39
- package/dist/pc/pool-layout.js +1 -18
- package/dist/pc/resource-equivalents.d.ts +2 -40
- package/dist/pc/roll-scope.js +1 -8
- package/dist/pc/roll-tag-labels.d.ts +0 -32
- package/dist/pc/roll-tag-labels.js +1 -17
- package/dist/pc/spell-source.d.ts +0 -11
- package/dist/pc/spell-source.js +1 -8
- package/dist/race/race.codec.d.ts +0 -6
- package/dist/race/race.codec.js +1 -15
- package/dist/race/race.parser.js +1 -14
- package/dist/race/race.schema.d.ts +0 -8
- package/dist/race/race.schema.js +1 -14
- package/dist/race/race.structural.d.ts +0 -6
- package/dist/race/race.structural.js +1 -6
- package/dist/race/race.types.d.ts +0 -8
- package/dist/schemas/attack-schema.d.ts +5 -0
- package/dist/schemas/caster-type-schema.d.ts +1 -6
- package/dist/schemas/caster-type-schema.js +1 -6
- package/dist/schemas/choice-schema.js +1 -7
- package/dist/schemas/duration-schema.d.ts +0 -2
- package/dist/schemas/duration-schema.js +1 -6
- package/dist/schemas/entity-extras-schema.d.ts +0 -30
- package/dist/schemas/entity-extras-schema.js +1 -10
- package/dist/schemas/equipment-grant-schema.d.ts +0 -2
- package/dist/schemas/equipment-grant-schema.js +1 -12
- package/dist/schemas/feature-alias.d.ts +0 -27
- package/dist/schemas/feature-effect-schema.d.ts +21 -1
- package/dist/schemas/feature-effect-schema.js +1 -6
- package/dist/schemas/feature-schema.d.ts +0 -6
- package/dist/schemas/feature-schema.js +1 -12
- package/dist/schemas/resource-schema.d.ts +1 -34
- package/dist/schemas/resource-schema.js +1 -12
- package/dist/schemas/selection-pool-schema.js +1 -10
- package/dist/spell/casting-time.d.ts +0 -15
- package/dist/spell/casting-time.js +1 -6
- package/dist/spell/spell.access.d.ts +0 -6
- package/dist/spell/spell.access.js +1 -45
- package/dist/spell/spell.ai-schema.js +1 -6
- package/dist/spell/spell.codec.js +1 -9
- package/dist/spell/spell.enrichment.js +1 -9
- package/dist/spell/spell.filter.d.ts +0 -5
- package/dist/spell/spell.filter.js +1 -75
- package/dist/spell/spell.parser.d.ts +0 -31
- package/dist/spell/spell.parser.js +1 -16
- package/dist/spell/spell.scaling.d.ts +0 -46
- package/dist/spell/spell.scaling.js +1 -79
- package/dist/spell/spell.schema.js +1 -7
- package/dist/spell/spell.types.d.ts +0 -7
- package/dist/srd/retired-items.d.ts +0 -4
- package/dist/srd/retired-items.js +1 -11
- package/dist/srd-store.d.ts +0 -33
- package/dist/subclass/subclass.codec.d.ts +0 -8
- package/dist/subclass/subclass.codec.js +1 -17
- package/dist/subclass/subclass.parser.js +1 -16
- package/dist/subclass/subclass.schema.d.ts +2 -1
- package/dist/subclass/subclass.schema.js +1 -14
- package/dist/subclass/subclass.types.d.ts +0 -3
- package/dist/types/attack.d.ts +2 -0
- package/dist/types/casting-option.d.ts +0 -4
- package/dist/types/choice.d.ts +1 -72
- package/dist/types/choice.js +1 -24
- package/dist/types/edition.d.ts +0 -3
- package/dist/types/equipment-grant.d.ts +1 -27
- package/dist/types/equipment-grant.js +1 -12
- package/dist/types/feature-effect.d.ts +4 -22
- package/dist/types/feature.d.ts +0 -22
- package/dist/types/optional-feature.types.d.ts +1 -31
- package/dist/types/resource.d.ts +1 -21
- package/dist/types/selection-pool.d.ts +0 -24
- package/dist/weapon/weapon-mastery.d.ts +0 -1
- package/dist/weapon/weapon.classify.d.ts +0 -11
- package/dist/weapon/weapon.classify.js +1 -7
- package/dist/weapon/weapon.codec.d.ts +0 -9
- package/dist/weapon/weapon.codec.js +1 -9
- package/dist/weapon/weapon.parser.js +1 -8
- package/dist/weapon/weapon.schema.js +1 -7
- package/dist/weapon/weapon.types.d.ts +0 -3
- package/package.json +3 -3
- package/src/data-srd/ATTRIBUTION.md +1 -1
- package/dist/chunk-2FRUSVZS.js +0 -489
- package/dist/chunk-2LULMQTF.js +0 -14
- package/dist/chunk-3LWMFYKS.js +0 -57
- package/dist/chunk-3SFGWFVQ.js +0 -19
- package/dist/chunk-3SIUAFDQ.js +0 -18
- package/dist/chunk-3TM34RSJ.js +0 -23
- package/dist/chunk-4J6DS3EJ.js +0 -30
- package/dist/chunk-4U55VNC7.js +0 -22
- package/dist/chunk-5GKJAUMX.js +0 -59
- package/dist/chunk-5JXFJ5AU.js +0 -26
- package/dist/chunk-64VNLMSG.js +0 -375
- package/dist/chunk-656QCX4U.js +0 -22
- package/dist/chunk-6GNXYAYP.js +0 -25
- package/dist/chunk-6PXTNCBP.js +0 -133
- package/dist/chunk-6X2NV665.js +0 -33
- package/dist/chunk-7Q2VPKCD.js +0 -181
- package/dist/chunk-7XJHI5H5.js +0 -709
- package/dist/chunk-A54HHCWW.js +0 -67
- package/dist/chunk-B2QHP6UF.js +0 -159
- package/dist/chunk-B3DP42OM.js +0 -55
- package/dist/chunk-BJGOSM76.js +0 -18
- package/dist/chunk-BJWSOQUC.js +0 -133
- package/dist/chunk-CJYCVNW2.js +0 -7
- package/dist/chunk-CM5CWO4K.js +0 -735
- package/dist/chunk-DEEHHLAP.js +0 -271
- package/dist/chunk-DPUJDOKV.js +0 -365
- package/dist/chunk-EJD47JHL.js +0 -1838
- package/dist/chunk-EJP263OP.js +0 -186
- package/dist/chunk-EVMUJYUD.js +0 -195
- package/dist/chunk-EYX4JMAU.js +0 -101
- package/dist/chunk-FC4IGH5Y.js +0 -18
- package/dist/chunk-FJYBLXV7.js +0 -89
- package/dist/chunk-FMUD3LDV.js +0 -19
- package/dist/chunk-FMYWORTP.js +0 -93
- package/dist/chunk-FVXLP7P3.js +0 -18
- package/dist/chunk-G6MHJDVT.js +0 -41
- package/dist/chunk-GVWEFECG.js +0 -18
- package/dist/chunk-HHBD4SQ6.js +0 -24
- package/dist/chunk-HS6FIOLP.js +0 -52
- package/dist/chunk-HY2SRSVM.js +0 -23
- package/dist/chunk-IHE6KVC3.js +0 -13
- package/dist/chunk-IN4M4X7P.js +0 -34
- package/dist/chunk-IUAAXXNO.js +0 -58
- package/dist/chunk-JXWNXIIZ.js +0 -219
- package/dist/chunk-K5NJBTE2.js +0 -18
- package/dist/chunk-KR6JF3BF.js +0 -14
- package/dist/chunk-KSTV7J2U.js +0 -112
- package/dist/chunk-KU3YLF6D.js +0 -106
- package/dist/chunk-LBEXLN6I.js +0 -91
- package/dist/chunk-LHZXYFBU.js +0 -94
- package/dist/chunk-LICYHPI3.js +0 -237
- package/dist/chunk-LNT64X7C.js +0 -81
- package/dist/chunk-LSLSG67V.js +0 -31
- package/dist/chunk-LVQLWRCU.js +0 -15
- package/dist/chunk-MYY2C5MB.js +0 -233
- package/dist/chunk-NKZMQV2C.js +0 -19
- package/dist/chunk-NTU2DXNG.js +0 -355
- package/dist/chunk-NXUY5XQN.js +0 -1062
- package/dist/chunk-NZO7M5GV.js +0 -18
- package/dist/chunk-OOL4KMG2.js +0 -71
- package/dist/chunk-OOSRUJBI.js +0 -19
- package/dist/chunk-PDJSUH24.js +0 -110
- package/dist/chunk-PTXBIDG7.js +0 -63
- package/dist/chunk-PVCEA4HZ.js +0 -6
- package/dist/chunk-QA3YCOML.js +0 -101
- package/dist/chunk-QFWQKS3M.js +0 -110
- package/dist/chunk-QS5L5YTJ.js +0 -24
- package/dist/chunk-QYZV2MQA.js +0 -97
- package/dist/chunk-RD2MID3M.js +0 -292
- package/dist/chunk-S3YUXDSC.js +0 -278
- package/dist/chunk-S7REMWW4.js +0 -21
- package/dist/chunk-TOM66P2P.js +0 -38
- package/dist/chunk-TRBGC4ZG.js +0 -112
- package/dist/chunk-UA5KS2PL.js +0 -26
- package/dist/chunk-UJCK5IW4.js +0 -187
- package/dist/chunk-UNYR5GLI.js +0 -23
- package/dist/chunk-UZXG6QSY.js +0 -58
- package/dist/chunk-VN5DLURA.js +0 -158
- package/dist/chunk-VP5TIXDK.js +0 -178
- package/dist/chunk-VPYBK2MG.js +0 -18
- package/dist/chunk-VTTA2ALZ.js +0 -16
- package/dist/chunk-W6GC6OKK.js +0 -16
- package/dist/chunk-WELIKLZF.js +0 -256
- package/dist/chunk-WOHX7YTH.js +0 -165
- package/dist/chunk-WSVMLNTO.js +0 -31
- package/dist/chunk-WYGD2UGN.js +0 -14
- package/dist/chunk-XCFC7LGF.js +0 -122
- package/dist/chunk-XJ2F2WO6.js +0 -8
- package/dist/chunk-XTEFPUSN.js +0 -23
- package/dist/chunk-YBLDE5CG.js +0 -42
- package/dist/chunk-YDGMBMYI.js +0 -25
- package/dist/chunk-YHYTW5QA.js +0 -20
- package/dist/chunk-ZCTUYGNV.js +0 -26
- package/dist/chunk-ZDAEGJH4.js +0 -102
- package/dist/chunk-ZJXSXVFP.js +0 -58
- package/dist/chunk-ZOWKWMD2.js +0 -18
- package/dist/chunk-ZUQW5VBZ.js +0 -89
package/dist/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
|
-
};
|
package/dist/chunk-5GKJAUMX.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
imageField
|
|
3
|
-
} from "./chunk-UA5KS2PL.js";
|
|
4
|
-
|
|
5
|
-
// src/weapon/weapon.schema.ts
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
var conditionalPropertySchema = z.object({
|
|
8
|
-
kind: z.literal("conditional"),
|
|
9
|
-
uid: z.string(),
|
|
10
|
-
note: z.string()
|
|
11
|
-
});
|
|
12
|
-
var propertySchema = z.union([z.string(), conditionalPropertySchema]);
|
|
13
|
-
var editionEnum = z.enum(["2014", "2024"]);
|
|
14
|
-
var weaponEntitySchema = z.object({
|
|
15
|
-
name: z.string().min(1),
|
|
16
|
-
slug: z.string().min(1),
|
|
17
|
-
category: z.string(),
|
|
18
|
-
damage: z.object({
|
|
19
|
-
dice: z.string(),
|
|
20
|
-
type: z.string(),
|
|
21
|
-
versatile_dice: z.string().optional()
|
|
22
|
-
}),
|
|
23
|
-
properties: z.array(propertySchema).default([]),
|
|
24
|
-
range: z.object({
|
|
25
|
-
normal: z.number().int().nonnegative(),
|
|
26
|
-
long: z.number().int().nonnegative()
|
|
27
|
-
}).optional(),
|
|
28
|
-
reload: z.number().int().nonnegative().optional(),
|
|
29
|
-
mastery: z.array(z.string()).optional(),
|
|
30
|
-
type_tags: z.array(z.string()).optional(),
|
|
31
|
-
ammo_type: z.string().optional(),
|
|
32
|
-
weight: z.union([z.number(), z.string()]).optional(),
|
|
33
|
-
cost: z.string().optional(),
|
|
34
|
-
source: z.string().optional(),
|
|
35
|
-
page: z.number().int().optional(),
|
|
36
|
-
edition: editionEnum,
|
|
37
|
-
entries: z.array(z.unknown()).optional(),
|
|
38
|
-
// Root extras the converter and the SRD bundle emit on more than one root (spec §5).
|
|
39
|
-
// Carrier counts measured on the G1b close census. `rendering_hint` is ALWAYS the empty
|
|
40
|
-
// string today, so `.min(1)` is forbidden here.
|
|
41
|
-
rendering_hint: z.string().optional(),
|
|
42
|
-
// 98
|
|
43
|
-
// The icon key (I3): a key of the renderer's icon set or a Lucide name; itemIconKey reads it first.
|
|
44
|
-
icon: z.string().optional(),
|
|
45
|
-
has_fluff: z.boolean().optional(),
|
|
46
|
-
// 1
|
|
47
|
-
has_fluff_images: z.boolean().optional(),
|
|
48
|
-
// 39
|
|
49
|
-
// Already `.optional()` at its source — never append a second one.
|
|
50
|
-
image: imageField,
|
|
51
|
-
// 0 today (images-OFF tree)
|
|
52
|
-
raw: z.record(z.string(), z.unknown()).optional()
|
|
53
|
-
// `weapon :: value_rarity :: duplicated` (8) is deliberately NOT declared: it is
|
|
54
|
-
// converter-owned and stays a named expected residual (spec §10.3).
|
|
55
|
-
}).loose();
|
|
56
|
-
|
|
57
|
-
export {
|
|
58
|
-
weaponEntitySchema
|
|
59
|
-
};
|
package/dist/chunk-5JXFJ5AU.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// src/pc/pc.proficiency-normalize.ts
|
|
2
|
-
var normKey = (s) => s.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim().split(/\s+/).filter(Boolean).map((w) => w.endsWith("s") ? w.slice(0, -1) : w).sort().join(" ");
|
|
3
|
-
var toProfSlug = (s) => s.toLowerCase().replace(/’/g, "'").trim().replace(/\s+/g, "-");
|
|
4
|
-
var humanizeProficiency = (s) => s.replace(/-/g, " ").replace(/(^|\s)\w/g, (c) => c.toUpperCase());
|
|
5
|
-
var proficiencyLabel = (raw) => {
|
|
6
|
-
const text = raw.replace(/’/g, "'").trim().replace(/\s+/g, " ");
|
|
7
|
-
if (!/\s/.test(text) || text === text.toLowerCase()) return humanizeProficiency(toProfSlug(raw));
|
|
8
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
9
|
-
};
|
|
10
|
-
var weaponProfKey = (raw) => {
|
|
11
|
-
const key = normKey(raw);
|
|
12
|
-
const bare = key.split(" ").filter((w) => w !== "weapon").join(" ");
|
|
13
|
-
return bare === "simple" || bare === "martial" ? bare : key;
|
|
14
|
-
};
|
|
15
|
-
var armorProfKey = (raw) => normKey(raw).split(" ").filter((w) => w !== "armor").join(" ");
|
|
16
|
-
var proficiencyKey = (kind, raw) => kind === "weapons" ? weaponProfKey(raw) : kind === "armor" ? armorProfKey(raw) : toProfSlug(raw);
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
normKey,
|
|
20
|
-
toProfSlug,
|
|
21
|
-
humanizeProficiency,
|
|
22
|
-
proficiencyLabel,
|
|
23
|
-
weaponProfKey,
|
|
24
|
-
armorProfKey,
|
|
25
|
-
proficiencyKey
|
|
26
|
-
};
|
package/dist/chunk-64VNLMSG.js
DELETED
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
normalizeRollScope
|
|
3
|
-
} from "./chunk-TOM66P2P.js";
|
|
4
|
-
import {
|
|
5
|
-
toProfSlug
|
|
6
|
-
} from "./chunk-5JXFJ5AU.js";
|
|
7
|
-
import {
|
|
8
|
-
memberSpellTargets
|
|
9
|
-
} from "./chunk-RD2MID3M.js";
|
|
10
|
-
import {
|
|
11
|
-
warnOnce
|
|
12
|
-
} from "./chunk-LVQLWRCU.js";
|
|
13
|
-
import {
|
|
14
|
-
bareEntitySlug
|
|
15
|
-
} from "./chunk-ZCTUYGNV.js";
|
|
16
|
-
import {
|
|
17
|
-
normalizeAbility
|
|
18
|
-
} from "./chunk-WELIKLZF.js";
|
|
19
|
-
|
|
20
|
-
// src/pc/pc.feature-effects.ts
|
|
21
|
-
function emptyFeatureEffectTotals() {
|
|
22
|
-
return {
|
|
23
|
-
initiative_bonus: 0,
|
|
24
|
-
initiative_terms: [],
|
|
25
|
-
skill_bonus_terms: [],
|
|
26
|
-
save_bonus_terms: [],
|
|
27
|
-
half_proficiency_terms: [],
|
|
28
|
-
hp_per_level_bonus: 0,
|
|
29
|
-
hp_per_level_terms: [],
|
|
30
|
-
speed_walk_bonus: 0,
|
|
31
|
-
speed_walk_terms: [],
|
|
32
|
-
speed_walk_set: 0,
|
|
33
|
-
attunement_set: 0,
|
|
34
|
-
ability_bonus: {},
|
|
35
|
-
senses: { darkvision: 0, blindsight: 0, tremorsense: 0, truesight: 0 },
|
|
36
|
-
ac_terms: [],
|
|
37
|
-
resistances: [],
|
|
38
|
-
immunities: [],
|
|
39
|
-
vulnerabilities: [],
|
|
40
|
-
condition_immunities: [],
|
|
41
|
-
proficiencies: { skills: [], skillExpertise: [], tools: [], languages: [], saves: [], armor: [], weapons: [] },
|
|
42
|
-
weaponAbilities: [],
|
|
43
|
-
rollModifiers: [],
|
|
44
|
-
saveOutcomes: [],
|
|
45
|
-
critRange: 20,
|
|
46
|
-
extraAttack: 0,
|
|
47
|
-
attackNotes: [],
|
|
48
|
-
damageBonuses: [],
|
|
49
|
-
spellDamageBonuses: []
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function pushUnique(list, value) {
|
|
53
|
-
const key = value.trim().toLowerCase();
|
|
54
|
-
if (!key) return;
|
|
55
|
-
if (!list.some((v) => v.trim().toLowerCase() === key)) list.push(value.trim());
|
|
56
|
-
}
|
|
57
|
-
function pushDefenseGrant(list, value, source, condition) {
|
|
58
|
-
const key = value.trim().toLowerCase();
|
|
59
|
-
if (!key) return;
|
|
60
|
-
const existing = list.find((g) => g.value.trim().toLowerCase() === key);
|
|
61
|
-
if (existing) {
|
|
62
|
-
if (!existing.sources.includes(source)) existing.sources.push(source);
|
|
63
|
-
if (!existing.condition && condition) existing.condition = condition;
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
list.push({ value: value.trim(), sources: [source], ...condition ? { condition } : {} });
|
|
67
|
-
}
|
|
68
|
-
function foldsNow(rf, activeBuffs) {
|
|
69
|
-
if (rf.feature.activatable !== true) return true;
|
|
70
|
-
const id = rf.feature.id;
|
|
71
|
-
return !!id && activeBuffs.has(id);
|
|
72
|
-
}
|
|
73
|
-
function assembleEffectFeatures(resolved) {
|
|
74
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
75
|
-
const activeBuffs = new Set((_b = (_a = resolved.state) == null ? void 0 : _a.active_buffs) != null ? _b : []);
|
|
76
|
-
const featureIds = new Set(((_c = resolved.features) != null ? _c : []).map((f) => f.feature.id).filter((id) => !!id));
|
|
77
|
-
const aliases = [];
|
|
78
|
-
for (const pool of (_d = resolved.pools) != null ? _d : []) {
|
|
79
|
-
for (const entry of [...(_e = pool.selected) != null ? _e : [], ...(_f = pool.grants) != null ? _f : []]) {
|
|
80
|
-
if (activeBuffs.has(entry.slug)) continue;
|
|
81
|
-
const bare = bareEntitySlug(entry.slug);
|
|
82
|
-
for (const stored of activeBuffs) {
|
|
83
|
-
if (featureIds.has(stored)) continue;
|
|
84
|
-
if (bareEntitySlug(stored) === bare) {
|
|
85
|
-
aliases.push(entry.slug);
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
for (const a of aliases) activeBuffs.add(a);
|
|
92
|
-
const buffFeatures = [];
|
|
93
|
-
const pushBoon = (item, pool) => {
|
|
94
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k;
|
|
95
|
-
const e = item.entity;
|
|
96
|
-
if (!e || item.itemBound === true || ((_b2 = (_a2 = e.effects) == null ? void 0 : _a2.length) != null ? _b2 : 0) === 0) return;
|
|
97
|
-
const block = (_f2 = (_e2 = (_d2 = (_c2 = resolved.classes) == null ? void 0 : _c2[pool.classIndex]) == null ? void 0 : _d2.choices) == null ? void 0 : _e2[pool.anchorLevel]) != null ? _f2 : {};
|
|
98
|
-
const spellTargets = memberSpellTargets(e, (id) => {
|
|
99
|
-
var _a3;
|
|
100
|
-
return block[`${pool.id}:${(_a3 = item.key) != null ? _a3 : item.slug}:${id}`];
|
|
101
|
-
});
|
|
102
|
-
buffFeatures.push({
|
|
103
|
-
feature: { id: item.slug, name: e.name, activatable: (_g2 = e.activatable) != null ? _g2 : false, effects: e.effects },
|
|
104
|
-
// source is inert for the fold; attribute to the pool's owning class
|
|
105
|
-
// (never a hardcoded class) so the generic engine carries no homebrew name.
|
|
106
|
-
source: { kind: "class", slug: (_k = (_j2 = (_i2 = (_h2 = resolved.classes) == null ? void 0 : _h2[pool.classIndex]) == null ? void 0 : _i2.entity) == null ? void 0 : _j2.slug) != null ? _k : pool.id, level: pool.anchorLevel },
|
|
107
|
-
...spellTargets ? { spellTargets } : {}
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
for (const pool of (_g = resolved.pools) != null ? _g : []) {
|
|
111
|
-
for (const sel of (_h = pool.selected) != null ? _h : []) pushBoon(sel, pool);
|
|
112
|
-
for (const g of (_i = pool.grants) != null ? _i : []) pushBoon(g, pool);
|
|
113
|
-
}
|
|
114
|
-
return { features: [...(_j = resolved.features) != null ? _j : [], ...buffFeatures], activeBuffs };
|
|
115
|
-
}
|
|
116
|
-
function foldsOnSelf(eff) {
|
|
117
|
-
if (eff.subject === void 0 || eff.subject === "self") return true;
|
|
118
|
-
warnOnce(eff.subject, `archivist: unrecognised effect subject "${eff.subject}" (only "self" folds)`);
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
function selfEffectsOf(f) {
|
|
122
|
-
var _a;
|
|
123
|
-
return ((_a = f.effects) != null ? _a : []).filter(foldsOnSelf);
|
|
124
|
-
}
|
|
125
|
-
function computeFeatureEffects(features, opts) {
|
|
126
|
-
var _a, _b, _c;
|
|
127
|
-
const out = emptyFeatureEffectTotals();
|
|
128
|
-
for (const rf of features) {
|
|
129
|
-
if (!foldsNow(rf, (_a = opts == null ? void 0 : opts.activeBuffs) != null ? _a : /* @__PURE__ */ new Set())) continue;
|
|
130
|
-
const level = (_b = opts == null ? void 0 : opts.levelFor) == null ? void 0 : _b.call(opts, rf.source);
|
|
131
|
-
for (const eff of selfEffectsOf(rf.feature)) {
|
|
132
|
-
applyEffect(out, columnScaledRider(eff, rf, level, opts == null ? void 0 : opts.tableDiceFor), (_c = rf.feature.name) != null ? _c : "Feature", level, rf.source, rf.spellTargets);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return out;
|
|
136
|
-
}
|
|
137
|
-
function classifyProficiencyEffect(eff) {
|
|
138
|
-
if (eff.kind !== "proficiency") return null;
|
|
139
|
-
const raw = eff.value;
|
|
140
|
-
const expertise = eff.expertise === true;
|
|
141
|
-
switch (eff.proficiency_type) {
|
|
142
|
-
case "skill":
|
|
143
|
-
return { bucket: "skills", value: toProfSlug(raw), raw, expertise };
|
|
144
|
-
case "tool":
|
|
145
|
-
return { bucket: "tools", value: toProfSlug(raw), raw, expertise };
|
|
146
|
-
case "language":
|
|
147
|
-
return { bucket: "languages", value: toProfSlug(raw), raw, expertise };
|
|
148
|
-
case "armor":
|
|
149
|
-
return { bucket: "armor", value: raw.toLowerCase(), raw, expertise };
|
|
150
|
-
case "weapon":
|
|
151
|
-
return { bucket: "weapons", value: raw.toLowerCase(), raw, expertise };
|
|
152
|
-
default: {
|
|
153
|
-
const ab = normalizeAbility(raw);
|
|
154
|
-
return ab ? { bucket: "saves", value: ab, raw, expertise } : null;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function collectProficiencyEffectGrants(features, activeBuffs) {
|
|
159
|
-
const out = {
|
|
160
|
-
skills: [],
|
|
161
|
-
tools: [],
|
|
162
|
-
languages: [],
|
|
163
|
-
saves: [],
|
|
164
|
-
armor: [],
|
|
165
|
-
weapons: []
|
|
166
|
-
};
|
|
167
|
-
for (const rf of features) {
|
|
168
|
-
if (!foldsNow(rf, activeBuffs)) continue;
|
|
169
|
-
for (const eff of selfEffectsOf(rf.feature)) {
|
|
170
|
-
const c = classifyProficiencyEffect(eff);
|
|
171
|
-
if (!c) continue;
|
|
172
|
-
out[c.bucket].push({
|
|
173
|
-
value: c.value,
|
|
174
|
-
raw: c.raw,
|
|
175
|
-
sourceKind: rf.source.kind,
|
|
176
|
-
sourceSlug: rf.source.slug,
|
|
177
|
-
...c.expertise ? { expertise: true } : {}
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return out;
|
|
182
|
-
}
|
|
183
|
-
function scaled(base, key, scalesAt, level) {
|
|
184
|
-
if (level === void 0 || !(scalesAt == null ? void 0 : scalesAt.length)) return base;
|
|
185
|
-
let best = base;
|
|
186
|
-
let bestLevel = -1;
|
|
187
|
-
for (const step of scalesAt) {
|
|
188
|
-
if (step.level > level || step.level <= bestLevel) continue;
|
|
189
|
-
const v = step[key];
|
|
190
|
-
if (typeof v !== "number") continue;
|
|
191
|
-
best = v;
|
|
192
|
-
bestLevel = step.level;
|
|
193
|
-
}
|
|
194
|
-
return best;
|
|
195
|
-
}
|
|
196
|
-
function columnScaledRider(eff, rf, level, tableDiceFor) {
|
|
197
|
-
if (eff.kind !== "damage-bonus" || level === void 0 || !tableDiceFor) return eff;
|
|
198
|
-
const src = rf.source;
|
|
199
|
-
const column = rf.feature.name;
|
|
200
|
-
if (src.kind !== "class" && src.kind !== "subclass" || !column) return eff;
|
|
201
|
-
const atGain = tableDiceFor(src, column, src.level);
|
|
202
|
-
if (!atGain || atGain.toLowerCase() !== eff.amount.trim().toLowerCase()) return eff;
|
|
203
|
-
const now = tableDiceFor(src, column, level);
|
|
204
|
-
return now ? { ...eff, amount: now } : eff;
|
|
205
|
-
}
|
|
206
|
-
function riderScope(appliesTo) {
|
|
207
|
-
if (appliesTo === void 0 || appliesTo === "all" || appliesTo === "spell") return void 0;
|
|
208
|
-
const words = Array.isArray(appliesTo) ? appliesTo : [appliesTo];
|
|
209
|
-
return words.includes("weapon") ? void 0 : [...words];
|
|
210
|
-
}
|
|
211
|
-
function applyEffect(out, eff, label, level, owner, targets) {
|
|
212
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
213
|
-
switch (eff.kind) {
|
|
214
|
-
case "initiative-bonus":
|
|
215
|
-
out.initiative_bonus += eff.value;
|
|
216
|
-
out.initiative_terms.push({ label, value: eff.value });
|
|
217
|
-
break;
|
|
218
|
-
case "skill-bonus":
|
|
219
|
-
out.skill_bonus_terms.push({
|
|
220
|
-
skills: eff.skills.map(toProfSlug),
|
|
221
|
-
ability: eff.ability,
|
|
222
|
-
minimum: (_a = eff.minimum) != null ? _a : 0,
|
|
223
|
-
label
|
|
224
|
-
});
|
|
225
|
-
break;
|
|
226
|
-
case "save-bonus":
|
|
227
|
-
out.save_bonus_terms.push({
|
|
228
|
-
saves: [...(_b = eff.saves) != null ? _b : []],
|
|
229
|
-
ability: eff.ability,
|
|
230
|
-
minimum: (_c = eff.minimum) != null ? _c : 0,
|
|
231
|
-
...eff.inactive_while ? { inactiveWhile: eff.inactive_while } : {},
|
|
232
|
-
label
|
|
233
|
-
});
|
|
234
|
-
break;
|
|
235
|
-
case "half-proficiency":
|
|
236
|
-
out.half_proficiency_terms.push({
|
|
237
|
-
skills: ((_d = eff.skills) != null ? _d : []).map(toProfSlug),
|
|
238
|
-
round: (_e = eff.round) != null ? _e : "down",
|
|
239
|
-
label
|
|
240
|
-
});
|
|
241
|
-
break;
|
|
242
|
-
case "hp-per-level-bonus":
|
|
243
|
-
out.hp_per_level_bonus += eff.value;
|
|
244
|
-
out.hp_per_level_terms.push({ label, value: eff.value });
|
|
245
|
-
break;
|
|
246
|
-
case "speed-bonus": {
|
|
247
|
-
const value = scaled(eff.value, "value", eff.scales_at, level);
|
|
248
|
-
if (eff.mode === "walk") {
|
|
249
|
-
if (eff.set) out.speed_walk_set = Math.max(out.speed_walk_set, value);
|
|
250
|
-
else {
|
|
251
|
-
out.speed_walk_bonus += value;
|
|
252
|
-
out.speed_walk_terms.push({ label, value });
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
break;
|
|
256
|
-
}
|
|
257
|
-
case "attunement-limit": {
|
|
258
|
-
out.attunement_set = Math.max(out.attunement_set, scaled(eff.value, "value", eff.scales_at, level));
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
case "sense":
|
|
262
|
-
out.senses[eff.type] = Math.max(out.senses[eff.type], eff.range);
|
|
263
|
-
break;
|
|
264
|
-
case "resistance":
|
|
265
|
-
pushDefenseGrant(out.resistances, eff.damage_type, label, eff.condition);
|
|
266
|
-
break;
|
|
267
|
-
case "immunity":
|
|
268
|
-
pushDefenseGrant(out.immunities, eff.damage_type, label, eff.condition);
|
|
269
|
-
break;
|
|
270
|
-
case "vulnerability":
|
|
271
|
-
pushDefenseGrant(out.vulnerabilities, eff.damage_type, label, eff.condition);
|
|
272
|
-
break;
|
|
273
|
-
case "immune-condition":
|
|
274
|
-
if (!eff.while) pushDefenseGrant(out.condition_immunities, eff.condition, label);
|
|
275
|
-
break;
|
|
276
|
-
case "proficiency": {
|
|
277
|
-
const c = classifyProficiencyEffect(eff);
|
|
278
|
-
if (!c) break;
|
|
279
|
-
if (c.bucket === "saves") {
|
|
280
|
-
pushUnique(out.proficiencies.saves, c.value);
|
|
281
|
-
} else {
|
|
282
|
-
pushUnique(out.proficiencies[c.bucket], c.value);
|
|
283
|
-
}
|
|
284
|
-
if (c.expertise && c.bucket === "skills") pushUnique(out.proficiencies.skillExpertise, c.value);
|
|
285
|
-
break;
|
|
286
|
-
}
|
|
287
|
-
case "ac-bonus":
|
|
288
|
-
out.ac_terms.push({
|
|
289
|
-
value: eff.value,
|
|
290
|
-
requires_armor: eff.requires_armor === true,
|
|
291
|
-
label,
|
|
292
|
-
condition: eff.condition
|
|
293
|
-
});
|
|
294
|
-
break;
|
|
295
|
-
case "weapon-ability": {
|
|
296
|
-
if (eff.ability !== "spellcasting") {
|
|
297
|
-
const w = eff.weapons;
|
|
298
|
-
const weaponSlugs = !w || w === "chosen" ? void 0 : Array.isArray(w) ? w.map(bareEntitySlug) : [bareEntitySlug(w)];
|
|
299
|
-
out.weaponAbilities.push({ ability: eff.ability, weaponSlugs });
|
|
300
|
-
}
|
|
301
|
-
break;
|
|
302
|
-
}
|
|
303
|
-
case "roll-modifier": {
|
|
304
|
-
const rolls = eff.roll === "any" ? ["ability-check", "saving-throw", "attack"] : [eff.roll];
|
|
305
|
-
const scopes = (_f = normalizeRollScope(eff.scope, rolls[0])) != null ? _f : [eff.scope];
|
|
306
|
-
for (const roll of rolls) for (const scope of scopes)
|
|
307
|
-
out.rollModifiers.push({ mode: eff.mode, roll, scope, condition: eff.condition, label });
|
|
308
|
-
break;
|
|
309
|
-
}
|
|
310
|
-
case "save-outcome":
|
|
311
|
-
out.saveOutcomes.push({
|
|
312
|
-
ability: eff.ability === "any" ? void 0 : eff.ability,
|
|
313
|
-
on_success: eff.on_success,
|
|
314
|
-
on_failure: eff.on_failure,
|
|
315
|
-
appliesTo: (_g = eff.applies_to) != null ? _g : void 0,
|
|
316
|
-
condition: eff.condition,
|
|
317
|
-
label
|
|
318
|
-
});
|
|
319
|
-
break;
|
|
320
|
-
case "crit-range":
|
|
321
|
-
if (((_h = eff.applies_to) != null ? _h : "weapon") !== "spell") out.critRange = Math.min(out.critRange, eff.min_roll);
|
|
322
|
-
break;
|
|
323
|
-
case "extra-attack":
|
|
324
|
-
out.extraAttack = Math.max(out.extraAttack, scaled(eff.count, "count", eff.scales_at, level));
|
|
325
|
-
break;
|
|
326
|
-
case "reroll-damage":
|
|
327
|
-
out.attackNotes.push(`Reroll ${eff.max_reroll}s${eff.once_per_die ? " (once/die)" : ""}`);
|
|
328
|
-
break;
|
|
329
|
-
case "attack-rule":
|
|
330
|
-
if (eff.flag === "no-ranged-in-melee-disadvantage") out.attackNotes.push("No disadvantage firing in melee");
|
|
331
|
-
break;
|
|
332
|
-
case "damage-bonus":
|
|
333
|
-
if (((_i = eff.applies_to) != null ? _i : "weapon") !== "spell") {
|
|
334
|
-
const scope = riderScope(eff.applies_to);
|
|
335
|
-
out.damageBonuses.push({
|
|
336
|
-
amount: eff.amount,
|
|
337
|
-
damage_type: eff.damage_type,
|
|
338
|
-
source: label,
|
|
339
|
-
...eff.condition ? { condition: eff.condition } : {},
|
|
340
|
-
...scope ? { scope } : {},
|
|
341
|
-
...owner ? { owner } : {}
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
if (eff.applies_to === "spell" || eff.applies_to === "all") {
|
|
345
|
-
const spellScope = (_j = eff.spell_scope) != null ? _j : eff.applies_to === "all" ? {} : void 0;
|
|
346
|
-
out.spellDamageBonuses.push({
|
|
347
|
-
amount: eff.amount,
|
|
348
|
-
damage_type: eff.damage_type,
|
|
349
|
-
source: label,
|
|
350
|
-
...eff.condition ? { condition: eff.condition } : {},
|
|
351
|
-
...owner ? { owner } : {},
|
|
352
|
-
...targets ? { targets } : {},
|
|
353
|
-
...spellScope ? { scope: spellScope } : {}
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
break;
|
|
357
|
-
case "ability-score-increase":
|
|
358
|
-
if (eff.abilities === "chosen") break;
|
|
359
|
-
for (const ab of eff.abilities) out.ability_bonus[ab] = ((_k = out.ability_bonus[ab]) != null ? _k : 0) + eff.amount;
|
|
360
|
-
break;
|
|
361
|
-
default:
|
|
362
|
-
break;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
export {
|
|
367
|
-
emptyFeatureEffectTotals,
|
|
368
|
-
foldsNow,
|
|
369
|
-
assembleEffectFeatures,
|
|
370
|
-
foldsOnSelf,
|
|
371
|
-
selfEffectsOf,
|
|
372
|
-
computeFeatureEffects,
|
|
373
|
-
classifyProficiencyEffect,
|
|
374
|
-
collectProficiencyEffectGrants
|
|
375
|
-
};
|
package/dist/chunk-656QCX4U.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// src/spell/spell.ai-schema.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
var spellInputSchema = z.object({
|
|
4
|
-
name: z.string().describe("Spell name"),
|
|
5
|
-
level: z.number().min(0).max(9).describe("Spell level (0 for cantrips)"),
|
|
6
|
-
school: z.enum(["abjuration", "conjuration", "divination", "enchantment", "evocation", "illusion", "necromancy", "transmutation"]),
|
|
7
|
-
casting_time: z.string().describe('e.g., "1 action", "1 bonus action"'),
|
|
8
|
-
range: z.string().describe('e.g., "Touch", "120 feet", "Self"'),
|
|
9
|
-
components: z.string().describe('e.g., "V, S", "V, S, M (diamond worth 100 gp)"'),
|
|
10
|
-
duration: z.string().describe('e.g., "Instantaneous", "Concentration, up to 1 minute"'),
|
|
11
|
-
description: z.array(z.string()).describe(
|
|
12
|
-
"Spell description paragraphs. Use inline formula tags for damage and save DCs: `damage:DICE` for damage rolls (e.g. `damage:8d6`), `dc:ABILITY` for save DCs (e.g. `dc:WIS`). Valid abilities: STR, DEX, CON, INT, WIS, CHA."
|
|
13
|
-
),
|
|
14
|
-
at_higher_levels: z.array(z.string()).optional(),
|
|
15
|
-
classes: z.array(z.string()).optional(),
|
|
16
|
-
ritual: z.boolean().optional(),
|
|
17
|
-
concentration: z.boolean().optional()
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
spellInputSchema
|
|
22
|
-
};
|
package/dist/chunk-6GNXYAYP.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
STATIC_FALLBACK_CONTEXT,
|
|
3
|
-
convertDescToTags
|
|
4
|
-
} from "./chunk-DEEHHLAP.js";
|
|
5
|
-
|
|
6
|
-
// src/item/item.enrichment.ts
|
|
7
|
-
function enrichItem(raw) {
|
|
8
|
-
var _a, _b, _c;
|
|
9
|
-
const enriched = {
|
|
10
|
-
...raw,
|
|
11
|
-
source: (_a = raw.source) != null ? _a : "Homebrew",
|
|
12
|
-
attunement: (_b = raw.attunement) != null ? _b : false,
|
|
13
|
-
curse: (_c = raw.curse) != null ? _c : false
|
|
14
|
-
};
|
|
15
|
-
if (Array.isArray(enriched.entries)) {
|
|
16
|
-
enriched.entries = enriched.entries.map(
|
|
17
|
-
(e) => convertDescToTags(e, STATIC_FALLBACK_CONTEXT)
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
return enriched;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
enrichItem
|
|
25
|
-
};
|