@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-3VZZDKRA.js
DELETED
|
@@ -1,1014 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseCastingTime
|
|
3
|
-
} from "./chunk-W6GC6OKK.js";
|
|
4
|
-
import {
|
|
5
|
-
derivePoolLayout
|
|
6
|
-
} from "./chunk-B3DP42OM.js";
|
|
7
|
-
import {
|
|
8
|
-
readTableColumn
|
|
9
|
-
} from "./chunk-IUAAXXNO.js";
|
|
10
|
-
import {
|
|
11
|
-
requiresAttunement
|
|
12
|
-
} from "./chunk-IHE6KVC3.js";
|
|
13
|
-
import {
|
|
14
|
-
defaultSlotForType,
|
|
15
|
-
effectiveArmor,
|
|
16
|
-
isItemEntity,
|
|
17
|
-
isShieldArmor,
|
|
18
|
-
resolveEntityForEntry,
|
|
19
|
-
slotAcTerms
|
|
20
|
-
} from "./chunk-LHZXYFBU.js";
|
|
21
|
-
import {
|
|
22
|
-
findItemAction,
|
|
23
|
-
resolveItemAction
|
|
24
|
-
} from "./chunk-ZUQW5VBZ.js";
|
|
25
|
-
import {
|
|
26
|
-
warnOnce
|
|
27
|
-
} from "./chunk-LVQLWRCU.js";
|
|
28
|
-
import {
|
|
29
|
-
keptSlugFor,
|
|
30
|
-
resolveBaseItem
|
|
31
|
-
} from "./chunk-CM5CWO4K.js";
|
|
32
|
-
import {
|
|
33
|
-
bareEntitySlug,
|
|
34
|
-
slugify,
|
|
35
|
-
wikilinkTailSlug
|
|
36
|
-
} from "./chunk-ZCTUYGNV.js";
|
|
37
|
-
import {
|
|
38
|
-
parseInlineTag
|
|
39
|
-
} from "./chunk-3TM34RSJ.js";
|
|
40
|
-
import {
|
|
41
|
-
isCanonicalDamageType
|
|
42
|
-
} from "./chunk-PDJSUH24.js";
|
|
43
|
-
|
|
44
|
-
// src/pc/resource-equivalents.ts
|
|
45
|
-
var RESOURCE_EQUIVALENTS = [
|
|
46
|
-
{ name: "Superiority Dice", ids: ["fighter:superiority-dice", "fighter-2024:superiority-dice"] },
|
|
47
|
-
{ name: "Sorcery Points", ids: ["sorcerer:sorcery-point", "sorcerer:sorcery-points", "sorcerer-2024:sorcery-point"] },
|
|
48
|
-
{ name: "Ki / Focus Points", ids: ["monk:ki", "monk:ki-points", "monk:focus-point", "monk:focus-points"] },
|
|
49
|
-
{ name: "Channel Divinity (Cleric)", ids: ["cleric:channel-divinity", "cleric-2024:channel-divinity", "channel-divinity"] },
|
|
50
|
-
{ name: "Channel Divinity (Paladin)", ids: ["paladin:channel-divinity", "paladin-2024:channel-divinity", "channel-divinity"] },
|
|
51
|
-
{ name: "Bardic Inspiration", ids: ["bard:bardic-inspiration", "bard:bardic-die"] },
|
|
52
|
-
{ name: "Rage", ids: ["barbarian:rage", "barbarian:rages", "barbarian-2024:rages"] },
|
|
53
|
-
{ name: "Wild Shape", ids: ["druid:wild-shape", "druid-2024:wild-shape"] },
|
|
54
|
-
{ name: "Soul Trinkets", ids: ["rogue:soul-trinket", "rogue-2024:soul-trinket"] }
|
|
55
|
-
];
|
|
56
|
-
function equivalentResourceIds(id, groups = RESOURCE_EQUIVALENTS) {
|
|
57
|
-
const out = [];
|
|
58
|
-
for (const g of groups) {
|
|
59
|
-
if (!g.ids.includes(id)) continue;
|
|
60
|
-
for (const other of g.ids) if (other !== id && !out.includes(other)) out.push(other);
|
|
61
|
-
}
|
|
62
|
-
return out;
|
|
63
|
-
}
|
|
64
|
-
function ownedByClass(res, rc) {
|
|
65
|
-
var _a, _b;
|
|
66
|
-
const s = (_a = res == null ? void 0 : res.owner) == null ? void 0 : _a.source;
|
|
67
|
-
if (!s) return false;
|
|
68
|
-
if (s.kind === "class") return s.slug === ((_b = rc.entity) == null ? void 0 : _b.slug);
|
|
69
|
-
if (s.kind === "subclass") return !!rc.subclass && s.slug === rc.subclass.slug;
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
function payingResourceId(id, index, owner, groups = RESOURCE_EQUIVALENTS) {
|
|
73
|
-
const candidates = [id, ...equivalentResourceIds(id, groups)].filter((c) => index.has(c));
|
|
74
|
-
if (candidates.length === 0) return void 0;
|
|
75
|
-
if (owner) {
|
|
76
|
-
const own = candidates.find((c) => ownedByClass(index.get(c), owner));
|
|
77
|
-
if (own) return own;
|
|
78
|
-
}
|
|
79
|
-
return candidates[0];
|
|
80
|
-
}
|
|
81
|
-
function classOfSource(source, classes) {
|
|
82
|
-
var _a, _b;
|
|
83
|
-
if (source.kind === "class") return (_a = classes.find((c) => {
|
|
84
|
-
var _a2;
|
|
85
|
-
return ((_a2 = c.entity) == null ? void 0 : _a2.slug) === source.slug;
|
|
86
|
-
})) != null ? _a : null;
|
|
87
|
-
if (source.kind === "subclass") return (_b = classes.find((c) => {
|
|
88
|
-
var _a2;
|
|
89
|
-
return ((_a2 = c.subclass) == null ? void 0 : _a2.slug) === source.slug;
|
|
90
|
-
})) != null ? _b : null;
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
function bindFeatureConsumers(features, index, classes) {
|
|
94
|
-
return features.map((rf) => {
|
|
95
|
-
const consumes = rf.feature.consumes;
|
|
96
|
-
const id = consumes == null ? void 0 : consumes.resource;
|
|
97
|
-
if (!consumes || typeof id !== "string" || id.length === 0) return rf;
|
|
98
|
-
const payer = payingResourceId(id, index, classOfSource(rf.source, classes));
|
|
99
|
-
if (payer === void 0 || payer === id) return rf;
|
|
100
|
-
return { ...rf, feature: { ...rf.feature, consumes: { ...consumes, resource: payer } } };
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// src/pc/pc.pools.ts
|
|
105
|
-
function levelPrereqMax(d) {
|
|
106
|
-
var _a;
|
|
107
|
-
return ((_a = d.prerequisites) != null ? _a : []).filter((p) => p.kind === "level").reduce((m, p) => Math.max(m, p.min), 0);
|
|
108
|
-
}
|
|
109
|
-
function poolAnchorLevel(entity, pool) {
|
|
110
|
-
let anchorLevel = 1;
|
|
111
|
-
let columnSeen = false;
|
|
112
|
-
for (let l = 1; l <= 20; l++) {
|
|
113
|
-
const c = readTableColumn(entity.table, l, [pool.count.column]);
|
|
114
|
-
if (c != null) columnSeen = true;
|
|
115
|
-
if (c != null && c >= 1) {
|
|
116
|
-
anchorLevel = l;
|
|
117
|
-
break;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
return { anchorLevel, columnSeen };
|
|
121
|
-
}
|
|
122
|
-
function resolvePool(rc, classIndex, pool, registry, index, edition) {
|
|
123
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
124
|
-
const entity = rc.entity;
|
|
125
|
-
const level = rc.level;
|
|
126
|
-
const ownerBare = bareEntitySlug(entity.slug);
|
|
127
|
-
const ownerPrefix = entity.slug.split("_")[0];
|
|
128
|
-
const col = pool.count.column;
|
|
129
|
-
const count = (_a = readTableColumn(entity.table, level, [col])) != null ? _a : 0;
|
|
130
|
-
const { anchorLevel, columnSeen } = poolAnchorLevel(entity, pool);
|
|
131
|
-
if (!columnSeen) {
|
|
132
|
-
warnOnce(
|
|
133
|
-
`pool-column:${pool.id}`,
|
|
134
|
-
`Archivist: pool "${pool.id}" declares count column "${col}", which "${entity.slug}"'s class table carries at no level; the pool resolves count 0 at anchor level 1`
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
const ft = pool.source.where.feature_type;
|
|
138
|
-
const all = registry.search("", "optional-feature", Number.POSITIVE_INFINITY).slice().sort((a, b) => a.name.localeCompare(b.name) || a.slug.localeCompare(b.slug));
|
|
139
|
-
const entryOf = (slug, entity2, compendium) => ({ slug, entity: entity2, ...compendium ? { compendium } : {}, key: slug, param: null, itemBound: isItemBound(entity2) });
|
|
140
|
-
const byBare = /* @__PURE__ */ new Map();
|
|
141
|
-
const candidates = /* @__PURE__ */ new Map();
|
|
142
|
-
for (const e of all) {
|
|
143
|
-
const d = e.data;
|
|
144
|
-
const entry = entryOf(e.slug, d, e.compendium);
|
|
145
|
-
const bare = bareEntitySlug(e.slug);
|
|
146
|
-
byBare.set(bare, entry);
|
|
147
|
-
if (d.feature_type !== ft) continue;
|
|
148
|
-
if (!((_b = d.available_to) != null ? _b : []).some((l) => wikilinkTailSlug(l) === ownerBare)) continue;
|
|
149
|
-
if (levelPrereqMax(d) > level) continue;
|
|
150
|
-
const group = candidates.get(bare);
|
|
151
|
-
if (group) group.push(entry);
|
|
152
|
-
else candidates.set(bare, [entry]);
|
|
153
|
-
}
|
|
154
|
-
const collapsed = [];
|
|
155
|
-
for (const [bare, group] of candidates) {
|
|
156
|
-
if (group.length === 1) {
|
|
157
|
-
collapsed.push(group[0]);
|
|
158
|
-
continue;
|
|
159
|
-
}
|
|
160
|
-
const owned = group.find((e) => e.slug.split("_")[0] === ownerPrefix);
|
|
161
|
-
if (!owned) {
|
|
162
|
-
warnOnce(
|
|
163
|
-
`pool-collapse:${bare}`,
|
|
164
|
-
`Archivist: pool "${pool.id}" holds ${group.length} cross-edition entries for "${bare}" and none shares the owner's compendium prefix "${ownerPrefix}"; keeping "${group[0].slug}"`
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
collapsed.push(owned != null ? owned : group[0]);
|
|
168
|
-
}
|
|
169
|
-
const grantDecls = [
|
|
170
|
-
...(_d = (_c = rc.entity) == null ? void 0 : _c.pool_grants) != null ? _d : [],
|
|
171
|
-
...(_f = (_e = rc.subclass) == null ? void 0 : _e.pool_grants) != null ? _f : []
|
|
172
|
-
];
|
|
173
|
-
const grantsRaw = grantDecls.filter((g) => g.pool === pool.id).flatMap((g) => g.grants).filter((g) => g.at_level <= level).map((g) => byBare.get(wikilinkTailSlug(g.feature))).filter((e) => e != null);
|
|
174
|
-
const grantedBare = /* @__PURE__ */ new Set();
|
|
175
|
-
const grants = grantsRaw.filter((e) => {
|
|
176
|
-
const key = bareEntitySlug(e.slug);
|
|
177
|
-
if (grantedBare.has(key)) return false;
|
|
178
|
-
grantedBare.add(key);
|
|
179
|
-
return true;
|
|
180
|
-
});
|
|
181
|
-
const available = collapsed.filter((e) => !grantedBare.has(bareEntitySlug(e.slug)));
|
|
182
|
-
const bySlugAvailable = new Map(available.map((e) => [e.slug, e]));
|
|
183
|
-
const byBareAvailable = new Map(available.map((e) => [bareEntitySlug(e.slug), e]));
|
|
184
|
-
const resolveStored = (s) => {
|
|
185
|
-
const exact = bySlugAvailable.get(s);
|
|
186
|
-
if (exact) return exact;
|
|
187
|
-
const survivor = byBareAvailable.get(bareEntitySlug(s));
|
|
188
|
-
if (survivor) return survivor;
|
|
189
|
-
const full = registry.getByTypeAndSlug("optional-feature", s);
|
|
190
|
-
if (full) return entryOf(full.slug, full.data, full.compendium);
|
|
191
|
-
return byBare.get(bareEntitySlug(s));
|
|
192
|
-
};
|
|
193
|
-
const raw = (_g = rc.choices[anchorLevel]) == null ? void 0 : _g[pool.id];
|
|
194
|
-
const selectedSlugs = Array.isArray(raw) ? raw : typeof raw === "string" ? [raw] : [];
|
|
195
|
-
const selected = [];
|
|
196
|
-
const seenKeys = /* @__PURE__ */ new Set();
|
|
197
|
-
for (const s of selectedSlugs) {
|
|
198
|
-
const { slugPart, param } = parsePickKey(s);
|
|
199
|
-
const entry = resolveStored(slugPart);
|
|
200
|
-
if (!entry) continue;
|
|
201
|
-
const repeatable = entry.entity.repeatable === true;
|
|
202
|
-
if (!repeatable && param !== null) {
|
|
203
|
-
warnOnce(`pick-param:${pool.id}:${s}`, `Archivist: pool "${pool.id}" pick "${s}" names a parameter, but "${entry.slug}" is not repeatable; the parameter is ignored`);
|
|
204
|
-
}
|
|
205
|
-
const nkey = normalizedPickKey(s, repeatable);
|
|
206
|
-
if (grantedBare.has(bareEntitySlug(entry.slug)) || seenKeys.has(nkey)) continue;
|
|
207
|
-
seenKeys.add(nkey);
|
|
208
|
-
selected.push({
|
|
209
|
-
...entry,
|
|
210
|
-
key: repeatable || param !== null ? s : entry.slug,
|
|
211
|
-
param: repeatable ? param : null,
|
|
212
|
-
...repeatable ? { option: resolveCopyOption(entry.entity, param, { classLevel: level, registry, edition }) } : {}
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
const members = [...available, ...grants];
|
|
216
|
-
const layout = derivePoolLayout(members);
|
|
217
|
-
const votes = /* @__PURE__ */ new Map();
|
|
218
|
-
for (const e of members) {
|
|
219
|
-
const id = (_h = e.entity.consumes) == null ? void 0 : _h.resource;
|
|
220
|
-
const payer = id ? payingResourceId(id, index, rc) : void 0;
|
|
221
|
-
if (!payer) continue;
|
|
222
|
-
votes.set(payer, ((_i = votes.get(payer)) != null ? _i : 0) + 1);
|
|
223
|
-
}
|
|
224
|
-
let resource;
|
|
225
|
-
let bestN = 0;
|
|
226
|
-
for (const [id, n] of votes) if (n > bestN) {
|
|
227
|
-
resource = id;
|
|
228
|
-
bestN = n;
|
|
229
|
-
}
|
|
230
|
-
const bind = poolRebinder(rc, pool.id, resource, index);
|
|
231
|
-
return {
|
|
232
|
-
id: pool.id,
|
|
233
|
-
label: pool.label,
|
|
234
|
-
classIndex,
|
|
235
|
-
count,
|
|
236
|
-
anchorLevel,
|
|
237
|
-
selected: selected.map(bind),
|
|
238
|
-
available: available.map(bind),
|
|
239
|
-
grants: grants.map(bind),
|
|
240
|
-
...layout ? { layout } : {},
|
|
241
|
-
...resource ? { resource } : {},
|
|
242
|
-
...pool.count.label ? { countLabel: pool.count.label } : {},
|
|
243
|
-
...pool.active ? { active: pool.active } : {},
|
|
244
|
-
...pool.head_resource ? { headResource: pool.head_resource } : {}
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
function poolRebinder(rc, poolId, vote, index) {
|
|
248
|
-
const declared = declaredResourceIds(rc);
|
|
249
|
-
const copies = /* @__PURE__ */ new Map();
|
|
250
|
-
return (e) => {
|
|
251
|
-
const consumes = e.entity.consumes;
|
|
252
|
-
const id = consumes == null ? void 0 : consumes.resource;
|
|
253
|
-
if (!consumes || typeof id !== "string" || id.length === 0) return e;
|
|
254
|
-
const payer = payingResourceId(id, index, rc);
|
|
255
|
-
if (payer === id) return e;
|
|
256
|
-
const target = payer != null ? payer : vote !== void 0 && !declared.has(id) ? vote : void 0;
|
|
257
|
-
if (target === void 0) return e;
|
|
258
|
-
const done = copies.get(e.key);
|
|
259
|
-
if (done) return done;
|
|
260
|
-
if (payer === void 0) {
|
|
261
|
-
warnOnce(
|
|
262
|
-
`pool-rebind:${poolId}:${id}`,
|
|
263
|
-
`Archivist: pool "${poolId}" members consume "${id}", which this character does not own; bound to the pool's resource "${target}"`
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
const copy = { ...e, entity: { ...e.entity, consumes: { ...consumes, resource: target } } };
|
|
267
|
-
copies.set(e.key, copy);
|
|
268
|
-
return copy;
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
function declaredResourceIds(rc) {
|
|
272
|
-
var _a;
|
|
273
|
-
const out = /* @__PURE__ */ new Set();
|
|
274
|
-
const add = (list) => {
|
|
275
|
-
for (const r of list != null ? list : []) if (typeof (r == null ? void 0 : r.id) === "string") out.add(r.id);
|
|
276
|
-
};
|
|
277
|
-
for (const owner of [rc.entity, rc.subclass]) {
|
|
278
|
-
if (!owner) continue;
|
|
279
|
-
add(owner.resources);
|
|
280
|
-
for (const features of Object.values((_a = owner.features_by_level) != null ? _a : {})) for (const f of features != null ? features : []) add(f.resources);
|
|
281
|
-
}
|
|
282
|
-
return out;
|
|
283
|
-
}
|
|
284
|
-
function resolveAllPools(resolved, registry, index) {
|
|
285
|
-
const out = [];
|
|
286
|
-
resolved.classes.forEach((rc, classIndex) => {
|
|
287
|
-
var _a, _b, _c, _d;
|
|
288
|
-
if (!rc.entity) return;
|
|
289
|
-
const decls = [...(_a = rc.entity.selection_pools) != null ? _a : [], ...(_c = (_b = rc.subclass) == null ? void 0 : _b.selection_pools) != null ? _c : []];
|
|
290
|
-
const seen = /* @__PURE__ */ new Set();
|
|
291
|
-
for (const pool of decls) {
|
|
292
|
-
if (seen.has(pool.id)) continue;
|
|
293
|
-
seen.add(pool.id);
|
|
294
|
-
out.push(resolvePool(rc, classIndex, pool, registry, index, (_d = resolved.definition) == null ? void 0 : _d.edition));
|
|
295
|
-
}
|
|
296
|
-
});
|
|
297
|
-
return out;
|
|
298
|
-
}
|
|
299
|
-
function strandedPicks(pool) {
|
|
300
|
-
const inAvailable = new Set(pool.available.map((e) => e.slug));
|
|
301
|
-
return pool.selected.filter((e) => !inAvailable.has(e.slug));
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
// src/pc/pc.infusions.ts
|
|
305
|
-
function poolCountLabel(pool) {
|
|
306
|
-
var _a;
|
|
307
|
-
return (_a = pool.countLabel) != null ? _a : "Known";
|
|
308
|
-
}
|
|
309
|
-
function poolActiveWords(pool) {
|
|
310
|
-
var _a, _b, _c;
|
|
311
|
-
const a = pool.active;
|
|
312
|
-
if (!a) return null;
|
|
313
|
-
return {
|
|
314
|
-
column: a.column,
|
|
315
|
-
label: a.label,
|
|
316
|
-
verb: a.verb,
|
|
317
|
-
counterLabel: (_a = a.counter_label) != null ? _a : a.label,
|
|
318
|
-
createLabel: (_b = a.create_label) != null ? _b : "Created",
|
|
319
|
-
createVerb: (_c = a.create_verb) != null ? _c : "Create"
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
function parsePickKey(stored) {
|
|
323
|
-
const i = stored.indexOf("#");
|
|
324
|
-
return i === -1 ? { slugPart: stored, param: null } : { slugPart: stored.slice(0, i), param: stored.slice(i + 1) };
|
|
325
|
-
}
|
|
326
|
-
function normalizedPickKey(stored, repeatable) {
|
|
327
|
-
const { slugPart, param } = parsePickKey(stored);
|
|
328
|
-
return repeatable ? `${bareEntitySlug(slugPart)}#${param != null ? param : ""}` : bareEntitySlug(slugPart);
|
|
329
|
-
}
|
|
330
|
-
function markerKey(by) {
|
|
331
|
-
const { slugPart, param } = parsePickKey(by);
|
|
332
|
-
return param === null ? bareEntitySlug(slugPart) : `${bareEntitySlug(slugPart)}#${param}`;
|
|
333
|
-
}
|
|
334
|
-
function isItemBound(note) {
|
|
335
|
-
var _a;
|
|
336
|
-
return !!note.infuse || note.repeatable === true && !!((_a = note.options) == null ? void 0 : _a.some((r) => !!r.creates));
|
|
337
|
-
}
|
|
338
|
-
var SRD_BOOKS = /* @__PURE__ */ new Set(["SRD 2024", "SRD 5e"]);
|
|
339
|
-
var lc = (v) => String(v != null ? v : "").trim().toLowerCase();
|
|
340
|
-
var linkSlug = (link) => link.replace(/^\[\[/, "").replace(/\]\]$/, "").split("|")[0];
|
|
341
|
-
var itemsOf = (registry) => registry.search("", "item", Number.POSITIVE_INFINITY);
|
|
342
|
-
function matchesFilter(data, f) {
|
|
343
|
-
var _a;
|
|
344
|
-
const type = lc(data.type);
|
|
345
|
-
if (!f.rarity.map(lc).includes(lc(data.rarity))) return false;
|
|
346
|
-
if (f.types && !f.types.map(lc).includes(type)) return false;
|
|
347
|
-
if ((_a = f.exclude_types) == null ? void 0 : _a.map(lc).includes(type)) return false;
|
|
348
|
-
return !(f.cursed === false && data.cursed === true);
|
|
349
|
-
}
|
|
350
|
-
function rowMatches(row, it) {
|
|
351
|
-
const c = row.creates;
|
|
352
|
-
if (c.item) return lc(it.name) === lc(row.name) || it.slug === linkSlug(c.item);
|
|
353
|
-
if (c.variant) return c.variant.candidates.some((l) => bareEntitySlug(linkSlug(l)) === bareEntitySlug(it.slug));
|
|
354
|
-
return !!c.filter && matchesFilter(it.data, c.filter);
|
|
355
|
-
}
|
|
356
|
-
var rowInstalledIn = (row, items) => {
|
|
357
|
-
const v = row.creates.item ? void 0 : row.creates.variant;
|
|
358
|
-
if (!v) return items.filter((it) => rowMatches(row, it));
|
|
359
|
-
const bares = new Set(v.candidates.map((l) => bareEntitySlug(linkSlug(l))));
|
|
360
|
-
return items.filter((it) => bares.has(bareEntitySlug(it.slug)));
|
|
361
|
-
};
|
|
362
|
-
var rowInstalled = (row, registry) => rowInstalledIn(row, itemsOf(registry));
|
|
363
|
-
function candidateOrder(edition) {
|
|
364
|
-
return (a, b) => {
|
|
365
|
-
const ea = edition && lc(a.data.edition) === edition ? 0 : 1;
|
|
366
|
-
const eb = edition && lc(b.data.edition) === edition ? 0 : 1;
|
|
367
|
-
if (ea !== eb) return ea - eb;
|
|
368
|
-
const sa = SRD_BOOKS.has(a.compendium) ? 0 : 1, sb = SRD_BOOKS.has(b.compendium) ? 0 : 1;
|
|
369
|
-
if (sa !== sb) return sa - sb;
|
|
370
|
-
return a.slug < b.slug ? -1 : a.slug > b.slug ? 1 : 0;
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
function optionCandidates(row, registry, opts = {}) {
|
|
374
|
-
return candidatesFrom(rowInstalled(row, registry), registry, opts);
|
|
375
|
-
}
|
|
376
|
-
function candidatesFrom(installed, registry, opts) {
|
|
377
|
-
var _a, _b;
|
|
378
|
-
const visible = (_a = opts.isEntityVisible) != null ? _a : (() => true);
|
|
379
|
-
const excluded = ((_b = opts.exclude) != null ? _b : []).map((s) => {
|
|
380
|
-
var _a2;
|
|
381
|
-
return registry.getByTypeAndSlug("item", (_a2 = keptSlugFor(s)) != null ? _a2 : s);
|
|
382
|
-
}).filter((e) => !!e);
|
|
383
|
-
const exNames = new Set(excluded.map((e) => lc(e.name))), exBares = new Set(excluded.map((e) => bareEntitySlug(e.slug)));
|
|
384
|
-
const seen = /* @__PURE__ */ new Set(), out = [];
|
|
385
|
-
for (const e of installed.filter(visible).sort(candidateOrder(opts.edition))) {
|
|
386
|
-
const bare = bareEntitySlug(e.slug);
|
|
387
|
-
if (seen.has(bare)) continue;
|
|
388
|
-
seen.add(bare);
|
|
389
|
-
if (exNames.has(lc(e.name)) || exBares.has(bare)) continue;
|
|
390
|
-
out.push(e.slug);
|
|
391
|
-
}
|
|
392
|
-
return out;
|
|
393
|
-
}
|
|
394
|
-
function resolveOptionRows(note, registry, opts = {}) {
|
|
395
|
-
var _a;
|
|
396
|
-
const items = itemsOf(registry);
|
|
397
|
-
return ((_a = note.options) != null ? _a : []).map((row) => {
|
|
398
|
-
const rowItems = rowInstalledIn(row, items);
|
|
399
|
-
const candidates = candidatesFrom(rowItems, registry, opts);
|
|
400
|
-
const anyVisible = candidates.length > 0 || candidatesFrom(rowItems, registry, { ...opts, exclude: [] }).length > 0;
|
|
401
|
-
const installed = rowItems.length > 0;
|
|
402
|
-
return {
|
|
403
|
-
key: row.key,
|
|
404
|
-
name: row.name,
|
|
405
|
-
minLevel: row.min_level,
|
|
406
|
-
...row.attunement !== void 0 ? { attunement: row.attunement } : {},
|
|
407
|
-
arm: row.creates.item ? "item" : row.creates.variant ? "variant" : "filter",
|
|
408
|
-
candidates,
|
|
409
|
-
availability: anyVisible ? "installed" : installed ? "hidden-only" : "not-installed",
|
|
410
|
-
...rowItemWords(row, candidates[0] ? registry.getByTypeAndSlug("item", candidates[0]) : rowItems[0])
|
|
411
|
-
};
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
function rowItemWords(row, item) {
|
|
415
|
-
var _a, _b, _c, _d;
|
|
416
|
-
const f = row.creates.filter;
|
|
417
|
-
if (f) return { type: ((_a = f.types) == null ? void 0 : _a[0]) ? lc(f.types[0]) : null, rarity: f.rarity[0] ? lc(f.rarity[0]) : null, charges: null };
|
|
418
|
-
const data = (_b = item == null ? void 0 : item.data) != null ? _b : {};
|
|
419
|
-
const max = (_c = data.charges) == null ? void 0 : _c.max;
|
|
420
|
-
return {
|
|
421
|
-
type: lc(data.type) || null,
|
|
422
|
-
rarity: lc(data.rarity) || null,
|
|
423
|
-
charges: typeof max === "number" && max > 0 ? { max, ...typeof ((_d = data.charges) == null ? void 0 : _d.recharge) === "string" ? { recharge: data.charges.recharge } : {} } : null
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
function resolveCopyOption(note, param, ctx) {
|
|
427
|
-
var _a, _b, _c;
|
|
428
|
-
const rows = (_a = note.options) != null ? _a : [];
|
|
429
|
-
if (param === null || param === "") return { row: null, status: "needs-choice" };
|
|
430
|
-
if (note.item_choice === "create") {
|
|
431
|
-
const row = rows.find((r) => r.key === param);
|
|
432
|
-
if (!row) return { row: null, status: "invalid" };
|
|
433
|
-
const installed = rowInstalled(row, ctx.registry).sort(candidateOrder(ctx.edition));
|
|
434
|
-
if (installed.length === 0) return { row, status: "not-installed" };
|
|
435
|
-
const own = row.creates.item ? linkSlug(row.creates.item) : void 0;
|
|
436
|
-
const item = row.creates.item ? ((_b = installed.find((e) => e.slug === own)) != null ? _b : installed[0]).slug : void 0;
|
|
437
|
-
return { row, ...item ? { item } : {}, status: row.min_level <= ctx.classLevel ? "ok" : "level" };
|
|
438
|
-
}
|
|
439
|
-
const slug = (_c = keptSlugFor(param)) != null ? _c : param;
|
|
440
|
-
const it = ctx.registry.getByTypeAndSlug("item", slug);
|
|
441
|
-
if (!it) return { row: null, item: slug, status: "not-installed" };
|
|
442
|
-
const matching = rows.filter((r) => rowMatches(r, it)).sort((a, b) => a.min_level - b.min_level);
|
|
443
|
-
if (matching.length === 0) return { row: null, item: slug, status: "invalid" };
|
|
444
|
-
return { row: matching[0], item: slug, status: matching[0].min_level <= ctx.classLevel ? "ok" : "level" };
|
|
445
|
-
}
|
|
446
|
-
var MUNDANE = /* @__PURE__ */ new Set(["", "none", "mundane"]);
|
|
447
|
-
var isMagic = (data) => {
|
|
448
|
-
const r = data == null ? void 0 : data.rarity;
|
|
449
|
-
return typeof r === "string" && !MUNDANE.has(r.trim().toLowerCase());
|
|
450
|
-
};
|
|
451
|
-
var plainText = (item) => item.replace(/^\[\[/, "").replace(/\]\]$/, "").split("|").pop().split("/").pop();
|
|
452
|
-
function scaledInfuseItem(infuse, classLevel) {
|
|
453
|
-
var _a, _b;
|
|
454
|
-
let item = { ...(_a = infuse.item) != null ? _a : {} };
|
|
455
|
-
const rows = [...(_b = infuse.scales_at) != null ? _b : []].sort((a, b) => a.level - b.level);
|
|
456
|
-
for (const row of rows) if (row.level <= classLevel) item = { ...item, ...row.item };
|
|
457
|
-
return item;
|
|
458
|
-
}
|
|
459
|
-
function wrapInfused(entry, note, classLevel, registry) {
|
|
460
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
461
|
-
const infuse = note.infuse;
|
|
462
|
-
const item = scaledInfuseItem(infuse, classLevel);
|
|
463
|
-
const resist = [...(_a = item.resist) != null ? _a : [], ...((_b = infuse.choice) == null ? void 0 : _b.kind) === "damage-type" && ((_c = entry.infusion) == null ? void 0 : _c.choice) ? [entry.infusion.choice] : []];
|
|
464
|
-
const overlay = {
|
|
465
|
-
...item.bonuses ? { bonuses: item.bonuses } : {},
|
|
466
|
-
resist,
|
|
467
|
-
...item.charges ? { charges: item.charges } : {},
|
|
468
|
-
...item.action ? { action: item.action } : {},
|
|
469
|
-
...item.range ? { range: item.range } : {},
|
|
470
|
-
...infuse.attunement ? { attunement: { required: true } } : {}
|
|
471
|
-
};
|
|
472
|
-
const base = resolveBaseItem(entry.item, registry);
|
|
473
|
-
const data = (_d = base == null ? void 0 : base.data) != null ? _d : null;
|
|
474
|
-
if (base && isMagic(data)) {
|
|
475
|
-
const b = data;
|
|
476
|
-
const bonuses = { ...(_e = b.bonuses) != null ? _e : {} };
|
|
477
|
-
for (const [k, v] of Object.entries((_f = item.bonuses) != null ? _f : {})) if (typeof v === "number") bonuses[k] = (typeof bonuses[k] === "number" ? bonuses[k] : 0) + v;
|
|
478
|
-
return { entity: {
|
|
479
|
-
...b,
|
|
480
|
-
bonuses,
|
|
481
|
-
resist: [.../* @__PURE__ */ new Set([...(_g = b.resist) != null ? _g : [], ...resist])],
|
|
482
|
-
attunement: { required: requiresAttunement(b) || !!infuse.attunement }
|
|
483
|
-
}, magicBase: true };
|
|
484
|
-
}
|
|
485
|
-
const rarity = (_h = infuse.rarity) != null ? _h : "unknown";
|
|
486
|
-
if (!base) {
|
|
487
|
-
const text = plainText(entry.item);
|
|
488
|
-
return { entity: { slug: `infused:${slugify(text)}`, name: text, type: "wondrous item", rarity, ...overlay, description: "" }, magicBase: false };
|
|
489
|
-
}
|
|
490
|
-
const name = String((_i = data == null ? void 0 : data.name) != null ? _i : base.name), description = String((_j = data == null ? void 0 : data.description) != null ? _j : "");
|
|
491
|
-
const slotted = base.entityType === "armor" || base.entityType === "weapon" ? base : typeof (data == null ? void 0 : data.base_item) === "string" ? resolveBaseItem(data.base_item, registry) : null;
|
|
492
|
-
if (slotted && (slotted.entityType === "armor" || slotted.entityType === "weapon")) {
|
|
493
|
-
const type = slotted.entityType === "weapon" ? "weapon" : isShieldArmor(slotted.data) ? "shield" : "armor";
|
|
494
|
-
return { entity: { slug: base.slug, name, type, rarity, base_item: `[[${slotted.slug}]]`, ...overlay, description }, magicBase: false };
|
|
495
|
-
}
|
|
496
|
-
return { entity: { slug: base.slug, name, type: String((_k = data == null ? void 0 : data.type) != null ? _k : "adventuring gear"), rarity, ...overlay, description }, magicBase: false };
|
|
497
|
-
}
|
|
498
|
-
function resolveEntryEntity(entry, index, registry, infusions) {
|
|
499
|
-
const view = !infusions ? void 0 : "views" in infusions ? infusions.views.get(index) : infusions.index === index ? infusions : void 0;
|
|
500
|
-
if (view) return { entity: view.entity, entityType: view.entityType };
|
|
501
|
-
return resolveEntityForEntry(entry.item, registry);
|
|
502
|
-
}
|
|
503
|
-
function buildInfusionContext(character, resolved, registry) {
|
|
504
|
-
var _a, _b, _c, _d, _e;
|
|
505
|
-
const equipment = (_a = character.equipment) != null ? _a : [];
|
|
506
|
-
const pools = ((_b = resolved.pools) != null ? _b : []).filter((p) => !!p.active || p.selected.some((e) => e.itemBound));
|
|
507
|
-
if (pools.length === 0 && !equipment.some((e) => !!e.infusion)) return void 0;
|
|
508
|
-
const owners = /* @__PURE__ */ new Map();
|
|
509
|
-
for (const pool of pools) for (const entry of pool.selected) if (entry.itemBound) owners.set(normalizedPickKey(entry.key, entry.entity.repeatable === true), { pool, entry });
|
|
510
|
-
const views = /* @__PURE__ */ new Map(), flags = [];
|
|
511
|
-
const newest = /* @__PURE__ */ new Map();
|
|
512
|
-
equipment.forEach((e, i) => {
|
|
513
|
-
if (!e.infusion) return;
|
|
514
|
-
const k = markerKey(e.infusion.by);
|
|
515
|
-
const j = newest.get(k);
|
|
516
|
-
if (j === void 0 || equipment[j].infusion.seq < e.infusion.seq) newest.set(k, i);
|
|
517
|
-
});
|
|
518
|
-
equipment.forEach((e, i) => {
|
|
519
|
-
var _a2, _b2, _c2;
|
|
520
|
-
const m = e.infusion;
|
|
521
|
-
if (!m) return;
|
|
522
|
-
const owner = owners.get(markerKey(m.by));
|
|
523
|
-
const nullView = () => {
|
|
524
|
-
var _a3, _b3, _c3, _d2, _e2;
|
|
525
|
-
return {
|
|
526
|
-
index: i,
|
|
527
|
-
kind: m.kind,
|
|
528
|
-
entity: null,
|
|
529
|
-
entityType: null,
|
|
530
|
-
key: m.by,
|
|
531
|
-
seq: m.seq,
|
|
532
|
-
poolId: (_a3 = owner == null ? void 0 : owner.pool.id) != null ? _a3 : "",
|
|
533
|
-
classIndex: (_b3 = owner == null ? void 0 : owner.pool.classIndex) != null ? _b3 : -1,
|
|
534
|
-
noteSlug: (_c3 = owner == null ? void 0 : owner.entry.slug) != null ? _c3 : "",
|
|
535
|
-
noteName: (_d2 = owner == null ? void 0 : owner.entry.entity.name) != null ? _d2 : "",
|
|
536
|
-
sourceLabel: (_e2 = owner == null ? void 0 : owner.entry.entity.name) != null ? _e2 : ""
|
|
537
|
-
};
|
|
538
|
-
};
|
|
539
|
-
if (!owner) {
|
|
540
|
-
flags.push({ index: i, reason: "orphan" });
|
|
541
|
-
if (m.kind === "created") views.set(i, nullView());
|
|
542
|
-
return;
|
|
543
|
-
}
|
|
544
|
-
if (newest.get(markerKey(m.by)) !== i) {
|
|
545
|
-
flags.push({ index: i, reason: "duplicate" });
|
|
546
|
-
if (m.kind === "created") views.set(i, nullView());
|
|
547
|
-
return;
|
|
548
|
-
}
|
|
549
|
-
if (((_a2 = e.qty) != null ? _a2 : 1) > 1) flags.push({ index: i, reason: "stack" });
|
|
550
|
-
const classLevel = (_c2 = (_b2 = resolved.classes[owner.pool.classIndex]) == null ? void 0 : _b2.level) != null ? _c2 : 0;
|
|
551
|
-
const base = {
|
|
552
|
-
index: i,
|
|
553
|
-
kind: m.kind,
|
|
554
|
-
key: m.by,
|
|
555
|
-
seq: m.seq,
|
|
556
|
-
poolId: owner.pool.id,
|
|
557
|
-
classIndex: owner.pool.classIndex,
|
|
558
|
-
noteSlug: owner.entry.slug,
|
|
559
|
-
noteName: owner.entry.entity.name,
|
|
560
|
-
sourceLabel: owner.entry.entity.name
|
|
561
|
-
};
|
|
562
|
-
if (m.kind === "created") {
|
|
563
|
-
const own = resolveEntityForEntry(e.item, registry);
|
|
564
|
-
const it = resolveBaseItem(e.item, registry);
|
|
565
|
-
const opt = owner.entry.option;
|
|
566
|
-
const fits = !!it && !!(opt == null ? void 0 : opt.row) && (opt.item === it.slug || rowMatches(opt.row, it));
|
|
567
|
-
if (!fits) flags.push({ index: i, reason: "mismatch" });
|
|
568
|
-
views.set(i, { ...base, entity: own.entity, entityType: own.entityType });
|
|
569
|
-
return;
|
|
570
|
-
}
|
|
571
|
-
if (!owner.entry.entity.infuse) {
|
|
572
|
-
flags.push({ index: i, reason: "orphan" });
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
const w = wrapInfused(e, owner.entry.entity, classLevel, registry);
|
|
576
|
-
if (w.magicBase) flags.push({ index: i, reason: "magic-base" });
|
|
577
|
-
views.set(i, { ...base, entity: w.entity, entityType: "item" });
|
|
578
|
-
});
|
|
579
|
-
const counters = /* @__PURE__ */ new Map();
|
|
580
|
-
for (const pool of pools) {
|
|
581
|
-
const words = poolActiveWords(pool);
|
|
582
|
-
if (!words) continue;
|
|
583
|
-
const rc = resolved.classes[pool.classIndex];
|
|
584
|
-
const max = (_e = readTableColumn((_c = rc == null ? void 0 : rc.entity) == null ? void 0 : _c.table, (_d = rc == null ? void 0 : rc.level) != null ? _d : 0, [words.column])) != null ? _e : 0;
|
|
585
|
-
const used = [...views.values()].filter((v) => v.poolId === pool.id && v.entity !== null).length;
|
|
586
|
-
counters.set(pool.id, { label: words.counterLabel, used, max, over: used > max });
|
|
587
|
-
}
|
|
588
|
-
return { views, counters, flags };
|
|
589
|
-
}
|
|
590
|
-
function entryCharges(entry, view, registry) {
|
|
591
|
-
return effectiveItemCharges(entry, registry, view);
|
|
592
|
-
}
|
|
593
|
-
function withEntryCharges(entry, view, current, registry) {
|
|
594
|
-
var _a, _b, _c, _d, _e, _f;
|
|
595
|
-
const overlayMax = (view == null ? void 0 : view.kind) === "infused" ? itemChargesMax(view.entity) : void 0;
|
|
596
|
-
if (overlayMax !== void 0 && entry.infusion) return { ...entry, infusion: { ...entry.infusion, charges: { current: Math.max(0, Math.min(current, overlayMax)) } } };
|
|
597
|
-
const max = (_e = (_d = (_b = (_a = entry.state) == null ? void 0 : _a.charges) == null ? void 0 : _b.max) != null ? _d : (_c = effectiveItemCharges(entry, registry, view)) == null ? void 0 : _c.max) != null ? _e : Math.max(0, current);
|
|
598
|
-
return { ...entry, state: { ...(_f = entry.state) != null ? _f : {}, charges: { current: Math.max(0, Math.min(current, max)), max } } };
|
|
599
|
-
}
|
|
600
|
-
function isMarkedEntry(entry) {
|
|
601
|
-
return !!entry.infusion;
|
|
602
|
-
}
|
|
603
|
-
function splitOne(equipment, index) {
|
|
604
|
-
var _a, _b;
|
|
605
|
-
const src = equipment[index];
|
|
606
|
-
if (!src || ((_a = src.qty) != null ? _a : 1) <= 1) return [...equipment];
|
|
607
|
-
const one = { item: src.item, qty: 1, ...src.in !== void 0 ? { in: src.in } : {}, ...src.overrides ? { overrides: src.overrides } : {} };
|
|
608
|
-
return [...equipment.slice(0, index), { ...src, qty: ((_b = src.qty) != null ? _b : 1) - 1 }, one, ...equipment.slice(index + 1)];
|
|
609
|
-
}
|
|
610
|
-
var refuse = (reason) => ({ ok: false, reason });
|
|
611
|
-
function endInfusion(equipment, index, registry) {
|
|
612
|
-
const entry = equipment[index];
|
|
613
|
-
if (!(entry == null ? void 0 : entry.infusion)) return { equipment: [...equipment], ended: [] };
|
|
614
|
-
const { kind, by } = entry.infusion;
|
|
615
|
-
if (kind === "infused") {
|
|
616
|
-
const { infusion: _m, ...rest } = entry;
|
|
617
|
-
const keep = requiresAttunement(resolveEntryEntity(rest, index, registry).entity);
|
|
618
|
-
const next = keep ? rest : (({ attuned: _a, ...r }) => r)(rest);
|
|
619
|
-
return { equipment: equipment.map((e, i) => i === index ? next : e), ended: [{ index, key: by, kind, item: entry.item }] };
|
|
620
|
-
}
|
|
621
|
-
const moved = equipment.map((e, i) => {
|
|
622
|
-
if (i === index || entry.id === void 0 || e.in !== entry.id) return e;
|
|
623
|
-
if (entry.in === void 0) {
|
|
624
|
-
const { in: _in, ...r } = e;
|
|
625
|
-
return r;
|
|
626
|
-
}
|
|
627
|
-
return { ...e, in: entry.in };
|
|
628
|
-
});
|
|
629
|
-
return { equipment: moved.filter((_, i) => i !== index), ended: [{ index: -1, key: by, kind, item: entry.item }] };
|
|
630
|
-
}
|
|
631
|
-
var pickKeyOf = (e) => normalizedPickKey(e.key, e.entity.repeatable === true);
|
|
632
|
-
var nextSeq = (equipment) => equipment.reduce((m, e) => {
|
|
633
|
-
var _a, _b;
|
|
634
|
-
return Math.max(m, (_b = (_a = e.infusion) == null ? void 0 : _a.seq) != null ? _b : 0);
|
|
635
|
-
}, 0) + 1;
|
|
636
|
-
function ownedPick(resolved, key) {
|
|
637
|
-
var _a, _b;
|
|
638
|
-
const k = markerKey(key);
|
|
639
|
-
for (const pool of (_a = resolved.pools) != null ? _a : []) {
|
|
640
|
-
const entry = pool.selected.find((e) => e.itemBound && pickKeyOf(e) === k);
|
|
641
|
-
if (entry) return { pool, entry, stranded: strandedPicks(pool).includes(entry) || ((_b = entry.option) == null ? void 0 : _b.status) === "level" };
|
|
642
|
-
}
|
|
643
|
-
return null;
|
|
644
|
-
}
|
|
645
|
-
var wordsOf = (...texts) => texts.map(lc).join(" ").split(/[^a-z]+/).filter((w) => w !== "");
|
|
646
|
-
function shapeOf(found, text, registry) {
|
|
647
|
-
var _a, _b, _c;
|
|
648
|
-
if (!found) return { kind: "gear", words: wordsOf(text) };
|
|
649
|
-
const data = (_a = found.data) != null ? _a : {};
|
|
650
|
-
const words = wordsOf((_b = data.name) != null ? _b : text, data.type);
|
|
651
|
-
const slotted = found.entityType === "armor" || found.entityType === "weapon" ? found : typeof data.base_item === "string" ? resolveBaseItem(data.base_item, registry) : null;
|
|
652
|
-
if ((slotted == null ? void 0 : slotted.entityType) === "armor") {
|
|
653
|
-
const armor = slotted.data;
|
|
654
|
-
return { kind: isShieldArmor(armor) ? "shield" : "armor", words, category: lc(armor.category) };
|
|
655
|
-
}
|
|
656
|
-
if ((slotted == null ? void 0 : slotted.entityType) === "weapon") {
|
|
657
|
-
const w = slotted.data;
|
|
658
|
-
return { kind: "weapon", words, category: lc(w.category), properties: ((_c = w.properties) != null ? _c : []).filter((p) => typeof p === "string").map(lc) };
|
|
659
|
-
}
|
|
660
|
-
return { kind: "gear", words };
|
|
661
|
-
}
|
|
662
|
-
function admits(t, s) {
|
|
663
|
-
var _a, _b, _c, _d;
|
|
664
|
-
if (t.kind !== s.kind) return false;
|
|
665
|
-
if (((_a = t.category) == null ? void 0 : _a.length) && !t.category.map(lc).includes(((_b = s.category) != null ? _b : "").split("-")[0])) return false;
|
|
666
|
-
if (t.property && !((_c = s.properties) != null ? _c : []).includes(lc(t.property))) return false;
|
|
667
|
-
if (((_d = t.name_any) == null ? void 0 : _d.length) && !t.name_any.some((n) => {
|
|
668
|
-
const w = wordsOf(n);
|
|
669
|
-
return w.length > 0 && w.every((x) => s.words.includes(x));
|
|
670
|
-
})) return false;
|
|
671
|
-
return true;
|
|
672
|
-
}
|
|
673
|
-
function targetVerdict(entry, infuse, registry) {
|
|
674
|
-
const found = resolveBaseItem(entry.item, registry);
|
|
675
|
-
if (!infuse.targets.some((t) => admits(t, shapeOf(found, plainText(entry.item), registry)))) return "target-kind";
|
|
676
|
-
return found && isMagic(found.data) ? "magic-base" : "ok";
|
|
677
|
-
}
|
|
678
|
-
function newObjectEntry(name, infuse, registry, visible) {
|
|
679
|
-
const want = lc(name);
|
|
680
|
-
const found = [];
|
|
681
|
-
for (const type of ["armor", "weapon", "item"]) {
|
|
682
|
-
for (const e of registry.search(name, type, Number.POSITIVE_INFINITY)) {
|
|
683
|
-
if (lc(e.name) === want && !isMagic(e.data) && visible(e) && infuse.targets.some((t) => admits(t, shapeOf(e, e.name, registry)))) found.push(e);
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
const first = found.sort(candidateOrder(void 0))[0];
|
|
687
|
-
return first ? { item: `[[${first.slug}]]`, qty: 1 } : { item: name, qty: 1 };
|
|
688
|
-
}
|
|
689
|
-
function endBySeqs(equipment, seqs, registry) {
|
|
690
|
-
let eq = [...equipment];
|
|
691
|
-
let slots = eq.map((_, i) => i);
|
|
692
|
-
const rows = [];
|
|
693
|
-
for (const { seq, by } of seqs) {
|
|
694
|
-
const i = eq.findIndex((e) => {
|
|
695
|
-
var _a;
|
|
696
|
-
return ((_a = e.infusion) == null ? void 0 : _a.seq) === seq && e.infusion.by === by;
|
|
697
|
-
});
|
|
698
|
-
if (i === -1) continue;
|
|
699
|
-
const w = endInfusion(eq, i, registry);
|
|
700
|
-
for (const row of w.ended) rows.push({ row, slot: slots[i] });
|
|
701
|
-
if (eq[i].infusion.kind === "created") slots = slots.filter((_, j) => j !== i);
|
|
702
|
-
eq = w.equipment;
|
|
703
|
-
}
|
|
704
|
-
return { equipment: eq, ended: rows.map(({ row, slot }) => row.kind === "infused" ? { ...row, index: slots.indexOf(slot) } : row) };
|
|
705
|
-
}
|
|
706
|
-
function displaced(equipment, resolved, pool, key) {
|
|
707
|
-
var _a;
|
|
708
|
-
const k = markerKey(key);
|
|
709
|
-
const out = equipment.filter((e) => !!e.infusion && markerKey(e.infusion.by) === k).map((e) => ({ seq: e.infusion.seq, by: e.infusion.by }));
|
|
710
|
-
const counter = (_a = resolved.infusions) == null ? void 0 : _a.counters.get(pool.id);
|
|
711
|
-
if (!counter) return out;
|
|
712
|
-
const live = [...resolved.infusions.views.values()].filter((v) => v.poolId === pool.id && v.classIndex === pool.classIndex && v.entity !== null && markerKey(v.key) !== k).sort((a, b) => a.seq - b.seq);
|
|
713
|
-
let used = live.length;
|
|
714
|
-
for (const v of live) {
|
|
715
|
-
if (used + 1 <= counter.max) break;
|
|
716
|
-
out.push({ seq: v.seq, by: v.key });
|
|
717
|
-
used--;
|
|
718
|
-
}
|
|
719
|
-
return out;
|
|
720
|
-
}
|
|
721
|
-
function infuseEntry(character, resolved, registry, req) {
|
|
722
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
723
|
-
const owned = ownedPick(resolved, req.key);
|
|
724
|
-
if (!owned) return refuse("not-owned");
|
|
725
|
-
const infuse = owned.entry.entity.infuse;
|
|
726
|
-
if (!infuse) return refuse("not-infusing");
|
|
727
|
-
if (owned.stranded) return refuse("stranded");
|
|
728
|
-
const wantsChoice = ((_a = infuse.choice) == null ? void 0 : _a.kind) === "damage-type";
|
|
729
|
-
const choice = lc(req.choice);
|
|
730
|
-
if (wantsChoice && choice === "") return refuse("choice-required");
|
|
731
|
-
if (wantsChoice && !isCanonicalDamageType(choice)) return refuse("bad-choice");
|
|
732
|
-
if (wantsChoice && ((_b = infuse.choice) == null ? void 0 : _b.options) && !infuse.choice.options.some((o) => lc(o) === choice)) return refuse("bad-choice");
|
|
733
|
-
const equipment = (_c = character.equipment) != null ? _c : [];
|
|
734
|
-
const charges = scaledInfuseItem(infuse, (_e = (_d = resolved.classes[owned.pool.classIndex]) == null ? void 0 : _d.level) != null ? _e : 0).charges;
|
|
735
|
-
const marker = {
|
|
736
|
-
kind: "infused",
|
|
737
|
-
by: owned.entry.key,
|
|
738
|
-
seq: nextSeq(equipment),
|
|
739
|
-
...wantsChoice ? { choice } : {},
|
|
740
|
-
...charges ? { charges: { current: charges.max } } : {}
|
|
741
|
-
};
|
|
742
|
-
let placed;
|
|
743
|
-
if (typeof req.target === "number") {
|
|
744
|
-
const target = equipment[req.target];
|
|
745
|
-
if (!target) return refuse("no-target");
|
|
746
|
-
if (target.infusion) return refuse("marked");
|
|
747
|
-
const verdict = targetVerdict(target, infuse, registry);
|
|
748
|
-
if (verdict !== "ok") return refuse(verdict);
|
|
749
|
-
const split = ((_f = target.qty) != null ? _f : 1) > 1;
|
|
750
|
-
placed = split ? splitOne(equipment, req.target) : [...equipment];
|
|
751
|
-
const i = split ? req.target + 1 : req.target;
|
|
752
|
-
placed[i] = { ...placed[i], infusion: marker };
|
|
753
|
-
} else {
|
|
754
|
-
const name = req.target.newObject.trim();
|
|
755
|
-
if (name === "") return refuse("no-target");
|
|
756
|
-
placed = [...equipment, { ...newObjectEntry(name, infuse, registry, (_g = req.isEntityVisible) != null ? _g : (() => true)), infusion: marker }];
|
|
757
|
-
}
|
|
758
|
-
return { ok: true, ...endBySeqs(placed, displaced(equipment, resolved, owned.pool, owned.entry.key), registry) };
|
|
759
|
-
}
|
|
760
|
-
function createEntry(character, resolved, registry, req) {
|
|
761
|
-
var _a, _b;
|
|
762
|
-
const owned = ownedPick(resolved, req.key);
|
|
763
|
-
if (!owned) return refuse("not-owned");
|
|
764
|
-
const note = owned.entry.entity;
|
|
765
|
-
if (!(note.repeatable === true && !!((_a = note.options) == null ? void 0 : _a.some((r) => !!r.creates)))) return refuse("not-creating");
|
|
766
|
-
if (owned.stranded) return refuse("stranded");
|
|
767
|
-
const opt = owned.entry.option;
|
|
768
|
-
if (!(opt == null ? void 0 : opt.row) || opt.status !== "ok") return refuse("invalid-item");
|
|
769
|
-
const it = registry.getByTypeAndSlug("item", linkSlug(req.item.trim()));
|
|
770
|
-
if (!it || !(opt.item === it.slug || rowMatches(opt.row, it))) return refuse("invalid-item");
|
|
771
|
-
const equipment = (_b = character.equipment) != null ? _b : [];
|
|
772
|
-
const placed = [...equipment, { item: `[[${it.slug}]]`, qty: 1, infusion: { kind: "created", by: owned.entry.key, seq: nextSeq(equipment) } }];
|
|
773
|
-
return { ok: true, ...endBySeqs(placed, displaced(equipment, resolved, owned.pool, owned.entry.key), registry) };
|
|
774
|
-
}
|
|
775
|
-
function markersWhere(equipment, pick) {
|
|
776
|
-
const out = [];
|
|
777
|
-
equipment.forEach((e, index) => {
|
|
778
|
-
const m = e.infusion;
|
|
779
|
-
if (m && pick(m)) out.push({ index, key: m.by, kind: m.kind, item: e.item, seq: m.seq, by: m.by });
|
|
780
|
-
});
|
|
781
|
-
return out;
|
|
782
|
-
}
|
|
783
|
-
var asRows = (list) => list.map(({ index, key, kind, item }) => ({ index, key, kind, item }));
|
|
784
|
-
var storedKeys = (v) => typeof v === "string" ? [v] : Array.isArray(v) ? v : [];
|
|
785
|
-
function choiceEnds(character, resolved, req) {
|
|
786
|
-
var _a, _b, _c, _d, _e, _f;
|
|
787
|
-
const pool = ((_a = resolved.pools) != null ? _a : []).find((p) => p.classIndex === req.classIndex && p.id === req.choiceKey);
|
|
788
|
-
if (!pool || !(pool.active || pool.selected.some((e) => e.itemBound))) return [];
|
|
789
|
-
const choices = (_c = (_b = character.class[req.classIndex]) == null ? void 0 : _b.choices) != null ? _c : {};
|
|
790
|
-
const kept = new Set(req.next.map(markerKey));
|
|
791
|
-
for (const lvl of Object.keys(choices)) if (Number(lvl) !== req.level) for (const s of storedKeys((_d = choices[Number(lvl)]) == null ? void 0 : _d[req.choiceKey])) kept.add(markerKey(s));
|
|
792
|
-
const removed = new Set(storedKeys((_e = choices[req.level]) == null ? void 0 : _e[req.choiceKey]).map(markerKey).filter((k) => !kept.has(k)));
|
|
793
|
-
return markersWhere((_f = character.equipment) != null ? _f : [], (m) => removed.has(markerKey(m.by)));
|
|
794
|
-
}
|
|
795
|
-
function infusionsEndedByChoice(character, resolved, _registry, req) {
|
|
796
|
-
return asRows(choiceEnds(character, resolved, req));
|
|
797
|
-
}
|
|
798
|
-
function reconcileChoiceEdit(character, resolved, registry, req) {
|
|
799
|
-
var _a;
|
|
800
|
-
const list = choiceEnds(character, resolved, req);
|
|
801
|
-
return list.length === 0 ? null : endBySeqs((_a = character.equipment) != null ? _a : [], list, registry);
|
|
802
|
-
}
|
|
803
|
-
function classEnds(character, resolved, req) {
|
|
804
|
-
var _a, _b, _c, _d, _e;
|
|
805
|
-
let pools = ((_a = resolved.pools) != null ? _a : []).filter((p) => p.classIndex === req.classIndex);
|
|
806
|
-
if (!("remove" in req)) {
|
|
807
|
-
const old = (_c = (_b = resolved.classes[req.classIndex]) == null ? void 0 : _b.subclass) != null ? _c : null;
|
|
808
|
-
if (!old || req.subclass !== null && bareEntitySlug(linkSlug(req.subclass.trim())) === bareEntitySlug(old.slug)) return [];
|
|
809
|
-
const ids = new Set(((_d = old.selection_pools) != null ? _d : []).map((p) => p.id));
|
|
810
|
-
pools = pools.filter((p) => ids.has(p.id));
|
|
811
|
-
}
|
|
812
|
-
const owned = /* @__PURE__ */ new Set();
|
|
813
|
-
for (const pool of pools) for (const e of pool.selected) if (e.itemBound) owned.add(pickKeyOf(e));
|
|
814
|
-
return markersWhere((_e = character.equipment) != null ? _e : [], (m) => owned.has(markerKey(m.by)));
|
|
815
|
-
}
|
|
816
|
-
function infusionsEndedByClassEdit(character, resolved, _registry, req) {
|
|
817
|
-
return asRows(classEnds(character, resolved, req));
|
|
818
|
-
}
|
|
819
|
-
function reconcileClassEdit(character, resolved, registry, req) {
|
|
820
|
-
var _a;
|
|
821
|
-
const list = classEnds(character, resolved, req);
|
|
822
|
-
return list.length === 0 ? null : endBySeqs((_a = character.equipment) != null ? _a : [], list, registry);
|
|
823
|
-
}
|
|
824
|
-
function eligibleTargets(character, resolved, registry, key) {
|
|
825
|
-
var _a, _b;
|
|
826
|
-
const infuse = (_a = ownedPick(resolved, key)) == null ? void 0 : _a.entry.entity.infuse;
|
|
827
|
-
if (!infuse) return [];
|
|
828
|
-
const out = [];
|
|
829
|
-
((_b = character.equipment) != null ? _b : []).forEach((e, index) => {
|
|
830
|
-
var _a2;
|
|
831
|
-
if (!e.infusion && targetVerdict(e, infuse, registry) === "ok") out.push({ index, stack: ((_a2 = e.qty) != null ? _a2 : 1) > 1 });
|
|
832
|
-
});
|
|
833
|
-
return out;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
// src/pc/pc.entry-overrides.ts
|
|
837
|
-
var WEAPON_DEFAULT_ACTION_COST = "action";
|
|
838
|
-
var linkOf = (item) => {
|
|
839
|
-
var _a, _b;
|
|
840
|
-
return (_b = (_a = item.match(/^\[\[(.+)\]\]$/)) == null ? void 0 : _a[1]) != null ? _b : null;
|
|
841
|
-
};
|
|
842
|
-
var ruleOf = (entry, registry, view) => resolveEntryEntity(entry, view ? view.index : -1, registry, view != null ? view : null);
|
|
843
|
-
function isWeaponLikeEntry(entry, registry, view) {
|
|
844
|
-
if (!registry) return false;
|
|
845
|
-
const r = ruleOf(entry, registry, view);
|
|
846
|
-
return defaultSlotForType(r.entityType, r.entity, registry) === "mainhand";
|
|
847
|
-
}
|
|
848
|
-
function itemsRowBranch(entry, registry, view) {
|
|
849
|
-
var _a, _b;
|
|
850
|
-
const link = linkOf(entry.item);
|
|
851
|
-
if (!link || !registry) return false;
|
|
852
|
-
const t = view ? view.entityType : (_b = (_a = registry.getBySlug(link)) == null ? void 0 : _a.entityType) != null ? _b : null;
|
|
853
|
-
return t !== "weapon" && t !== "armor" && !isWeaponLikeEntry(entry, registry, view);
|
|
854
|
-
}
|
|
855
|
-
function customizableOverrideKeys(entry, registry) {
|
|
856
|
-
const keys = new Set(isConsumedOnUse(entry, registry) ? ["name"] : ["name", "charges", "recovery"]);
|
|
857
|
-
if (!registry) return keys;
|
|
858
|
-
const r = ruleOf(entry, registry);
|
|
859
|
-
const slot = defaultSlotForType(r.entityType, r.entity, registry);
|
|
860
|
-
const weaponLike = slot === "mainhand";
|
|
861
|
-
const itemsRow = itemsRowBranch(entry, registry);
|
|
862
|
-
if (weaponLike) {
|
|
863
|
-
keys.add("bonus");
|
|
864
|
-
keys.add("damage_bonus");
|
|
865
|
-
keys.add("extra_damage");
|
|
866
|
-
}
|
|
867
|
-
if (slot === "armor" || slot === "shield") keys.add("ac_bonus");
|
|
868
|
-
if (weaponLike || itemsRow) keys.add("action");
|
|
869
|
-
if (itemsRow) keys.add("range");
|
|
870
|
-
if (r.entityType === "item") keys.add("resist");
|
|
871
|
-
return keys;
|
|
872
|
-
}
|
|
873
|
-
function defaultActionCost(entry, registry, view) {
|
|
874
|
-
var _a, _b, _c, _d, _e;
|
|
875
|
-
if (isWeaponLikeEntry(entry, registry, view)) return WEAPON_DEFAULT_ACTION_COST;
|
|
876
|
-
const link = linkOf(entry.item);
|
|
877
|
-
if (!link || !registry || !itemsRowBranch(entry, registry, view)) return null;
|
|
878
|
-
const withoutOverrides = { ...entry, overrides: void 0 };
|
|
879
|
-
const type = view ? (_a = view.entity) == null ? void 0 : _a.type : (_c = (_b = registry.getBySlug(link)) == null ? void 0 : _b.data) == null ? void 0 : _c.type;
|
|
880
|
-
return (_e = (_d = resolveItemAction(link, withoutOverrides, type, { view, spellCost: scrollSpellCost(entry, registry) })) == null ? void 0 : _d.cost) != null ? _e : null;
|
|
881
|
-
}
|
|
882
|
-
var SPELL_COST = { action: "action", bonus: "bonus-action", reaction: "reaction" };
|
|
883
|
-
function scrollSpellCost(entry, registry) {
|
|
884
|
-
var _a, _b, _c, _d, _e;
|
|
885
|
-
const ref = (_a = entry.overrides) == null ? void 0 : _a.spell;
|
|
886
|
-
if (!ref || !registry) return void 0;
|
|
887
|
-
const castingTime = (_d = (_c = registry.getByTypeAndSlug("spell", (_b = linkOf(ref)) != null ? _b : ref)) == null ? void 0 : _c.data) == null ? void 0 : _d.casting_time;
|
|
888
|
-
const kind = typeof castingTime === "string" ? (_e = parseCastingTime(castingTime)) == null ? void 0 : _e.kind : void 0;
|
|
889
|
-
return kind ? SPELL_COST[kind] : void 0;
|
|
890
|
-
}
|
|
891
|
-
var chargesOf = (e) => e == null ? void 0 : e.charges;
|
|
892
|
-
function itemChargesMax(entity) {
|
|
893
|
-
const c = chargesOf(entity);
|
|
894
|
-
if (typeof c === "number") return c > 0 ? c : void 0;
|
|
895
|
-
const m = c == null ? void 0 : c.max;
|
|
896
|
-
return typeof m === "number" && m > 0 ? m : void 0;
|
|
897
|
-
}
|
|
898
|
-
var RESET_OF = (r) => {
|
|
899
|
-
const s = String(r != null ? r : "").toLowerCase();
|
|
900
|
-
return s.includes("dawn") ? "dawn" : s.includes("short") ? "short" : s.includes("long") ? "long" : "special";
|
|
901
|
-
};
|
|
902
|
-
function rechargeAmount(c) {
|
|
903
|
-
var _a, _b;
|
|
904
|
-
const raw = [c.recharge_amount, c.dice].find((v) => typeof v === "string" && v.trim() !== "");
|
|
905
|
-
if (!raw) return "1";
|
|
906
|
-
const bare = raw.trim().replace(/^`+|`+$/g, "");
|
|
907
|
-
return ((_b = (_a = parseInlineTag(bare)) == null ? void 0 : _a.content) != null ? _b : bare).replace(/\s+/g, "");
|
|
908
|
-
}
|
|
909
|
-
var recoveryOf = (c, needRecharge) => !c || typeof c === "number" || needRecharge && (typeof c.recharge !== "string" || c.recharge.trim() === "") ? void 0 : { amount: rechargeAmount(c), reset: RESET_OF(c.recharge) };
|
|
910
|
-
function effectiveItemRecovery(entry, registry, view) {
|
|
911
|
-
var _a, _b;
|
|
912
|
-
if (isConsumedOnUse(entry, registry, view)) return void 0;
|
|
913
|
-
if (view && view.entity === null) return void 0;
|
|
914
|
-
if ((view == null ? void 0 : view.kind) === "infused" && itemChargesMax(view.entity) !== void 0) return recoveryOf(chargesOf(view.entity), false);
|
|
915
|
-
if ((_a = entry.state) == null ? void 0 : _a.recovery) return entry.state.recovery;
|
|
916
|
-
const own = registry ? recoveryOf(chargesOf(ruleOf(entry, registry, view).entity), true) : void 0;
|
|
917
|
-
if (own) return own;
|
|
918
|
-
const link = linkOf(entry.item);
|
|
919
|
-
return link ? (_b = findItemAction(link)) == null ? void 0 : _b.recovery : void 0;
|
|
920
|
-
}
|
|
921
|
-
function isConsumedOnUse(entry, registry, view) {
|
|
922
|
-
var _a;
|
|
923
|
-
const link = linkOf(entry.item);
|
|
924
|
-
if (!link) return false;
|
|
925
|
-
if ((_a = findItemAction(link)) == null ? void 0 : _a.consumed) return true;
|
|
926
|
-
const entity = entityOf(entry, registry, view);
|
|
927
|
-
return (entity == null ? void 0 : entity.type) === "potion" || isScrollEntity(entity);
|
|
928
|
-
}
|
|
929
|
-
function isScrollEntity(entity) {
|
|
930
|
-
if (!entity || typeof entity !== "object") return false;
|
|
931
|
-
return entity.type === "scroll" || isCastableScroll(entity);
|
|
932
|
-
}
|
|
933
|
-
function isCastableScroll(entity) {
|
|
934
|
-
return !!entity && typeof entity === "object" && entity.scroll_level != null;
|
|
935
|
-
}
|
|
936
|
-
function entityOf(entry, registry, view) {
|
|
937
|
-
if (!registry || !linkOf(entry.item)) return null;
|
|
938
|
-
return ruleOf(entry, registry, view).entity;
|
|
939
|
-
}
|
|
940
|
-
function effectiveItemCharges(entry, registry, view) {
|
|
941
|
-
var _a, _b, _c, _d, _e, _f;
|
|
942
|
-
if (isConsumedOnUse(entry, registry, view)) return void 0;
|
|
943
|
-
if (view && view.entity === null) return void 0;
|
|
944
|
-
const infused = (view == null ? void 0 : view.kind) === "infused" ? itemChargesMax(view.entity) : void 0;
|
|
945
|
-
if (infused !== void 0) return { current: Math.max(0, Math.min((_c = (_b = (_a = entry.infusion) == null ? void 0 : _a.charges) == null ? void 0 : _b.current) != null ? _c : infused, infused)), max: infused };
|
|
946
|
-
const stored = (_d = entry.state) == null ? void 0 : _d.charges;
|
|
947
|
-
if (stored) return stored;
|
|
948
|
-
const own = registry ? itemChargesMax(ruleOf(entry, registry, view).entity) : void 0;
|
|
949
|
-
if (own !== void 0) return { current: own, max: own };
|
|
950
|
-
const link = linkOf(entry.item);
|
|
951
|
-
const max = link ? (_f = (_e = findItemAction(link)) == null ? void 0 : _e.max_charges) != null ? _f : 0 : 0;
|
|
952
|
-
return max > 0 ? { current: max, max } : void 0;
|
|
953
|
-
}
|
|
954
|
-
function effectiveItemArmorClass(entry, registry, view) {
|
|
955
|
-
var _a;
|
|
956
|
-
if (!registry) return null;
|
|
957
|
-
const { entity } = ruleOf(entry, registry, view);
|
|
958
|
-
const armor = effectiveArmor(entity, registry);
|
|
959
|
-
if (!armor) return null;
|
|
960
|
-
const shield = isShieldArmor(armor);
|
|
961
|
-
const bonus = isItemEntity(entity) && typeof ((_a = entity.bonuses) == null ? void 0 : _a.ac) === "number" ? entity.bonuses.ac : 0;
|
|
962
|
-
const terms = slotAcTerms(armor, entry);
|
|
963
|
-
return {
|
|
964
|
-
value: terms.armor + terms.override + bonus,
|
|
965
|
-
shield,
|
|
966
|
-
// raw vault data may omit the key (the armour type's `flat` note applies to it too): absent reads as no Dex
|
|
967
|
-
addDex: !shield && armor.ac.add_dex === true
|
|
968
|
-
};
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
export {
|
|
972
|
-
WEAPON_DEFAULT_ACTION_COST,
|
|
973
|
-
isWeaponLikeEntry,
|
|
974
|
-
customizableOverrideKeys,
|
|
975
|
-
defaultActionCost,
|
|
976
|
-
scrollSpellCost,
|
|
977
|
-
itemChargesMax,
|
|
978
|
-
effectiveItemRecovery,
|
|
979
|
-
isConsumedOnUse,
|
|
980
|
-
isScrollEntity,
|
|
981
|
-
isCastableScroll,
|
|
982
|
-
effectiveItemCharges,
|
|
983
|
-
effectiveItemArmorClass,
|
|
984
|
-
poolCountLabel,
|
|
985
|
-
poolActiveWords,
|
|
986
|
-
parsePickKey,
|
|
987
|
-
normalizedPickKey,
|
|
988
|
-
markerKey,
|
|
989
|
-
isItemBound,
|
|
990
|
-
optionCandidates,
|
|
991
|
-
resolveOptionRows,
|
|
992
|
-
resolveCopyOption,
|
|
993
|
-
scaledInfuseItem,
|
|
994
|
-
resolveEntryEntity,
|
|
995
|
-
buildInfusionContext,
|
|
996
|
-
entryCharges,
|
|
997
|
-
withEntryCharges,
|
|
998
|
-
isMarkedEntry,
|
|
999
|
-
splitOne,
|
|
1000
|
-
endInfusion,
|
|
1001
|
-
infuseEntry,
|
|
1002
|
-
createEntry,
|
|
1003
|
-
infusionsEndedByChoice,
|
|
1004
|
-
reconcileChoiceEdit,
|
|
1005
|
-
infusionsEndedByClassEdit,
|
|
1006
|
-
reconcileClassEdit,
|
|
1007
|
-
eligibleTargets,
|
|
1008
|
-
bindFeatureConsumers,
|
|
1009
|
-
levelPrereqMax,
|
|
1010
|
-
poolAnchorLevel,
|
|
1011
|
-
resolvePool,
|
|
1012
|
-
resolveAllPools,
|
|
1013
|
-
strandedPicks
|
|
1014
|
-
};
|