@archivist-gg/dnd5e 0.3.17 → 0.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +48 -21
- package/README.md +26 -48
- package/dist/armor/armor.codec.d.ts +0 -7
- package/dist/armor/armor.codec.js +1 -9
- package/dist/armor/armor.parser.js +1 -8
- package/dist/armor/armor.schema.js +1 -7
- package/dist/armor/armor.types.d.ts +0 -3
- package/dist/background/background.codec.d.ts +0 -6
- package/dist/background/background.codec.js +1 -12
- package/dist/background/background.parser.js +1 -11
- package/dist/background/background.schema.js +1 -12
- package/dist/background/background.types.d.ts +0 -5
- package/dist/chunk-2EOGK6R6.js +1 -0
- package/dist/chunk-2HRRH3WL.js +1 -0
- package/dist/chunk-2LCGKNVM.js +1 -0
- package/dist/chunk-2NUDWOFG.js +1 -0
- package/dist/chunk-334WLI7V.js +1 -0
- package/dist/chunk-3LWOVRLA.js +1 -0
- package/dist/chunk-3QQOATV3.js +1 -0
- package/dist/chunk-4E2GIWJE.js +1 -0
- package/dist/chunk-4GN3GYMP.js +1 -0
- package/dist/chunk-4IAMSRHD.js +1 -0
- package/dist/chunk-4JEF3CET.js +1 -0
- package/dist/chunk-4KVVAENP.js +1 -0
- package/dist/chunk-56JK6VCL.js +1 -0
- package/dist/chunk-5FEXHY4U.js +1 -0
- package/dist/chunk-63YJPWTM.js +1 -0
- package/dist/chunk-6ASJ3MVB.js +1 -0
- package/dist/chunk-6IC53O3Q.js +1 -0
- package/dist/chunk-6LCNV26D.js +1 -0
- package/dist/chunk-6W253VHH.js +1 -0
- package/dist/chunk-7AKJBRBD.js +1 -0
- package/dist/chunk-7EL3GWWJ.js +1 -0
- package/dist/chunk-7FPQJDFD.js +1 -0
- package/dist/chunk-7J5BNH2D.js +1 -0
- package/dist/chunk-7LPKI27J.js +1 -0
- package/dist/chunk-7UPYRKMF.js +1 -0
- package/dist/chunk-A7H6LX47.js +1 -0
- package/dist/chunk-AINRPPLH.js +1 -0
- package/dist/chunk-BC52J4LA.js +1 -0
- package/dist/chunk-BCXGB4HP.js +1 -0
- package/dist/chunk-BGX36NPE.js +1 -0
- package/dist/chunk-BPKG6RZ7.js +1 -0
- package/dist/chunk-BREHZNTL.js +1 -0
- package/dist/chunk-BZ6BGGZS.js +1 -0
- package/dist/chunk-CAPYNIGK.js +1 -0
- package/dist/chunk-CCFIINBA.js +1 -0
- package/dist/chunk-CMIEZQL4.js +1 -0
- package/dist/chunk-DVUXUIPV.js +1 -0
- package/dist/chunk-DY6FVAGA.js +1 -0
- package/dist/chunk-DZITM5AG.js +1 -0
- package/dist/chunk-DZKSXSJF.js +1 -0
- package/dist/chunk-EAARMPCW.js +1 -0
- package/dist/chunk-EVT7MGAC.js +1 -0
- package/dist/chunk-FOLHTMSC.js +1 -0
- package/dist/chunk-GCYUCIDN.js +1 -0
- package/dist/chunk-GIOV6JW7.js +1 -0
- package/dist/chunk-HCK6IUB3.js +1 -0
- package/dist/chunk-HR5MKCP2.js +1 -0
- package/dist/chunk-I26FHSI6.js +1 -0
- package/dist/chunk-I4O2FIDT.js +1 -0
- package/dist/chunk-IGVRLGLM.js +1 -0
- package/dist/chunk-IHPLT2ZT.js +1 -0
- package/dist/chunk-IOCJIWCV.js +1 -0
- package/dist/chunk-JXDX2DKF.js +1 -0
- package/dist/chunk-KBFSJ5WE.js +1 -0
- package/dist/chunk-KM75CC6Q.js +1 -0
- package/dist/chunk-KZDDFG4O.js +1 -0
- package/dist/chunk-LJNT3PJP.js +1 -0
- package/dist/chunk-LR6UMA5V.js +1 -0
- package/dist/chunk-M6RPOLKS.js +1 -0
- package/dist/chunk-MC6PLWRZ.js +1 -0
- package/dist/chunk-MGGKZGLG.js +1 -0
- package/dist/chunk-N3RYJ7RE.js +1 -0
- package/dist/chunk-NEMX7QGG.js +1 -0
- package/dist/chunk-NI364WV7.js +1 -0
- package/dist/chunk-O2QZ73GA.js +1 -0
- package/dist/chunk-O776WL7O.js +1 -0
- package/dist/chunk-OTFNINUY.js +1 -0
- package/dist/chunk-PQAVMK3T.js +1 -0
- package/dist/chunk-PZ3ZZ5H5.js +1 -0
- package/dist/chunk-PZ4L2EEG.js +1 -0
- package/dist/chunk-PZUPZBTN.js +1 -0
- package/dist/chunk-QBA757AU.js +1 -0
- package/dist/chunk-QFIGPOFW.js +1 -0
- package/dist/chunk-QMEKQTUT.js +1 -0
- package/dist/chunk-QVWT67WA.js +1 -0
- package/dist/chunk-RDXQAZBA.js +1 -0
- package/dist/chunk-RE5Z5RNK.js +1 -0
- package/dist/chunk-RL4VY2AL.js +1 -0
- package/dist/chunk-RQGTBHJW.js +1 -0
- package/dist/chunk-RQZCGXUZ.js +1 -0
- package/dist/chunk-S5UCI27C.js +1 -0
- package/dist/chunk-SEOASDO4.js +1 -0
- package/dist/chunk-SU4MEZ5P.js +1 -0
- package/dist/chunk-T55DELVL.js +1 -0
- package/dist/chunk-TKIEPC6F.js +1 -0
- package/dist/chunk-TLXFGGWH.js +1 -0
- package/dist/chunk-UBUKCRZ3.js +1 -0
- package/dist/chunk-V6NQ547U.js +1 -0
- package/dist/chunk-VA3ZWV7C.js +1 -0
- package/dist/chunk-VIP3FH2O.js +1 -0
- package/dist/chunk-VTQ4RWEG.js +1 -0
- package/dist/chunk-WUHTSLG4.js +1 -0
- package/dist/chunk-X22SISGM.js +1 -0
- package/dist/chunk-XKJXT2PN.js +1 -0
- package/dist/chunk-XQMKH4R4.js +1 -0
- package/dist/chunk-YGH7S5ZF.js +1 -0
- package/dist/chunk-ZE46ADXS.js +1 -0
- package/dist/chunk-ZI3FEUX3.js +1 -0
- package/dist/class/class.codec.d.ts +0 -7
- package/dist/class/class.codec.js +1 -18
- package/dist/class/class.parser.js +1 -17
- package/dist/class/class.schema.d.ts +2 -1
- package/dist/class/class.schema.js +1 -15
- package/dist/class/class.slug.d.ts +0 -11
- package/dist/class/class.slug.js +1 -8
- package/dist/class/class.standard-array.d.ts +0 -7
- package/dist/class/class.standard-array.js +1 -20
- package/dist/class/class.types.d.ts +0 -20
- package/dist/condition/condition.codec.d.ts +0 -6
- package/dist/condition/condition.parser.d.ts +0 -10
- package/dist/condition/condition.parser.js +1 -7
- package/dist/condition/condition.schema.d.ts +0 -16
- package/dist/condition/condition.types.d.ts +0 -3
- package/dist/data-srd/index.generated.js +1 -146
- package/dist/dnd/amount-text.d.ts +4 -27
- package/dist/dnd/amount-text.js +1 -13
- package/dist/dnd/constants.d.ts +0 -18
- package/dist/dnd/constants.js +1 -42
- package/dist/dnd/formula-tags.d.ts +0 -2
- package/dist/dnd/formula-tags.js +1 -119
- package/dist/dnd/math.d.ts +0 -26
- package/dist/dnd/math.js +1 -45
- package/dist/dnd/prose-tags.d.ts +1 -15
- package/dist/dnd/prose-tags.js +1 -18
- package/dist/dnd/resource-die.d.ts +0 -4
- package/dist/dnd/resource-die.js +1 -17
- package/dist/dnd/resource-formula.d.ts +0 -43
- package/dist/dnd/resource-formula.js +1 -14
- package/dist/dnd/resource-words.d.ts +0 -2
- package/dist/dnd/resource-words.js +1 -30
- package/dist/dnd/srd-tag-converter.d.ts +0 -21
- package/dist/dnd/srd-tag-converter.js +1 -12
- package/dist/dnd/tag-grammar.js +1 -12
- package/dist/dnd/warn-once.js +1 -8
- package/dist/encounter/encounter.ai-schema.js +1 -8
- package/dist/entities/base-item-resolver.d.ts +0 -26
- package/dist/entities/base-item-resolver.js +1 -11
- package/dist/entities/registry-revision.d.ts +10 -0
- package/dist/entities/registry-revision.js +1 -0
- package/dist/entities/slug.d.ts +1 -31
- package/dist/entities/slug.js +1 -12
- package/dist/entities/wikilink-display.d.ts +0 -2
- package/dist/entities/wikilink-display.js +1 -10
- package/dist/feat/feat.category-codes.d.ts +1 -26
- package/dist/feat/feat.category-codes.js +1 -14
- package/dist/feat/feat.codec.d.ts +0 -6
- package/dist/feat/feat.codec.js +1 -12
- package/dist/feat/feat.parser.js +1 -11
- package/dist/feat/feat.schema.d.ts +31 -1
- package/dist/feat/feat.schema.js +1 -10
- package/dist/feat/feat.types.d.ts +0 -6
- package/dist/index.js +45 -138113
- package/dist/inline-tag-parser.js +1 -6
- package/dist/item/item.actions-map.d.ts +4 -63
- package/dist/item/item.actions-map.js +1 -10
- package/dist/item/item.ai-schema.js +1 -6
- package/dist/item/item.attunement.d.ts +0 -14
- package/dist/item/item.attunement.js +1 -6
- package/dist/item/item.bonuses.js +1 -10
- package/dist/item/item.codec.js +1 -9
- package/dist/item/item.conditions.d.ts +0 -7
- package/dist/item/item.conditions.js +1 -11
- package/dist/item/item.conditions.types.d.ts +0 -2
- package/dist/item/item.cost.js +1 -29
- package/dist/item/item.enrichment.js +1 -9
- package/dist/item/item.icon.d.ts +0 -8
- package/dist/item/item.icon.js +1 -211
- package/dist/item/item.parser.js +1 -8
- package/dist/item/item.schema.d.ts +2 -0
- package/dist/item/item.schema.js +1 -11
- package/dist/item/item.types.d.ts +2 -28
- package/dist/monster/monster.ai-schema.js +1 -6
- package/dist/monster/monster.codec.d.ts +0 -10
- package/dist/monster/monster.enrichment.js +1 -19
- package/dist/monster/monster.format.d.ts +0 -69
- package/dist/monster/monster.format.js +1 -78
- package/dist/monster/monster.parser.d.ts +0 -4
- package/dist/monster/monster.parser.js +1 -15
- package/dist/monster/monster.resolve.d.ts +0 -4
- package/dist/monster/monster.schema.d.ts +0 -9
- package/dist/monster/monster.schema.js +1 -34
- package/dist/monster/monster.types.d.ts +0 -3
- package/dist/monster/monster.types.js +1 -1
- package/dist/optional-feature/optional-feature.codec.d.ts +0 -11
- package/dist/optional-feature/optional-feature.codec.js +1 -13
- package/dist/optional-feature/optional-feature.parser.js +1 -12
- package/dist/optional-feature/optional-feature.schema.d.ts +30 -1
- package/dist/optional-feature/optional-feature.schema.js +1 -15
- package/dist/pack.d.ts +0 -9
- package/dist/pc/conditions.constants.js +1 -6
- package/dist/pc/decision-recognizer.js +1 -8
- package/dist/pc/pc.additional-spells.d.ts +4 -14
- package/dist/pc/pc.additional-spells.js +1 -23
- package/dist/pc/pc.amount-bindings.d.ts +4 -20
- package/dist/pc/pc.amount-bindings.js +1 -23
- package/dist/pc/pc.asi-flatten.d.ts +0 -59
- package/dist/pc/pc.asi-flatten.js +1 -16
- package/dist/pc/pc.conditions.d.ts +1 -0
- package/dist/pc/pc.conditions.js +1 -6
- package/dist/pc/pc.containment.d.ts +0 -5
- package/dist/pc/pc.containment.js +1 -24
- package/dist/pc/pc.decision-engine.d.ts +4 -141
- package/dist/pc/pc.decision-engine.js +1 -52
- package/dist/pc/pc.defense-normalize.d.ts +0 -10
- package/dist/pc/pc.defense-normalize.js +1 -6
- package/dist/pc/pc.entry-overrides.d.ts +0 -58
- package/dist/pc/pc.entry-overrides.js +1 -40
- package/dist/pc/pc.equipment.d.ts +2 -22
- package/dist/pc/pc.equipment.js +1 -33
- package/dist/pc/pc.feature-effects.d.ts +23 -275
- package/dist/pc/pc.feature-effects.js +1 -26
- package/dist/pc/pc.formula-context.js +1 -11
- package/dist/pc/pc.infusions.d.ts +0 -65
- package/dist/pc/pc.infusions.js +1 -64
- package/dist/pc/pc.item-effects.d.ts +18 -0
- package/dist/pc/pc.member-choices.d.ts +18 -49
- package/dist/pc/pc.member-choices.js +1 -32
- package/dist/pc/pc.parser.js +1 -58
- package/dist/pc/pc.pools.d.ts +7 -10
- package/dist/pc/pc.pools.js +1 -26
- package/dist/pc/pc.proficiencies.d.ts +7 -33
- package/dist/pc/pc.proficiencies.js +1 -107
- package/dist/pc/pc.proficiency-grants.d.ts +0 -26
- package/dist/pc/pc.proficiency-normalize.d.ts +4 -25
- package/dist/pc/pc.proficiency-normalize.js +1 -12
- package/dist/pc/pc.proficiency-query.d.ts +0 -13
- package/dist/pc/pc.proficiency-query.js +1 -27
- package/dist/pc/pc.recalc.d.ts +7 -131
- package/dist/pc/pc.recalc.js +1 -946
- package/dist/pc/pc.resolver.d.ts +0 -104
- package/dist/pc/pc.resolver.js +1 -59
- package/dist/pc/pc.resource-seed.d.ts +0 -8
- package/dist/pc/pc.resource-seed.js +1 -42
- package/dist/pc/pc.resources.d.ts +1 -59
- package/dist/pc/pc.resources.js +1 -23
- package/dist/pc/pc.rest.d.ts +1 -20
- package/dist/pc/pc.rest.js +1 -230
- package/dist/pc/pc.schema.d.ts +19 -2
- package/dist/pc/pc.schema.js +1 -9
- package/dist/pc/pc.slotting.d.ts +0 -29
- package/dist/pc/pc.slotting.js +1 -28
- package/dist/pc/pc.speeds.d.ts +19 -0
- package/dist/pc/pc.spell-scope.d.ts +6 -0
- package/dist/pc/pc.spellcasting.d.ts +0 -70
- package/dist/pc/pc.spellcasting.js +1 -28
- package/dist/pc/pc.table-column.d.ts +0 -22
- package/dist/pc/pc.table-column.js +1 -18
- package/dist/pc/pc.tool-picks.d.ts +0 -27
- package/dist/pc/pc.tool-picks.js +1 -18
- package/dist/pc/pc.types.d.ts +85 -344
- package/dist/pc/pc.weapon-grant.d.ts +0 -6
- package/dist/pc/pool-layout.d.ts +0 -39
- package/dist/pc/pool-layout.js +1 -18
- package/dist/pc/resource-equivalents.d.ts +2 -40
- package/dist/pc/roll-scope.js +1 -8
- package/dist/pc/roll-tag-labels.d.ts +0 -32
- package/dist/pc/roll-tag-labels.js +1 -17
- package/dist/pc/spell-source.d.ts +0 -11
- package/dist/pc/spell-source.js +1 -8
- package/dist/race/race.codec.d.ts +0 -6
- package/dist/race/race.codec.js +1 -15
- package/dist/race/race.parser.js +1 -14
- package/dist/race/race.schema.d.ts +0 -8
- package/dist/race/race.schema.js +1 -14
- package/dist/race/race.structural.d.ts +0 -6
- package/dist/race/race.structural.js +1 -6
- package/dist/race/race.types.d.ts +0 -8
- package/dist/schemas/attack-schema.d.ts +5 -0
- package/dist/schemas/caster-type-schema.d.ts +1 -6
- package/dist/schemas/caster-type-schema.js +1 -6
- package/dist/schemas/choice-schema.js +1 -7
- package/dist/schemas/duration-schema.d.ts +0 -2
- package/dist/schemas/duration-schema.js +1 -6
- package/dist/schemas/entity-extras-schema.d.ts +0 -30
- package/dist/schemas/entity-extras-schema.js +1 -10
- package/dist/schemas/equipment-grant-schema.d.ts +0 -2
- package/dist/schemas/equipment-grant-schema.js +1 -12
- package/dist/schemas/feature-alias.d.ts +0 -27
- package/dist/schemas/feature-effect-schema.d.ts +30 -1
- package/dist/schemas/feature-effect-schema.js +1 -6
- package/dist/schemas/feature-schema.d.ts +0 -6
- package/dist/schemas/feature-schema.js +1 -12
- package/dist/schemas/resource-schema.d.ts +1 -34
- package/dist/schemas/resource-schema.js +1 -12
- package/dist/schemas/selection-pool-schema.js +1 -10
- package/dist/spell/casting-time.d.ts +0 -15
- package/dist/spell/casting-time.js +1 -6
- package/dist/spell/spell.access.d.ts +0 -6
- package/dist/spell/spell.access.js +1 -45
- package/dist/spell/spell.ai-schema.js +1 -6
- package/dist/spell/spell.codec.js +1 -9
- package/dist/spell/spell.enrichment.js +1 -9
- package/dist/spell/spell.filter.d.ts +0 -5
- package/dist/spell/spell.filter.js +1 -75
- package/dist/spell/spell.parser.d.ts +0 -31
- package/dist/spell/spell.parser.js +1 -16
- package/dist/spell/spell.scaling.d.ts +0 -46
- package/dist/spell/spell.scaling.js +1 -79
- package/dist/spell/spell.schema.js +1 -7
- package/dist/spell/spell.types.d.ts +0 -7
- package/dist/srd/retired-items.d.ts +0 -4
- package/dist/srd/retired-items.js +1 -11
- package/dist/srd-store.d.ts +0 -33
- package/dist/subclass/subclass.codec.d.ts +0 -8
- package/dist/subclass/subclass.codec.js +1 -17
- package/dist/subclass/subclass.parser.js +1 -16
- package/dist/subclass/subclass.schema.d.ts +2 -1
- package/dist/subclass/subclass.schema.js +1 -14
- package/dist/subclass/subclass.types.d.ts +0 -3
- package/dist/types/attack.d.ts +2 -0
- package/dist/types/casting-option.d.ts +0 -4
- package/dist/types/choice.d.ts +1 -72
- package/dist/types/choice.js +1 -24
- package/dist/types/edition.d.ts +0 -3
- package/dist/types/equipment-grant.d.ts +1 -27
- package/dist/types/equipment-grant.js +1 -12
- package/dist/types/feature-effect.d.ts +14 -14
- package/dist/types/feature.d.ts +0 -22
- package/dist/types/optional-feature.types.d.ts +1 -31
- package/dist/types/resource.d.ts +1 -21
- package/dist/types/selection-pool.d.ts +0 -24
- package/dist/weapon/weapon-mastery.d.ts +0 -1
- package/dist/weapon/weapon.classify.d.ts +0 -11
- package/dist/weapon/weapon.classify.js +1 -7
- package/dist/weapon/weapon.codec.d.ts +0 -9
- package/dist/weapon/weapon.codec.js +1 -9
- package/dist/weapon/weapon.parser.js +1 -8
- package/dist/weapon/weapon.schema.js +1 -7
- package/dist/weapon/weapon.types.d.ts +0 -3
- package/package.json +3 -3
- package/src/data-srd/ATTRIBUTION.md +1 -1
- package/dist/chunk-2FRUSVZS.js +0 -489
- package/dist/chunk-2JSQE3DD.js +0 -206
- package/dist/chunk-2LULMQTF.js +0 -14
- package/dist/chunk-2UDSN6VW.js +0 -18
- package/dist/chunk-3LWMFYKS.js +0 -57
- package/dist/chunk-3MGQFFNE.js +0 -110
- package/dist/chunk-3TM34RSJ.js +0 -23
- package/dist/chunk-3VZZDKRA.js +0 -1014
- package/dist/chunk-4U55VNC7.js +0 -22
- package/dist/chunk-5GKJAUMX.js +0 -59
- package/dist/chunk-5MXFW4O3.js +0 -71
- package/dist/chunk-656QCX4U.js +0 -22
- package/dist/chunk-6EI737IO.js +0 -19
- package/dist/chunk-6GNXYAYP.js +0 -25
- package/dist/chunk-6PXTNCBP.js +0 -133
- package/dist/chunk-6X2NV665.js +0 -33
- package/dist/chunk-7ATNGKBS.js +0 -178
- package/dist/chunk-7Q2VPKCD.js +0 -181
- package/dist/chunk-7QN7XSAK.js +0 -19
- package/dist/chunk-A54HHCWW.js +0 -67
- package/dist/chunk-AZRGFUSR.js +0 -18
- package/dist/chunk-B3DP42OM.js +0 -55
- package/dist/chunk-CJYCVNW2.js +0 -7
- package/dist/chunk-CM5CWO4K.js +0 -735
- package/dist/chunk-DEEHHLAP.js +0 -271
- package/dist/chunk-DOXSFYLH.js +0 -158
- package/dist/chunk-DPUJDOKV.js +0 -365
- package/dist/chunk-EJP263OP.js +0 -186
- package/dist/chunk-EVMUJYUD.js +0 -195
- package/dist/chunk-EYX4JMAU.js +0 -101
- package/dist/chunk-FANQVQ3D.js +0 -89
- package/dist/chunk-FC4IGH5Y.js +0 -18
- package/dist/chunk-G6MHJDVT.js +0 -41
- package/dist/chunk-G6PBI2BU.js +0 -18
- package/dist/chunk-H5PTKYXL.js +0 -101
- package/dist/chunk-HHBD4SQ6.js +0 -24
- package/dist/chunk-HS6FIOLP.js +0 -52
- package/dist/chunk-HTYMW5CH.js +0 -228
- package/dist/chunk-IHE6KVC3.js +0 -13
- package/dist/chunk-IN4M4X7P.js +0 -34
- package/dist/chunk-IUAAXXNO.js +0 -58
- package/dist/chunk-JCMUVZIK.js +0 -133
- package/dist/chunk-JSM6JFZR.js +0 -709
- package/dist/chunk-K5NJBTE2.js +0 -18
- package/dist/chunk-KR6JF3BF.js +0 -14
- package/dist/chunk-KSTV7J2U.js +0 -112
- package/dist/chunk-KU3YLF6D.js +0 -106
- package/dist/chunk-LBEXLN6I.js +0 -91
- package/dist/chunk-LF5AGJA4.js +0 -81
- package/dist/chunk-LHZXYFBU.js +0 -94
- package/dist/chunk-LSLSG67V.js +0 -31
- package/dist/chunk-LVQLWRCU.js +0 -15
- package/dist/chunk-MBX25B6D.js +0 -18
- package/dist/chunk-MYY2C5MB.js +0 -233
- package/dist/chunk-OFCSP6MT.js +0 -23
- package/dist/chunk-ONTGZR5T.js +0 -1806
- package/dist/chunk-OOSRUJBI.js +0 -19
- package/dist/chunk-PDJSUH24.js +0 -110
- package/dist/chunk-PKX6TGRE.js +0 -93
- package/dist/chunk-PQZ4LM4Z.js +0 -19
- package/dist/chunk-PTXBIDG7.js +0 -63
- package/dist/chunk-PVCEA4HZ.js +0 -6
- package/dist/chunk-PXVNAY7T.js +0 -84
- package/dist/chunk-QH36K2PU.js +0 -158
- package/dist/chunk-QS5L5YTJ.js +0 -24
- package/dist/chunk-QYZV2MQA.js +0 -97
- package/dist/chunk-QZSWN2KT.js +0 -18
- package/dist/chunk-RLGQ5PZZ.js +0 -16
- package/dist/chunk-RYLXAYIQ.js +0 -18
- package/dist/chunk-S3YUXDSC.js +0 -278
- package/dist/chunk-S7REMWW4.js +0 -21
- package/dist/chunk-T6QIF5XR.js +0 -348
- package/dist/chunk-TOM66P2P.js +0 -38
- package/dist/chunk-TULQ4FFX.js +0 -353
- package/dist/chunk-UA5KS2PL.js +0 -26
- package/dist/chunk-UUBJCNQU.js +0 -187
- package/dist/chunk-UZXG6QSY.js +0 -58
- package/dist/chunk-VPYBK2MG.js +0 -18
- package/dist/chunk-VRV3NNTA.js +0 -161
- package/dist/chunk-VTTA2ALZ.js +0 -16
- package/dist/chunk-W6GC6OKK.js +0 -16
- package/dist/chunk-WELIKLZF.js +0 -256
- package/dist/chunk-WSVMLNTO.js +0 -31
- package/dist/chunk-WYGD2UGN.js +0 -14
- package/dist/chunk-XCFC7LGF.js +0 -122
- package/dist/chunk-XJ2F2WO6.js +0 -8
- package/dist/chunk-Y5VVP73C.js +0 -23
- package/dist/chunk-YBLDE5CG.js +0 -42
- package/dist/chunk-YD2VAHA6.js +0 -159
- package/dist/chunk-YDGMBMYI.js +0 -25
- package/dist/chunk-YHYTW5QA.js +0 -20
- package/dist/chunk-YKL6SHRJ.js +0 -23
- package/dist/chunk-ZCTUYGNV.js +0 -26
- package/dist/chunk-ZDAEGJH4.js +0 -102
- package/dist/chunk-ZJXSXVFP.js +0 -58
- package/dist/chunk-ZUQW5VBZ.js +0 -89
package/dist/chunk-YD2VAHA6.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
durationSchema
|
|
3
|
-
} from "./chunk-WYGD2UGN.js";
|
|
4
|
-
import {
|
|
5
|
-
actionCostEnum,
|
|
6
|
-
resourceConsumptionSchema,
|
|
7
|
-
resourceSchema
|
|
8
|
-
} from "./chunk-ZJXSXVFP.js";
|
|
9
|
-
import {
|
|
10
|
-
choiceSchema
|
|
11
|
-
} from "./chunk-5MXFW4O3.js";
|
|
12
|
-
import {
|
|
13
|
-
featureEffectSchema
|
|
14
|
-
} from "./chunk-2JSQE3DD.js";
|
|
15
|
-
|
|
16
|
-
// src/schemas/feature-schema.ts
|
|
17
|
-
import { z as z2 } from "zod";
|
|
18
|
-
|
|
19
|
-
// src/schemas/attack-schema.ts
|
|
20
|
-
import { z } from "zod";
|
|
21
|
-
var abilityEnum = z.enum(["str", "dex", "con", "int", "wis", "cha"]);
|
|
22
|
-
var attackSchema = z.object({
|
|
23
|
-
name: z.string().min(1),
|
|
24
|
-
type: z.enum(["melee", "ranged", "spell"]),
|
|
25
|
-
ability: z.union([abilityEnum, z.array(abilityEnum).nonempty()]).optional(),
|
|
26
|
-
damage: z.string().optional(),
|
|
27
|
-
damage_type: z.string().optional(),
|
|
28
|
-
action: z.enum(["action", "bonus-action", "reaction"]).optional(),
|
|
29
|
-
properties: z.array(z.string()).optional(),
|
|
30
|
-
range: z.object({
|
|
31
|
-
normal: z.number().int().nonnegative().optional(),
|
|
32
|
-
long: z.number().int().nonnegative().optional(),
|
|
33
|
-
reach: z.number().int().nonnegative().optional()
|
|
34
|
-
}).optional(),
|
|
35
|
-
condition: z.string().optional(),
|
|
36
|
-
// R4-G6 §5: declared on the `Attack` interface since the monster port, stripped by this schema until now.
|
|
37
|
-
// Monsters are the only carriers (8,176 bonuses, 1,796 extra-damage riders in the converter corpus).
|
|
38
|
-
bonus: z.number().optional(),
|
|
39
|
-
extra_damage: z.object({ dice: z.string(), type: z.string() }).optional()
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
// src/schemas/feature-schema.ts
|
|
43
|
-
var companionSchema = z2.object({
|
|
44
|
-
statblock: z2.string().optional(),
|
|
45
|
-
statblock_wikilink: z2.string().nullable().optional(),
|
|
46
|
-
count: z2.string().optional(),
|
|
47
|
-
count_scaling: z2.array(z2.object({
|
|
48
|
-
level: z2.number().optional(),
|
|
49
|
-
count: z2.string().optional(),
|
|
50
|
-
source_quote: z2.string().optional()
|
|
51
|
-
})).optional(),
|
|
52
|
-
shares_action_economy: z2.boolean().optional(),
|
|
53
|
-
turn_order: z2.string().optional(),
|
|
54
|
-
turn_order_source_quote: z2.string().nullable().optional(),
|
|
55
|
-
proficiency_bonus_scaled: z2.array(z2.object({
|
|
56
|
-
stat: z2.string().optional(),
|
|
57
|
-
formula: z2.string().optional(),
|
|
58
|
-
source_quote: z2.string().optional()
|
|
59
|
-
})).optional(),
|
|
60
|
-
lifecycle: z2.object({
|
|
61
|
-
created_by: z2.string().optional(),
|
|
62
|
-
recreate_on: z2.string().nullable().optional(),
|
|
63
|
-
previous_instance_perishes: z2.boolean().nullable().optional(),
|
|
64
|
-
vanishes_if_owner_dies: z2.boolean().nullable().optional(),
|
|
65
|
-
vanishes_after: z2.string().nullable().optional(),
|
|
66
|
-
source_quote: z2.string().optional()
|
|
67
|
-
}).nullable().optional(),
|
|
68
|
-
autonomy: z2.object({
|
|
69
|
-
when: z2.string().optional(),
|
|
70
|
-
behaviour: z2.string().optional(),
|
|
71
|
-
source_quote: z2.string().optional()
|
|
72
|
-
}).nullable().optional(),
|
|
73
|
-
variants: z2.array(z2.object({
|
|
74
|
-
axis: z2.string().optional(),
|
|
75
|
-
choices: z2.array(z2.string()).optional(),
|
|
76
|
-
chosen_at: z2.string().optional(),
|
|
77
|
-
source_quote: z2.string().optional()
|
|
78
|
-
})).optional(),
|
|
79
|
-
base_statblock: z2.string().nullable().optional(),
|
|
80
|
-
overrides: z2.array(z2.object({
|
|
81
|
-
field: z2.string().optional(),
|
|
82
|
-
value: z2.string().optional(),
|
|
83
|
-
source_quote: z2.string().optional()
|
|
84
|
-
})).optional(),
|
|
85
|
-
source_quote: z2.string().optional()
|
|
86
|
-
});
|
|
87
|
-
var featureObjectSchema = z2.lazy(
|
|
88
|
-
() => z2.object({
|
|
89
|
-
id: z2.string().min(1).optional(),
|
|
90
|
-
name: z2.string().min(1),
|
|
91
|
-
description: z2.string().optional(),
|
|
92
|
-
entries: z2.array(z2.string()).optional(),
|
|
93
|
-
choices: z2.array(choiceSchema).optional(),
|
|
94
|
-
grants_resource: z2.string().optional(),
|
|
95
|
-
consumes: resourceConsumptionSchema.optional(),
|
|
96
|
-
attacks: z2.array(attackSchema).optional(),
|
|
97
|
-
action: z2.enum(["action", "bonus-action", "reaction", "free", "special"]).optional(),
|
|
98
|
-
trigger: z2.string().optional(),
|
|
99
|
-
dc_formula: z2.string().optional(),
|
|
100
|
-
effects: z2.array(featureEffectSchema).optional(),
|
|
101
|
-
sub_features: z2.array(featureSchemaTyped).optional(),
|
|
102
|
-
resources: z2.array(resourceSchema).optional(),
|
|
103
|
-
// Phase 3 activatable buffs: a feature flagged `activatable` folds its effects
|
|
104
|
-
// only while its id is present in state.active_buffs. `passive` renders a tag;
|
|
105
|
-
// `duration` is a static label (no live countdown this phase).
|
|
106
|
-
activatable: z2.boolean().optional(),
|
|
107
|
-
passive: z2.boolean().optional(),
|
|
108
|
-
duration: durationSchema.optional(),
|
|
109
|
-
// Converter feature-level keys (164 census strip rows, class 80 + subclass 84; counts per finding 2):
|
|
110
|
-
class_source: z2.string().min(1).optional(),
|
|
111
|
-
// class 646 + subclass 1616 leaves
|
|
112
|
-
rendering_hint: z2.string().optional(),
|
|
113
|
-
// always "" — NEVER .min(1)
|
|
114
|
-
subclass_short_name: z2.string().min(1).optional(),
|
|
115
|
-
// 1616
|
|
116
|
-
subclass_source: z2.string().min(1).optional(),
|
|
117
|
-
// 1616
|
|
118
|
-
header: z2.number().optional(),
|
|
119
|
-
// 1,237 carriers, ALL numbers
|
|
120
|
-
is_class_feature_variant: z2.boolean().optional(),
|
|
121
|
-
gain_subclass_feature: z2.boolean().optional(),
|
|
122
|
-
gain_subclass_feature_has_content: z2.boolean().optional(),
|
|
123
|
-
type: z2.string().min(1).optional(),
|
|
124
|
-
// values {"inset","item"}
|
|
125
|
-
recharge: z2.object({
|
|
126
|
-
// ONE class doc (UA Mystic), FOUR features, ALL
|
|
127
|
-
type: z2.enum(["recharge_on_roll", "per_day", "per_short_rest", "per_long_rest"]),
|
|
128
|
-
// {type:"per_day",param:1..4}
|
|
129
|
-
param: z2.number()
|
|
130
|
-
// tree-wide nested-recharge type census: exactly these
|
|
131
|
-
}).optional(),
|
|
132
|
-
// four members (gate1-r1 f9) = the EXISTING FeatureRecharge type
|
|
133
|
-
// SRD-BUNDLE-side keys (the converter emits NEITHER at feature level; finding 14 — our own
|
|
134
|
-
// generator emits them and featureSchema strips them, losing the SRD Dragonborn Breath Weapon's
|
|
135
|
-
// action cost and save DC). MAPPED since R4-G3a §10: `action_cost` is aliased onto `action` by
|
|
136
|
-
// the race / class / subclass parsers, and `save` renders as the feature card's Save line
|
|
137
|
-
// (`dc_formula` is echoed as TEXT, never evaluated).
|
|
138
|
-
action_cost: actionCostEnum.optional(),
|
|
139
|
-
// ONE vocabulary, imported from schemas/resource-schema
|
|
140
|
-
// (no cycle: resource-schema imports neither; two spellings of a closed enum is the G1a
|
|
141
|
-
// "fifth enum consumer" drift — gate1-r2 NEW-12)
|
|
142
|
-
save: z2.object({ ability: z2.string().min(1), dc_formula: z2.string().min(1) }).optional(),
|
|
143
|
-
// R4-G5 §7 (ruling G5-UR2): DECLARED so the class / subclass / race parsers stop stripping it on the day the
|
|
144
|
-
// G7 re-emit lands. The converter withholds it today (`P9_NOT_EMITTED_FIELDS`), so 0 converted and 0 bundle
|
|
145
|
-
// documents carry it and the census cannot see this key in either state (§12.1); the 47-block cache
|
|
146
|
-
// round-trip in `tests/feature-schema-widening.test.ts` is its instrument.
|
|
147
|
-
companion: companionSchema.optional()
|
|
148
|
-
})
|
|
149
|
-
);
|
|
150
|
-
var featureSchemaTyped = featureObjectSchema.refine(
|
|
151
|
-
(f) => f.description !== void 0 || f.entries !== void 0 && f.entries.length > 0,
|
|
152
|
-
{ message: "feature requires either description or non-empty entries" }
|
|
153
|
-
);
|
|
154
|
-
var featureSchema = featureSchemaTyped;
|
|
155
|
-
|
|
156
|
-
export {
|
|
157
|
-
featureObjectSchema,
|
|
158
|
-
featureSchema
|
|
159
|
-
};
|
package/dist/chunk-YDGMBMYI.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
bareEntitySlug
|
|
3
|
-
} from "./chunk-ZCTUYGNV.js";
|
|
4
|
-
|
|
5
|
-
// src/weapon/weapon.classify.ts
|
|
6
|
-
var PURE_RANGED_THROWN_SLUGS = /* @__PURE__ */ new Set(["dart", "net"]);
|
|
7
|
-
function classifyWeaponRange(weapon) {
|
|
8
|
-
const has = (p) => weapon.properties.some((x) => x === p);
|
|
9
|
-
const isCatRanged = /ranged/.test(weapon.category);
|
|
10
|
-
const pureRanged = isCatRanged && (has("ammunition") || has("loading") || PURE_RANGED_THROWN_SLUGS.has(bareEntitySlug(weapon.slug)));
|
|
11
|
-
if (pureRanged) {
|
|
12
|
-
return {
|
|
13
|
-
melee: null,
|
|
14
|
-
ranged: weapon.range ? { normal: weapon.range.normal, long: weapon.range.long, thrown: false } : null
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
return {
|
|
18
|
-
melee: { reach: 5 + (has("reach") ? 5 : 0) },
|
|
19
|
-
ranged: weapon.range ? { normal: weapon.range.normal, long: weapon.range.long, thrown: true } : null
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
classifyWeaponRange
|
|
25
|
-
};
|
package/dist/chunk-YHYTW5QA.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/pc/decision-recognizer.ts
|
|
2
|
-
var DECISION_SIGNAL = [/\bchoose (one|two|three|a|an)\b/i, /\bof your choice\b/i, /\byour choice of\b/i];
|
|
3
|
-
var ASI_FEAT = { kind: "select-entity", id: "feat", entity_type: "feat", count: 1 };
|
|
4
|
-
var TABLE = {
|
|
5
|
-
"ability-score-improvement": [ASI_FEAT],
|
|
6
|
-
"expertise": [{ kind: "select-proficiency", id: "expertise", count: 2, domain: "skill", from_proficient: true, expertise: true }],
|
|
7
|
-
"fighting-style": [{ kind: "select-entity", id: "fighting-style", count: 1, entity_type: "optional-feature", where: { feature_type: "fighting_style", available_to: "self" } }]
|
|
8
|
-
};
|
|
9
|
-
function recognizeDecision(feature) {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
const slug = ((_a = feature.id) != null ? _a : feature.name).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
|
|
12
|
-
if (TABLE[slug]) return TABLE[slug];
|
|
13
|
-
const desc = (_b = feature.description) != null ? _b : "";
|
|
14
|
-
return DECISION_SIGNAL.some((re) => re.test(desc)) ? "informational" : null;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
DECISION_SIGNAL,
|
|
19
|
-
recognizeDecision
|
|
20
|
-
};
|
package/dist/chunk-YKL6SHRJ.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
aliasFeaturesByLevelActionCost
|
|
3
|
-
} from "./chunk-4U55VNC7.js";
|
|
4
|
-
import {
|
|
5
|
-
classEntitySchema
|
|
6
|
-
} from "./chunk-UUBJCNQU.js";
|
|
7
|
-
|
|
8
|
-
// src/class/class.parser.ts
|
|
9
|
-
import { parseYaml } from "@archivist-gg/core";
|
|
10
|
-
function parseClass(source) {
|
|
11
|
-
const raw = parseYaml(source, ["name", "slug"]);
|
|
12
|
-
if (!raw.success) return raw;
|
|
13
|
-
aliasFeaturesByLevelActionCost(raw.data.features_by_level);
|
|
14
|
-
const result = classEntitySchema.safeParse({ edition: "2014", ...raw.data });
|
|
15
|
-
if (!result.success) {
|
|
16
|
-
return { success: false, error: `class schema validation failed: ${result.error.message}` };
|
|
17
|
-
}
|
|
18
|
-
return { success: true, data: result.data };
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
parseClass
|
|
23
|
-
};
|
package/dist/chunk-ZCTUYGNV.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// src/entities/slug.ts
|
|
2
|
-
function slugify(name) {
|
|
3
|
-
return name.toLowerCase().replace(/[^a-z0-9\s-]/g, "").replace(/[\s]+/g, "-").replace(/-{2,}/g, "-").replace(/^-+|-+$/g, "");
|
|
4
|
-
}
|
|
5
|
-
function bareEntitySlug(slug) {
|
|
6
|
-
if (!slug) return "";
|
|
7
|
-
const p = slug.split("_");
|
|
8
|
-
return p.length >= 3 ? p.slice(2).join("_") : p[p.length - 1];
|
|
9
|
-
}
|
|
10
|
-
var STORED_SLUG = /^[a-z0-9-]+(?:_[a-z0-9-]+)+$/;
|
|
11
|
-
function isStoredSlug(tail) {
|
|
12
|
-
return STORED_SLUG.test(tail);
|
|
13
|
-
}
|
|
14
|
-
function wikilinkTailSlug(link) {
|
|
15
|
-
var _a;
|
|
16
|
-
const inner = link.replace(/^\[\[/, "").replace(/\]\]$/, "");
|
|
17
|
-
const tail = ((_a = inner.split("/").pop()) != null ? _a : inner).trim();
|
|
18
|
-
return isStoredSlug(tail) ? bareEntitySlug(tail) : slugify(tail);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
slugify,
|
|
23
|
-
bareEntitySlug,
|
|
24
|
-
isStoredSlug,
|
|
25
|
-
wikilinkTailSlug
|
|
26
|
-
};
|
package/dist/chunk-ZDAEGJH4.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
imageField
|
|
3
|
-
} from "./chunk-UA5KS2PL.js";
|
|
4
|
-
|
|
5
|
-
// src/spell/spell.schema.ts
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
var castingOptionSchema = z.object({
|
|
8
|
-
type: z.string(),
|
|
9
|
-
damage_roll: z.string().optional(),
|
|
10
|
-
target_count: z.number().optional(),
|
|
11
|
-
duration: z.string().optional(),
|
|
12
|
-
range: z.number().optional(),
|
|
13
|
-
concentration: z.boolean().optional(),
|
|
14
|
-
shape_size: z.number().optional(),
|
|
15
|
-
desc: z.string().optional()
|
|
16
|
-
});
|
|
17
|
-
var spellMaterialSchema = z.union([
|
|
18
|
-
z.boolean(),
|
|
19
|
-
z.string(),
|
|
20
|
-
z.strictObject({
|
|
21
|
-
text: z.string(),
|
|
22
|
-
cost: z.number().optional(),
|
|
23
|
-
consume: z.union([z.boolean(), z.string()]).optional()
|
|
24
|
-
})
|
|
25
|
-
]);
|
|
26
|
-
var spellComponentsObjectSchema = z.strictObject({
|
|
27
|
-
v: z.boolean().optional(),
|
|
28
|
-
s: z.boolean().optional(),
|
|
29
|
-
m: spellMaterialSchema.optional(),
|
|
30
|
-
r: z.boolean().optional()
|
|
31
|
-
});
|
|
32
|
-
var spellDurationEntrySchema = z.discriminatedUnion("type", [
|
|
33
|
-
z.strictObject({
|
|
34
|
-
type: z.literal("permanent"),
|
|
35
|
-
ends: z.array(z.enum(["dispel", "trigger"])).nonempty()
|
|
36
|
-
}),
|
|
37
|
-
z.strictObject({
|
|
38
|
-
type: z.literal("timed"),
|
|
39
|
-
duration: z.strictObject({
|
|
40
|
-
type: z.enum(["minute", "hour"]),
|
|
41
|
-
amount: z.number().int().positive(),
|
|
42
|
-
up_to: z.boolean().optional()
|
|
43
|
-
})
|
|
44
|
-
})
|
|
45
|
-
]);
|
|
46
|
-
var spellEntitySchema = z.object({
|
|
47
|
-
name: z.string().min(1),
|
|
48
|
-
level: z.number().int().min(0).optional(),
|
|
49
|
-
school: z.string().optional(),
|
|
50
|
-
casting_time: z.string().optional(),
|
|
51
|
-
range: z.string().optional(),
|
|
52
|
-
// Union arms per §3.2; `parseSpell` normalises the structured arms back to the corpus's own
|
|
53
|
-
// string form, so `Spell.components` / `Spell.duration` stay `string` and no consumer changes.
|
|
54
|
-
components: z.union([z.string(), spellComponentsObjectSchema]).optional(),
|
|
55
|
-
duration: z.union([z.string(), z.array(spellDurationEntrySchema).nonempty()]).optional(),
|
|
56
|
-
concentration: z.boolean().optional(),
|
|
57
|
-
ritual: z.boolean().optional(),
|
|
58
|
-
classes: z.array(z.string()).optional(),
|
|
59
|
-
description: z.string().optional(),
|
|
60
|
-
at_higher_levels: z.array(z.string()).optional(),
|
|
61
|
-
damage: z.object({ types: z.array(z.string()) }).optional(),
|
|
62
|
-
// The base roll at the spell's own level (a cantrip's tier-1 roll); see `Spell.damage_roll`.
|
|
63
|
-
damage_roll: z.string().optional(),
|
|
64
|
-
saving_throw: z.object({ ability: z.string() }).optional(),
|
|
65
|
-
casting_options: z.array(castingOptionSchema).optional(),
|
|
66
|
-
// §2 · the fourteen converter keys this root refused before R4-G2. Doc counts are MEASURED over
|
|
67
|
-
// the frozen tree; the two zero-carrier keys are declared because the root is `.strict()` and an
|
|
68
|
-
// images-ON run (`image`) or a non-images-gated fluff flag (`has_fluff_images`) would otherwise
|
|
69
|
-
// refuse the whole document. Declared-only: NO rendering this phase (booked to G8 by name).
|
|
70
|
-
rendering_hint: z.string().optional(),
|
|
71
|
-
// 1,048 docs — NEVER .min(1): every value is ''
|
|
72
|
-
misc_tags: z.array(z.string()).optional(),
|
|
73
|
-
// 769
|
|
74
|
-
area_tags: z.array(z.string()).optional(),
|
|
75
|
-
// 707
|
|
76
|
-
condition_inflict: z.array(z.string()).optional(),
|
|
77
|
-
// 194
|
|
78
|
-
affects_creature_type: z.array(z.string()).optional(),
|
|
79
|
-
// 87
|
|
80
|
-
spell_attack: z.enum(["melee", "ranged"]).optional(),
|
|
81
|
-
// 77 (ranged 44 / melee 33)
|
|
82
|
-
ability_check: z.array(z.string()).optional(),
|
|
83
|
-
// 61
|
|
84
|
-
damage_resist: z.array(z.string()).optional(),
|
|
85
|
-
// 35
|
|
86
|
-
damage_immune: z.array(z.string()).optional(),
|
|
87
|
-
// 21
|
|
88
|
-
condition_immune: z.array(z.string()).optional(),
|
|
89
|
-
// 11
|
|
90
|
-
damage_vulnerable: z.array(z.string()).optional(),
|
|
91
|
-
// 2
|
|
92
|
-
has_fluff: z.boolean().optional(),
|
|
93
|
-
// 1
|
|
94
|
-
image: imageField,
|
|
95
|
-
// 0 today; `imageField` already ends .optional()
|
|
96
|
-
has_fluff_images: z.boolean().optional()
|
|
97
|
-
// 0 today
|
|
98
|
-
}).strict();
|
|
99
|
-
|
|
100
|
-
export {
|
|
101
|
-
spellEntitySchema
|
|
102
|
-
};
|
package/dist/chunk-ZJXSXVFP.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// src/schemas/resource-schema.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
var resetTriggerEnum = z.enum(["short-rest", "long-rest", "either", "dawn", "dusk", "turn", "round", "custom"]);
|
|
4
|
-
var actionCostEnum = z.enum(["action", "bonus-action", "reaction", "free", "special"]);
|
|
5
|
-
var resourceSchema = z.object({
|
|
6
|
-
id: z.string().min(1),
|
|
7
|
-
name: z.string().min(1),
|
|
8
|
-
max_formula: z.string().min(1),
|
|
9
|
-
scales_at: z.array(z.object({
|
|
10
|
-
level: z.number().int().positive(),
|
|
11
|
-
max: z.string().min(1)
|
|
12
|
-
}).strict()).optional(),
|
|
13
|
-
die: z.object({
|
|
14
|
-
base: z.string().min(1),
|
|
15
|
-
scaling: z.record(z.string(), z.string()).optional()
|
|
16
|
-
}).optional(),
|
|
17
|
-
reset: resetTriggerEnum,
|
|
18
|
-
consumes: z.object({
|
|
19
|
-
resource: z.string().min(1),
|
|
20
|
-
amount: z.number().int().positive()
|
|
21
|
-
}).optional(),
|
|
22
|
-
/** Presentation, carried and never interpreted by the engine: which control draws this resource, and
|
|
23
|
-
* whether it also appears in the header band. The renderer owns the hint → component table. */
|
|
24
|
-
rendering_hint: z.string().optional(),
|
|
25
|
-
surface: z.enum(["band", "tab"]).optional(),
|
|
26
|
-
recovery: z.array(z.object({
|
|
27
|
-
id: z.string().min(1),
|
|
28
|
-
name: z.string().min(1),
|
|
29
|
-
amount: z.union([z.number(), z.string()]),
|
|
30
|
-
action: actionCostEnum.optional(),
|
|
31
|
-
uses: z.number().int().nonnegative().optional(),
|
|
32
|
-
reset: resetTriggerEnum,
|
|
33
|
-
restores: z.enum(["uses", "spell-slots"]).optional()
|
|
34
|
-
})).optional()
|
|
35
|
-
});
|
|
36
|
-
var resourceConsumptionSchema = z.object({
|
|
37
|
-
source: z.enum(["resource", "class-column", "attack-dice", "spell-slots"]).optional(),
|
|
38
|
-
resource: z.string().optional(),
|
|
39
|
-
column: z.string().optional(),
|
|
40
|
-
amount: z.number().int().positive(),
|
|
41
|
-
amount_max: z.number().int().positive().optional(),
|
|
42
|
-
expend_condition: z.enum(["roll_succeeds", "roll_fails", "target_takes_damage", "always"]).optional(),
|
|
43
|
-
free_uses: z.object({
|
|
44
|
-
amount: z.number().int().positive(),
|
|
45
|
-
reset: resetTriggerEnum,
|
|
46
|
-
state_key: z.string().optional()
|
|
47
|
-
}).optional()
|
|
48
|
-
}).refine((c) => c.amount_max === void 0 || c.amount_max >= c.amount, {
|
|
49
|
-
path: ["amount_max"],
|
|
50
|
-
message: "amount_max must be >= amount"
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
export {
|
|
54
|
-
resetTriggerEnum,
|
|
55
|
-
actionCostEnum,
|
|
56
|
-
resourceSchema,
|
|
57
|
-
resourceConsumptionSchema
|
|
58
|
-
};
|
package/dist/chunk-ZUQW5VBZ.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// src/item/item.actions-map.ts
|
|
2
|
-
var ITEM_ACTIONS = {
|
|
3
|
-
// Wands and rods
|
|
4
|
-
"wand-of-fireballs": { cost: "action", range: "150 ft.", max_charges: 7, recovery: { amount: "1d6+1", reset: "dawn" } },
|
|
5
|
-
"wand-of-magic-missiles": { cost: "action", range: "120 ft.", max_charges: 7, recovery: { amount: "1d6+1", reset: "dawn" } },
|
|
6
|
-
"wand-of-lightning-bolts": { cost: "action", range: "100 ft.", max_charges: 7, recovery: { amount: "1d6+1", reset: "dawn" } },
|
|
7
|
-
"wand-of-paralysis": { cost: "action", range: "60 ft.", max_charges: 7, recovery: { amount: "1d6+1", reset: "dawn" } },
|
|
8
|
-
"wand-of-fear": { cost: "action", range: "Self", max_charges: 7, recovery: { amount: "1d6+1", reset: "dawn" } },
|
|
9
|
-
"wand-of-binding": { cost: "action", range: "Self", max_charges: 7, recovery: { amount: "1d6+1", reset: "dawn" } },
|
|
10
|
-
"wand-of-secrets": { cost: "action", range: "30 ft.", max_charges: 3, recovery: { amount: "1d3", reset: "dawn" } },
|
|
11
|
-
"wand-of-web": { cost: "action", range: "60 ft.", max_charges: 7, recovery: { amount: "1d6+1", reset: "dawn" } },
|
|
12
|
-
"wand-of-wonder": { cost: "action", range: "120 ft.", max_charges: 7, recovery: { amount: "1d6+1", reset: "dawn" } },
|
|
13
|
-
// Activatable wondrous items
|
|
14
|
-
"boots-of-speed": { cost: "bonus-action", range: "Self", max_charges: 1, recovery: { amount: "1", reset: "long" } },
|
|
15
|
-
"boots-of-levitation": { cost: "action", range: "Self" },
|
|
16
|
-
"boots-of-striding-and-springing": { cost: "free", range: "Self" },
|
|
17
|
-
"broom-of-flying": { cost: "action", range: "Touch" },
|
|
18
|
-
"cloak-of-displacement": { cost: "free", range: "Self" },
|
|
19
|
-
"cloak-of-the-bat": { cost: "action", range: "Self", max_charges: 1, recovery: { amount: "1", reset: "long" } },
|
|
20
|
-
"decanter-of-endless-water": { cost: "action", range: "Touch" },
|
|
21
|
-
"drum-of-panic": { cost: "action", range: "120 ft.", max_charges: 1, recovery: { amount: "1", reset: "long" } },
|
|
22
|
-
"eyes-of-charming": { cost: "action", range: "30 ft.", max_charges: 3, recovery: { amount: "3", reset: "dawn" } },
|
|
23
|
-
// Rings
|
|
24
|
-
"ring-of-three-wishes": { cost: "action", range: "Self", max_charges: 3, recovery: { amount: "0", reset: "special" } },
|
|
25
|
-
"ring-of-shooting-stars": { cost: "action", range: "60 ft.", max_charges: 6, recovery: { amount: "1d6", reset: "dawn" } },
|
|
26
|
-
"ring-of-the-ram": { cost: "action", range: "60 ft.", max_charges: 3, recovery: { amount: "1d3", reset: "dawn" } },
|
|
27
|
-
"ring-of-spell-storing": { cost: "action", range: "Self", max_charges: 5 },
|
|
28
|
-
"ring-of-animal-influence": { cost: "action", range: "Self", max_charges: 3, recovery: { amount: "1d3", reset: "dawn" } },
|
|
29
|
-
"ring-of-elemental-command": { cost: "action", range: "Self", max_charges: 5, recovery: { amount: "1d4+1", reset: "dawn" } },
|
|
30
|
-
"ring-of-evasion": { cost: "reaction", range: "Self", max_charges: 3, recovery: { amount: "1d3", reset: "dawn" } },
|
|
31
|
-
// Necklaces
|
|
32
|
-
"necklace-of-fireballs": { cost: "action", range: "60 ft.", max_charges: 9 },
|
|
33
|
-
// Gems
|
|
34
|
-
"gem-of-brightness": { cost: "action", range: "60 ft.", max_charges: 50 },
|
|
35
|
-
"gem-of-seeing": { cost: "action", range: "Self", max_charges: 3, recovery: { amount: "1d3", reset: "dawn" } },
|
|
36
|
-
// Helms
|
|
37
|
-
"helm-of-teleportation": { cost: "action", range: "Self", max_charges: 3, recovery: { amount: "1d3", reset: "dawn" } },
|
|
38
|
-
// Medallions
|
|
39
|
-
"medallion-of-thoughts": { cost: "action", range: "30 ft.", max_charges: 3, recovery: { amount: "1d3", reset: "dawn" } },
|
|
40
|
-
// Pipes
|
|
41
|
-
"pipes-of-haunting": { cost: "action", range: "30 ft.", max_charges: 3, recovery: { amount: "1d3", reset: "dawn" } },
|
|
42
|
-
"pipes-of-the-sewers": { cost: "action", range: "Self", max_charges: 3, recovery: { amount: "1d3", reset: "dawn" } },
|
|
43
|
-
// Cubes / chimes
|
|
44
|
-
"cube-of-force": { cost: "action", range: "Self", max_charges: 36, recovery: { amount: "1d20", reset: "dawn" } },
|
|
45
|
-
"chime-of-opening": { cost: "action", range: "120 ft.", max_charges: 10 },
|
|
46
|
-
// Magic weapons with activation actions (surface in items table only via override; weapons table is primary)
|
|
47
|
-
"sun-blade": { cost: "free", range: "Self" },
|
|
48
|
-
// Potions / consumables · consumed on use (user ruling 2026-09-24): using one spends the entry's quantity, so they
|
|
49
|
-
// carry no charges or recovery. 2024 healing potions are a Bonus Action to drink/administer (the type=potion
|
|
50
|
-
// default covers uncurated ones).
|
|
51
|
-
"potion-of-healing": { cost: "bonus-action", range: "Self", consumed: true },
|
|
52
|
-
"potion-of-greater-healing": { cost: "bonus-action", range: "Self", consumed: true },
|
|
53
|
-
"potion-of-superior-healing": { cost: "bonus-action", range: "Self", consumed: true },
|
|
54
|
-
"potion-of-supreme-healing": { cost: "bonus-action", range: "Self", consumed: true },
|
|
55
|
-
"alchemists-fire": { cost: "action", range: "20 ft.", consumed: true },
|
|
56
|
-
"holy-water": { cost: "action", range: "20 ft.", consumed: true },
|
|
57
|
-
// Oils are APPLIED (minutes), not drunk: curated to "action" so the blanket
|
|
58
|
-
// type=potion → bonus-action default never mislabels these mis-typed items.
|
|
59
|
-
"oil-of-sharpness": { cost: "action", range: "Self", consumed: true },
|
|
60
|
-
"oil-of-etherealness": { cost: "action", range: "Self", consumed: true },
|
|
61
|
-
"oil-of-slipperiness": { cost: "action", range: "Self", consumed: true },
|
|
62
|
-
"dust-of-disappearance": { cost: "action", range: "Self", consumed: true }
|
|
63
|
-
};
|
|
64
|
-
function findItemAction(slug) {
|
|
65
|
-
if (slug in ITEM_ACTIONS) return ITEM_ACTIONS[slug];
|
|
66
|
-
const p = slug.split("_");
|
|
67
|
-
const bare = p.length >= 3 ? p.slice(2).join("_") : p[p.length - 1];
|
|
68
|
-
return bare === slug ? void 0 : ITEM_ACTIONS[bare];
|
|
69
|
-
}
|
|
70
|
-
function resolveItemAction(slug, entry, itemType, opts) {
|
|
71
|
-
var _a, _b, _c, _d, _e, _f;
|
|
72
|
-
const curated = (_a = findItemAction(slug)) != null ? _a : null;
|
|
73
|
-
const override = (opts == null ? void 0 : opts.weaponLike) ? void 0 : entry.overrides;
|
|
74
|
-
const overrideCost = override == null ? void 0 : override.action;
|
|
75
|
-
const overrideRange = override == null ? void 0 : override.range;
|
|
76
|
-
const viewEntity = (_b = opts == null ? void 0 : opts.view) == null ? void 0 : _b.entity;
|
|
77
|
-
const viewAction = viewEntity == null ? void 0 : viewEntity.action;
|
|
78
|
-
const viewRange = viewEntity == null ? void 0 : viewEntity.range;
|
|
79
|
-
const typeDefault = itemType === "potion" ? "bonus-action" : itemType === "scroll" ? (_c = opts == null ? void 0 : opts.spellCost) != null ? _c : "action" : void 0;
|
|
80
|
-
const cost = (_e = (_d = overrideCost != null ? overrideCost : viewAction) != null ? _d : curated == null ? void 0 : curated.cost) != null ? _e : typeDefault;
|
|
81
|
-
if (!cost) return null;
|
|
82
|
-
return { cost, range: (_f = overrideRange != null ? overrideRange : viewRange) != null ? _f : curated == null ? void 0 : curated.range };
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export {
|
|
86
|
-
ITEM_ACTIONS,
|
|
87
|
-
findItemAction,
|
|
88
|
-
resolveItemAction
|
|
89
|
-
};
|