@archivist-gg/dnd5e 0.3.24 → 0.3.27

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.
Files changed (112) hide show
  1. package/dist/background/background.codec.js +1 -1
  2. package/dist/background/background.parser.js +1 -1
  3. package/dist/background/background.schema.js +1 -1
  4. package/dist/{chunk-RDXQAZBA.js → chunk-35HHIMOJ.js} +1 -1
  5. package/dist/{chunk-7J5BNH2D.js → chunk-3A4OSTC4.js} +1 -1
  6. package/dist/{chunk-6ASJ3MVB.js → chunk-535ZMMZI.js} +1 -1
  7. package/dist/{chunk-RL4VY2AL.js → chunk-5XDCM6YK.js} +1 -1
  8. package/dist/{chunk-QFIGPOFW.js → chunk-6J3L2RYZ.js} +1 -1
  9. package/dist/{chunk-XQMKH4R4.js → chunk-72PRMZRD.js} +1 -1
  10. package/dist/chunk-757KM22B.js +1 -0
  11. package/dist/{chunk-OTFNINUY.js → chunk-7CFLU2XL.js} +1 -1
  12. package/dist/{chunk-334WLI7V.js → chunk-AFEWQFQZ.js} +1 -1
  13. package/dist/{chunk-TLXFGGWH.js → chunk-AHEL6LJ5.js} +1 -1
  14. package/dist/{chunk-RQGTBHJW.js → chunk-BAOZAXB3.js} +1 -1
  15. package/dist/chunk-BPXQOJES.js +1 -0
  16. package/dist/{chunk-5FEXHY4U.js → chunk-BWIEA5ZP.js} +1 -1
  17. package/dist/chunk-CCAVZANF.js +1 -0
  18. package/dist/{chunk-A7H6LX47.js → chunk-CEHL7PPC.js} +1 -1
  19. package/dist/{chunk-BGX36NPE.js → chunk-CSTAQQGX.js} +1 -1
  20. package/dist/{chunk-IOCJIWCV.js → chunk-EBFLUJIW.js} +1 -1
  21. package/dist/chunk-EON7T2SN.js +1 -0
  22. package/dist/chunk-FD2VQ3H6.js +1 -0
  23. package/dist/{chunk-2LCGKNVM.js → chunk-GKNOCYDT.js} +1 -1
  24. package/dist/{chunk-7UPYRKMF.js → chunk-GPBPFKUK.js} +1 -1
  25. package/dist/{chunk-KZDDFG4O.js → chunk-IR5BA2DZ.js} +1 -1
  26. package/dist/{chunk-BPKG6RZ7.js → chunk-JGCE4JVX.js} +1 -1
  27. package/dist/{chunk-PZUPZBTN.js → chunk-KEXSF3CH.js} +1 -1
  28. package/dist/{chunk-7AKJBRBD.js → chunk-LVKSX6EQ.js} +1 -1
  29. package/dist/{chunk-DZKSXSJF.js → chunk-OV4FG4KO.js} +1 -1
  30. package/dist/{chunk-NI364WV7.js → chunk-PFQPP77Q.js} +1 -1
  31. package/dist/{chunk-DY6FVAGA.js → chunk-PKIMOVQG.js} +1 -1
  32. package/dist/{chunk-GIOV6JW7.js → chunk-R2YRQM7G.js} +1 -1
  33. package/dist/{chunk-HR5MKCP2.js → chunk-TGK4OP7P.js} +1 -1
  34. package/dist/{chunk-I4O2FIDT.js → chunk-U7BPRRY5.js} +1 -1
  35. package/dist/chunk-UWDHEIPY.js +1 -0
  36. package/dist/{chunk-KBFSJ5WE.js → chunk-VHIE2KYQ.js} +1 -1
  37. package/dist/{chunk-QBA757AU.js → chunk-WAUNLUFQ.js} +1 -1
  38. package/dist/{chunk-WUHTSLG4.js → chunk-WXL7ABDO.js} +1 -1
  39. package/dist/{chunk-N3RYJ7RE.js → chunk-XFFFTR6O.js} +1 -1
  40. package/dist/{chunk-6LCNV26D.js → chunk-XVXNBWK6.js} +1 -1
  41. package/dist/{chunk-V6NQ547U.js → chunk-ZREOQMHM.js} +1 -1
  42. package/dist/class/class.codec.js +1 -1
  43. package/dist/class/class.parser.js +1 -1
  44. package/dist/class/class.schema.d.ts +2 -2
  45. package/dist/class/class.schema.js +1 -1
  46. package/dist/feat/feat.codec.js +1 -1
  47. package/dist/feat/feat.parser.js +1 -1
  48. package/dist/feat/feat.schema.d.ts +55 -3
  49. package/dist/feat/feat.schema.js +1 -1
  50. package/dist/index.js +14 -14
  51. package/dist/item/item.codec.js +1 -1
  52. package/dist/item/item.icon.js +1 -1
  53. package/dist/item/item.parser.js +1 -1
  54. package/dist/item/item.schema.d.ts +3 -0
  55. package/dist/item/item.schema.js +1 -1
  56. package/dist/item/item.types.d.ts +3 -0
  57. package/dist/monster/monster.parser.js +1 -1
  58. package/dist/monster/monster.schema.js +1 -1
  59. package/dist/optional-feature/optional-feature.codec.js +1 -1
  60. package/dist/optional-feature/optional-feature.parser.js +1 -1
  61. package/dist/optional-feature/optional-feature.schema.d.ts +54 -2
  62. package/dist/optional-feature/optional-feature.schema.js +1 -1
  63. package/dist/pc/pc.additional-spells.js +1 -1
  64. package/dist/pc/pc.amount-bindings.d.ts +3 -3
  65. package/dist/pc/pc.amount-bindings.js +1 -1
  66. package/dist/pc/pc.decision-engine.d.ts +6 -0
  67. package/dist/pc/pc.decision-engine.js +1 -1
  68. package/dist/pc/pc.entry-overrides.d.ts +19 -0
  69. package/dist/pc/pc.entry-overrides.js +1 -1
  70. package/dist/pc/pc.equipment.js +1 -1
  71. package/dist/pc/pc.feature-effects.d.ts +17 -9
  72. package/dist/pc/pc.feature-effects.js +1 -1
  73. package/dist/pc/pc.infusions.js +1 -1
  74. package/dist/pc/pc.item-effects.d.ts +1 -0
  75. package/dist/pc/pc.item-effects.js +1 -0
  76. package/dist/pc/pc.member-choices.js +1 -1
  77. package/dist/pc/pc.parser.js +1 -1
  78. package/dist/pc/pc.pools.js +1 -1
  79. package/dist/pc/pc.proficiencies.js +1 -1
  80. package/dist/pc/pc.proficiency-grants.d.ts +3 -1
  81. package/dist/pc/pc.recalc.d.ts +1 -0
  82. package/dist/pc/pc.recalc.js +1 -1
  83. package/dist/pc/pc.resolver.d.ts +9 -0
  84. package/dist/pc/pc.resolver.js +1 -1
  85. package/dist/pc/pc.resource-seed.js +1 -1
  86. package/dist/pc/pc.resources.js +1 -1
  87. package/dist/pc/pc.rest.js +1 -1
  88. package/dist/pc/pc.schema.d.ts +27 -0
  89. package/dist/pc/pc.schema.js +1 -1
  90. package/dist/pc/pc.speeds.d.ts +20 -3
  91. package/dist/pc/pc.spellcasting.js +1 -1
  92. package/dist/pc/pc.table-column.d.ts +3 -0
  93. package/dist/pc/pc.table-column.js +1 -1
  94. package/dist/pc/pc.types.d.ts +22 -0
  95. package/dist/race/race.codec.js +1 -1
  96. package/dist/race/race.parser.js +1 -1
  97. package/dist/race/race.schema.js +1 -1
  98. package/dist/schemas/choice-schema.js +1 -1
  99. package/dist/schemas/feature-effect-schema.d.ts +54 -2
  100. package/dist/schemas/feature-effect-schema.js +1 -1
  101. package/dist/schemas/feature-schema.js +1 -1
  102. package/dist/subclass/subclass.codec.js +1 -1
  103. package/dist/subclass/subclass.parser.js +1 -1
  104. package/dist/subclass/subclass.schema.js +1 -1
  105. package/dist/types/feature-effect.d.ts +16 -2
  106. package/package.json +1 -1
  107. package/dist/chunk-6IC53O3Q.js +0 -1
  108. package/dist/chunk-7LPKI27J.js +0 -1
  109. package/dist/chunk-HCK6IUB3.js +0 -1
  110. package/dist/chunk-IGVRLGLM.js +0 -1
  111. package/dist/chunk-MC6PLWRZ.js +0 -1
  112. package/dist/chunk-PQAVMK3T.js +0 -1
@@ -1 +1 @@
1
- import{itemCodec}from"../chunk-XQMKH4R4.js";import"../chunk-7LPKI27J.js";import"../chunk-RL4VY2AL.js";import"../chunk-I26FHSI6.js";export{itemCodec};
1
+ import{itemCodec}from"../chunk-72PRMZRD.js";import"../chunk-757KM22B.js";import"../chunk-5XDCM6YK.js";import"../chunk-I26FHSI6.js";export{itemCodec};
@@ -1 +1 @@
1
- var GENERIC_ICON={weapon:"generic:weapon",armor:"generic:armor",item:"generic:item"};var WEAPON_KEYS=new Set(["club","dagger","greatclub","handaxe","javelin","light-hammer","mace","quarterstaff","sickle","spear","light-crossbow","dart","shortbow","sling","battleaxe","flail","glaive","greataxe","greatsword","halberd","lance","longsword","maul","morningstar","pike","rapier","scimitar","shortsword","trident","war-pick","warhammer","whip","blowgun","hand-crossbow","heavy-crossbow","longbow","net"]);var WEAPON_ALIAS={"crossbow-hand":"hand-crossbow","crossbow-light":"light-crossbow","crossbow-heavy":"heavy-crossbow"};var ARMOR_CATEGORY_KEY={light:"light-armor",medium:"medium-armor",heavy:"heavy-armor",shield:"shield"};var ARMOR_BASE_CATEGORY={padded:"light",leather:"light","studded-leather":"light",hide:"medium","chain-shirt":"medium","scale-mail":"medium",breastplate:"medium","half-plate":"medium","ring-mail":"heavy","chain-mail":"heavy",splint:"heavy",plate:"heavy",shield:"shield"};var TYPE_DIRECT={ring:"ring",potion:"potion",scroll:"scroll",wand:"wand",staff:"staff",rod:"rod",shield:"shield"};var NAME_WORDS=[["backpack",["backpack","haversack"]],["pouch",["pouch","coin purse"]],["quiver",["quiver","bolt case"]],["chest",["chest"]],["barrel",["barrel","basket","bucket"]],["pot",["pot","jug"]],["sack",["sack","bag"]],["amulet",["amulet","necklace","periapt"]],["cloak",["cloak","robe","robes"]],["boots",["boots","slippers"]],["gloves",["gloves","gauntlets","bracers"]],["belt",["belt","girdle"]],["circlet",["circlet","headband","diadem"]],["crown",["crown"]],["helmet",["helm","helmet"]],["rations",["rations"]],["waterskin",["waterskin"]],["instrument",["instrument","instruments"]],["dice",["dice","dice set","gaming set"]],["gem",["gem","gems"]],["hourglass",["hourglass"]],["flask",["flask","vial","bottle","oil","holy water","acid"]],["torch",["torch"]],["lantern",["lantern","lamp"]],["candle",["candle","tinderbox"]],["rope",["rope","chain"]],["crowbar",["crowbar"]],["manacles",["manacles"]],["mirror",["mirror"]],["spyglass",["spyglass"]],["compass",["compass"]],["map",["map"]],["spellbook",["spellbook"]],["book",["book","journal"]],["quill",["ink","ink pen","paper"]],["bedroll",["bedroll","blanket"]],["tent",["tent"]],["holy-symbol",["holy symbol","reliquary"]],["healer-kit",["healer's kit"]],["herbs",["herbalism kit","herbs"]],["key",["thieves' tools","key","lock"]],["tools",["artisan's tools","hammer","smith's tools"]],["cards",["playing cards","playing card set"]],["coins",["coin","coins","trade bar","trade bars"]],["stone",["stone","stones"]],["wand",["wand"]],["rod",["rod"]],["staff",["staff"]],["ring",["ring"]],["net",["net"]]];var FOCUS_KEY={holy:"holy-symbol",arcane:"wondrous",druid:"herbs"};var TYPE_FALLBACK={instrument:"instrument","artisan's tools":"tools",tool:"tools",tools:"tools","gaming set":"dice",ammunition:"quiver",food:"rations",wondrous:"wondrous"};var AMMUNITION_NAME=/\b(?:ammunition|arrows?|bolts?|bullets?|needles?)\b/i;var TATTOO_NAME=/\btattoo\b/i;var escapeRe=w=>w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var NAME_RULES=NAME_WORDS.map(([key,words])=>[key,new RegExp(`\\b(?:${words.map(escapeRe).join("|")})\\b`,"i")]);var ITEM_ICON_KEYS=[...new Set(["tattoo","quiver",...WEAPON_KEYS,...Object.values(ARMOR_CATEGORY_KEY),...Object.values(TYPE_DIRECT),...NAME_WORDS.map(([k])=>k),...Object.values(FOCUS_KEY),...Object.values(TYPE_FALLBACK)])].sort();var text=v=>typeof v==="string"?v:"";function canon(raw){var _a;let s=raw.toLowerCase().replace(/\s*\([^)]*\)/g," ").trim();const comma=/^([^,]+),\s*(.+)$/.exec(s);if(comma)s=`${comma[2]} ${comma[1]}`;s=s.replace(/[\s-]+armou?r$/,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(_a=WEAPON_ALIAS[s])!=null?_a:s}var weaponKey=raw=>{const k=canon(raw);return WEAPON_KEYS.has(k)?k:void 0};var armorKey=raw=>{const cat=ARMOR_BASE_CATEGORY[canon(raw)];return cat?ARMOR_CATEGORY_KEY[cat]:void 0};function baseName(link){const raw=text(link).trim();if(!raw)return"";const m=/^\[\[([^\]|]+)(?:\|[^\]]*)?\]\]$/.exec(raw);const inner=m?m[1]:raw;return inner.includes("/")?inner.slice(inner.lastIndexOf("/")+1):inner.slice(inner.lastIndexOf("_")+1)}function itemIconKey(entity,entityType){var _a,_b,_c,_d,_e,_f,_g,_h;const e=entity!==null&&typeof entity==="object"?entity:{};const own=text(e.icon).trim();if(own)return own;const name=text(e.name);if(e.tattoo===true||TATTOO_NAME.test(name))return"tattoo";if(entityType==="weapon")return(_b=(_a=weaponKey(baseName(e.slug)))!=null?_a:weaponKey(name))!=null?_b:GENERIC_ICON.weapon;if(entityType==="armor"){const cat=text(e.category).toLowerCase().replace(/\s*armou?r\s*$/,"").trim();return(_d=(_c=ARMOR_CATEGORY_KEY[cat])!=null?_c:armorKey(name))!=null?_d:GENERIC_ICON.armor}const rawType=text(e.type).toLowerCase().trim();const paren=/^([^()]+?)\s*\(([^)]+)\)\s*$/.exec(rawType);const type=(paren?paren[1]:rawType).trim().replace(/\s+item$/,"");const inner=paren?paren[2].trim():"";if(type==="weapon"){return(_e=weaponKey(baseName(e.base_item)||inner))!=null?_e:AMMUNITION_NAME.test(name)?"quiver":GENERIC_ICON.weapon}if(type==="armor")return(_f=armorKey(baseName(e.base_item)||inner))!=null?_f:GENERIC_ICON.armor;const direct=TYPE_DIRECT[type];if(direct)return direct;const bare=name.replace(/\s*\([^)]*\)/g," ").trim();for(const[key,re]of NAME_RULES)if(re.test(bare))return key;if(type==="spellcasting focus")return(_g=FOCUS_KEY[text(e.focus).toLowerCase()])!=null?_g:"wondrous";return(_h=TYPE_FALLBACK[type])!=null?_h:GENERIC_ICON.item}export{GENERIC_ICON,ITEM_ICON_KEYS,itemIconKey};
1
+ var GENERIC_ICON={weapon:"generic:weapon",armor:"generic:armor",item:"generic:item"};var WEAPON_KEYS=new Set(["club","dagger","greatclub","handaxe","javelin","light-hammer","mace","quarterstaff","sickle","spear","light-crossbow","dart","shortbow","sling","battleaxe","flail","glaive","greataxe","greatsword","halberd","lance","longsword","maul","morningstar","pike","rapier","scimitar","shortsword","trident","war-pick","warhammer","whip","blowgun","hand-crossbow","heavy-crossbow","longbow","net"]);var FIREARM_KEYS=new Set(["pistol","musket","revolver","semiautomatic-pistol","hunting-rifle","automatic-rifle","shotgun","laser-pistol","laser-rifle","antimatter-rifle"]);var WEAPON_ALIAS={"crossbow-hand":"hand-crossbow","crossbow-light":"light-crossbow","crossbow-heavy":"heavy-crossbow","automatic-pistol":"semiautomatic-pistol"};var WEAPON_WORD_ALIAS={shortspear:"spear"};var ARMOR_CATEGORY_KEY={light:"light-armor",medium:"medium-armor",heavy:"heavy-armor",shield:"shield"};var ARMOR_BASE_CATEGORY={padded:"light",leather:"light","studded-leather":"light",hide:"medium","chain-shirt":"medium","scale-mail":"medium",breastplate:"medium","half-plate":"medium","ring-mail":"heavy","chain-mail":"heavy",splint:"heavy",plate:"heavy",shield:"shield"};var TYPE_DIRECT={ring:"ring",potion:"potion",scroll:"scroll",wand:"wand",staff:"staff",rod:"rod",shield:"shield"};var NAME_WORDS=[["grenade",["grenade","grenades"]],["bomb",["bomb","bombs"]],["dynamite",["dynamite"]],["backpack",["backpack","haversack"]],["pouch",["pouch","coin purse"]],["quiver",["quiver","bolt case"]],["chest",["chest"]],["barrel",["barrel","basket","bucket"]],["pot",["pot","jug"]],["sack",["sack","bag"]],["amulet",["amulet","necklace","periapt"]],["cloak",["cloak","robe","robes"]],["boots",["boots","slippers"]],["gloves",["gloves","gauntlets","bracers"]],["belt",["belt","girdle"]],["circlet",["circlet","headband","diadem"]],["crown",["crown"]],["helmet",["helm","helmet"]],["rations",["rations"]],["waterskin",["waterskin"]],["instrument",["instrument","instruments"]],["dice",["dice","dice set","gaming set"]],["gem",["gem","gems"]],["hourglass",["hourglass"]],["flask",["flask","vial","bottle","oil","holy water","acid"]],["torch",["torch"]],["lantern",["lantern","lamp"]],["candle",["candle","tinderbox"]],["rope",["rope","chain"]],["crowbar",["crowbar"]],["manacles",["manacles"]],["mirror",["mirror"]],["spyglass",["spyglass"]],["compass",["compass"]],["map",["map"]],["spellbook",["spellbook"]],["book",["book","journal"]],["quill",["ink","ink pen","paper"]],["bedroll",["bedroll","blanket"]],["tent",["tent"]],["holy-symbol",["holy symbol","reliquary"]],["healer-kit",["healer's kit"]],["herbs",["herbalism kit","herbs"]],["key",["thieves' tools","key","lock"]],["tools",["artisan's tools","hammer","smith's tools"]],["cards",["playing cards","playing card set"]],["coins",["coin","coins","trade bar","trade bars"]],["stone",["stone","stones"]],["wand",["wand"]],["rod",["rod"]],["staff",["staff"]],["ring",["ring"]],["net",["net"]]];var FOCUS_KEY={holy:"holy-symbol",arcane:"wondrous",druid:"herbs"};var TYPE_FALLBACK={instrument:"instrument","artisan's tools":"tools",tool:"tools",tools:"tools","gaming set":"dice",ammunition:"quiver",food:"rations",wondrous:"wondrous"};var AMMUNITION_NAME=/\b(?:ammunition|arrows?|bolts?|bullets?|needles?|energy cells?)\b/i;var TATTOO_NAME=/\btattoo\b/i;var escapeRe=w=>w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var NAME_RULES=NAME_WORDS.map(([key,words])=>[key,new RegExp(`\\b(?:${words.map(escapeRe).join("|")})\\b`,"i")]);var ITEM_ICON_KEYS=[...new Set(["tattoo","quiver",...WEAPON_KEYS,...FIREARM_KEYS,...Object.values(ARMOR_CATEGORY_KEY),...Object.values(TYPE_DIRECT),...NAME_WORDS.map(([k])=>k),...Object.values(FOCUS_KEY),...Object.values(TYPE_FALLBACK)])].sort();var text=v=>typeof v==="string"?v:"";function canon(raw){var _a;let s=raw.toLowerCase().replace(/\s*\([^)]*\)/g," ").trim();const comma=/^([^,]+),\s*(.+)$/.exec(s);if(comma)s=`${comma[2]} ${comma[1]}`;s=s.replace(/[\s-]+armou?r$/,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(_a=WEAPON_ALIAS[s])!=null?_a:s}var DRAWN_WEAPONS=[...WEAPON_KEYS,...FIREARM_KEYS];var weaponKey=raw=>{const k=canon(raw);if(!k)return void 0;if(WEAPON_KEYS.has(k)||FIREARM_KEYS.has(k))return k;const words=new Set(k.split("-").map(w=>{var _a;return(_a=WEAPON_WORD_ALIAS[w])!=null?_a:w}));let best;let bestWords=0;for(const key of DRAWN_WEAPONS){const parts=key.split("-");if(parts.length>bestWords&&parts.every(p=>words.has(p))){best=key;bestWords=parts.length}}return best};var nameWordKey=bare=>{var _a;return(_a=NAME_RULES.find(([,re])=>re.test(bare)))==null?void 0:_a[0]};var armorKey=raw=>{const cat=ARMOR_BASE_CATEGORY[canon(raw)];return cat?ARMOR_CATEGORY_KEY[cat]:void 0};function baseName(link){const raw=text(link).trim();if(!raw)return"";const m=/^\[\[([^\]|]+)(?:\|[^\]]*)?\]\]$/.exec(raw);const inner=m?m[1]:raw;return inner.includes("/")?inner.slice(inner.lastIndexOf("/")+1):inner.slice(inner.lastIndexOf("_")+1)}function itemIconKey(entity,entityType){var _a,_b,_c,_d,_e,_f,_g,_h,_i;const e=entity!==null&&typeof entity==="object"?entity:{};const own=text(e.icon).trim();if(own)return own;const name=text(e.name);if(e.tattoo===true||TATTOO_NAME.test(name))return"tattoo";if(entityType==="weapon")return(_b=(_a=weaponKey(baseName(e.slug)))!=null?_a:weaponKey(name))!=null?_b:GENERIC_ICON.weapon;if(entityType==="armor"){const cat=text(e.category).toLowerCase().replace(/\s*armou?r\s*$/,"").trim();return(_d=(_c=ARMOR_CATEGORY_KEY[cat])!=null?_c:armorKey(name))!=null?_d:GENERIC_ICON.armor}const rawType=text(e.type).toLowerCase().trim();const paren=/^([^()]+?)\s*\(([^)]+)\)\s*$/.exec(rawType);const type=(paren?paren[1]:rawType).trim().replace(/\s+item$/,"");const inner=paren?paren[2].trim():"";const bare=name.replace(/\s*\([^)]*\)/g," ").trim();if(type==="weapon"){return(_f=weaponKey(baseName(e.base_item)||inner))!=null?_f:AMMUNITION_NAME.test(name)?"quiver":(_e=nameWordKey(bare))!=null?_e:GENERIC_ICON.weapon}if(type==="armor")return(_g=armorKey(baseName(e.base_item)||inner))!=null?_g:GENERIC_ICON.armor;const direct=TYPE_DIRECT[type];if(direct)return direct;const word=nameWordKey(bare);if(word)return word;if(type==="spellcasting focus")return(_h=FOCUS_KEY[text(e.focus).toLowerCase()])!=null?_h:"wondrous";if(!type&&AMMUNITION_NAME.test(name))return"quiver";return(_i=TYPE_FALLBACK[type])!=null?_i:GENERIC_ICON.item}export{GENERIC_ICON,ITEM_ICON_KEYS,itemIconKey};
@@ -1 +1 @@
1
- import{parseItem}from"../chunk-7LPKI27J.js";import"../chunk-RL4VY2AL.js";import"../chunk-I26FHSI6.js";export{parseItem};
1
+ import{parseItem}from"../chunk-757KM22B.js";import"../chunk-5XDCM6YK.js";import"../chunk-I26FHSI6.js";export{parseItem};
@@ -246,6 +246,9 @@ export declare const itemEntitySchema: z.ZodObject<{
246
246
  condition: z.ZodOptional<z.ZodString>;
247
247
  }, z.core.$strip>>>;
248
248
  scroll_level: z.ZodOptional<z.ZodNumber>;
249
+ spell_charge_cost: z.ZodOptional<z.ZodNumber>;
250
+ spell_save_dc: z.ZodOptional<z.ZodNumber>;
251
+ spell_attack_bonus: z.ZodOptional<z.ZodNumber>;
249
252
  unidentified: z.ZodOptional<z.ZodBoolean>;
250
253
  masked_category: z.ZodOptional<z.ZodString>;
251
254
  modify_speed: z.ZodOptional<z.ZodObject<{
@@ -1 +1 @@
1
- import{conditionSchema,containerSchema,itemEntitySchema}from"../chunk-RL4VY2AL.js";import"../chunk-I26FHSI6.js";export{conditionSchema,containerSchema,itemEntitySchema};
1
+ import{conditionSchema,containerSchema,itemEntitySchema}from"../chunk-5XDCM6YK.js";import"../chunk-I26FHSI6.js";export{conditionSchema,containerSchema,itemEntitySchema};
@@ -146,6 +146,9 @@ export interface ItemEntity {
146
146
  condition?: string;
147
147
  }>;
148
148
  scroll_level?: number;
149
+ spell_charge_cost?: number;
150
+ spell_save_dc?: number;
151
+ spell_attack_bonus?: number;
149
152
  unidentified?: boolean;
150
153
  masked_category?: string;
151
154
  modify_speed?: {
@@ -1 +1 @@
1
- import{migrateLegacy,parseMonster}from"../chunk-6ASJ3MVB.js";import"../chunk-QFIGPOFW.js";import"../chunk-V6NQ547U.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-KBFSJ5WE.js";import"../chunk-6IC53O3Q.js";import"../chunk-I26FHSI6.js";export{migrateLegacy,parseMonster};
1
+ import{migrateLegacy,parseMonster}from"../chunk-535ZMMZI.js";import"../chunk-6J3L2RYZ.js";import"../chunk-ZREOQMHM.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-VHIE2KYQ.js";import"../chunk-EON7T2SN.js";import"../chunk-I26FHSI6.js";export{migrateLegacy,parseMonster};
@@ -1 +1 @@
1
- import{MONSTER_KNOWN_KEYS,alignmentEntrySchema,damageQualifierSchema,gearEntrySchema,initiativeSchema,monsterACSchema,monsterCRSchema,monsterHPSchema,monsterSchema,monsterSpeedSchema,monsterSpellcastingSchema,monsterTypeSchema}from"../chunk-QFIGPOFW.js";import"../chunk-V6NQ547U.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-KBFSJ5WE.js";import"../chunk-6IC53O3Q.js";import"../chunk-I26FHSI6.js";export{MONSTER_KNOWN_KEYS,alignmentEntrySchema,damageQualifierSchema,gearEntrySchema,initiativeSchema,monsterACSchema,monsterCRSchema,monsterHPSchema,monsterSchema,monsterSpeedSchema,monsterSpellcastingSchema,monsterTypeSchema};
1
+ import{MONSTER_KNOWN_KEYS,alignmentEntrySchema,damageQualifierSchema,gearEntrySchema,initiativeSchema,monsterACSchema,monsterCRSchema,monsterHPSchema,monsterSchema,monsterSpeedSchema,monsterSpellcastingSchema,monsterTypeSchema}from"../chunk-6J3L2RYZ.js";import"../chunk-ZREOQMHM.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-VHIE2KYQ.js";import"../chunk-EON7T2SN.js";import"../chunk-I26FHSI6.js";export{MONSTER_KNOWN_KEYS,alignmentEntrySchema,damageQualifierSchema,gearEntrySchema,initiativeSchema,monsterACSchema,monsterCRSchema,monsterHPSchema,monsterSchema,monsterSpeedSchema,monsterSpellcastingSchema,monsterTypeSchema};
@@ -1 +1 @@
1
- import{optionalFeatureCodec}from"../chunk-GIOV6JW7.js";import"../chunk-DZKSXSJF.js";import"../chunk-I4O2FIDT.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-KBFSJ5WE.js";import"../chunk-6IC53O3Q.js";import"../chunk-I26FHSI6.js";export{optionalFeatureCodec};
1
+ import{optionalFeatureCodec}from"../chunk-R2YRQM7G.js";import"../chunk-OV4FG4KO.js";import"../chunk-U7BPRRY5.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-VHIE2KYQ.js";import"../chunk-EON7T2SN.js";import"../chunk-I26FHSI6.js";export{optionalFeatureCodec};
@@ -1 +1 @@
1
- import{parseOptionalFeature}from"../chunk-DZKSXSJF.js";import"../chunk-I4O2FIDT.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-KBFSJ5WE.js";import"../chunk-6IC53O3Q.js";import"../chunk-I26FHSI6.js";export{parseOptionalFeature};
1
+ import{parseOptionalFeature}from"../chunk-OV4FG4KO.js";import"../chunk-U7BPRRY5.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-VHIE2KYQ.js";import"../chunk-EON7T2SN.js";import"../chunk-I26FHSI6.js";export{parseOptionalFeature};
@@ -242,12 +242,29 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
242
242
  climb: "climb";
243
243
  burrow: "burrow";
244
244
  }>;
245
- value: z.ZodNumber;
245
+ value: z.ZodOptional<z.ZodNumber>;
246
+ equal_to: z.ZodOptional<z.ZodLiteral<"walk">>;
246
247
  set: z.ZodOptional<z.ZodBoolean>;
247
248
  scales_at: z.ZodOptional<z.ZodArray<z.ZodObject<{
248
249
  level: z.ZodNumber;
249
250
  value: z.ZodNumber;
250
251
  }, z.core.$strip>>>;
252
+ inactive_while: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
253
+ "heavy-armor": "heavy-armor";
254
+ armor: "armor";
255
+ shield: "shield";
256
+ }>, z.ZodArray<z.ZodEnum<{
257
+ "heavy-armor": "heavy-armor";
258
+ armor: "armor";
259
+ shield: "shield";
260
+ }>>]>>;
261
+ condition: z.ZodOptional<z.ZodString>;
262
+ subject: z.ZodOptional<z.ZodString>;
263
+ }, z.core.$strip>, z.ZodObject<{
264
+ kind: z.ZodLiteral<"speed-rule">;
265
+ flag: z.ZodEnum<{
266
+ "ignore-armor-strength": "ignore-armor-strength";
267
+ }>;
251
268
  condition: z.ZodOptional<z.ZodString>;
252
269
  subject: z.ZodOptional<z.ZodString>;
253
270
  }, z.core.$strip>, z.ZodObject<{
@@ -294,6 +311,7 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
294
311
  unarmed: "unarmed";
295
312
  finesse: "finesse";
296
313
  thrown: "thrown";
314
+ heavy: "heavy";
297
315
  "pact-weapon": "pact-weapon";
298
316
  }>, z.ZodArray<z.ZodEnum<{
299
317
  weapon: "weapon";
@@ -302,6 +320,7 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
302
320
  unarmed: "unarmed";
303
321
  finesse: "finesse";
304
322
  thrown: "thrown";
323
+ heavy: "heavy";
305
324
  "pact-weapon": "pact-weapon";
306
325
  }>>]>>;
307
326
  spell_scope: z.ZodOptional<z.ZodObject<{
@@ -319,11 +338,11 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
319
338
  kind: z.ZodLiteral<"proficiency">;
320
339
  proficiency_type: z.ZodEnum<{
321
340
  weapon: "weapon";
341
+ armor: "armor";
322
342
  skill: "skill";
323
343
  tool: "tool";
324
344
  language: "language";
325
345
  "saving-throw": "saving-throw";
326
- armor: "armor";
327
346
  }>;
328
347
  value: z.ZodString;
329
348
  expertise: z.ZodOptional<z.ZodBoolean>;
@@ -408,6 +427,7 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
408
427
  unarmed: "unarmed";
409
428
  finesse: "finesse";
410
429
  thrown: "thrown";
430
+ heavy: "heavy";
411
431
  "pact-weapon": "pact-weapon";
412
432
  }>, z.ZodArray<z.ZodEnum<{
413
433
  weapon: "weapon";
@@ -416,6 +436,7 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
416
436
  unarmed: "unarmed";
417
437
  finesse: "finesse";
418
438
  thrown: "thrown";
439
+ heavy: "heavy";
419
440
  "pact-weapon": "pact-weapon";
420
441
  }>>]>>;
421
442
  condition: z.ZodOptional<z.ZodString>;
@@ -448,6 +469,37 @@ export declare const optionalFeatureEntitySchema: z.ZodObject<{
448
469
  }>;
449
470
  condition: z.ZodOptional<z.ZodString>;
450
471
  subject: z.ZodOptional<z.ZodString>;
472
+ }, z.core.$strip>, z.ZodObject<{
473
+ kind: z.ZodLiteral<"damage-roll-option">;
474
+ mode: z.ZodEnum<{
475
+ "reroll-weapon-dice-keep-higher": "reroll-weapon-dice-keep-higher";
476
+ "min-die-face": "min-die-face";
477
+ "reroll-below": "reroll-below";
478
+ }>;
479
+ value: z.ZodOptional<z.ZodNumber>;
480
+ applies_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
481
+ weapon: "weapon";
482
+ melee: "melee";
483
+ ranged: "ranged";
484
+ unarmed: "unarmed";
485
+ finesse: "finesse";
486
+ thrown: "thrown";
487
+ heavy: "heavy";
488
+ "pact-weapon": "pact-weapon";
489
+ }>, z.ZodArray<z.ZodEnum<{
490
+ weapon: "weapon";
491
+ melee: "melee";
492
+ ranged: "ranged";
493
+ unarmed: "unarmed";
494
+ finesse: "finesse";
495
+ thrown: "thrown";
496
+ heavy: "heavy";
497
+ "pact-weapon": "pact-weapon";
498
+ }>>]>>;
499
+ two_handed: z.ZodOptional<z.ZodBoolean>;
500
+ once_per_turn: z.ZodOptional<z.ZodBoolean>;
501
+ condition: z.ZodOptional<z.ZodString>;
502
+ subject: z.ZodOptional<z.ZodString>;
451
503
  }, z.core.$strip>, z.ZodObject<{
452
504
  kind: z.ZodLiteral<"immunity">;
453
505
  damage_type: z.ZodString;
@@ -1 +1 @@
1
- import{infuseBlockSchema,optionRowSchema,optionalFeatureEntitySchema}from"../chunk-I4O2FIDT.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-KBFSJ5WE.js";import"../chunk-6IC53O3Q.js";import"../chunk-I26FHSI6.js";export{infuseBlockSchema,optionRowSchema,optionalFeatureEntitySchema};
1
+ import{infuseBlockSchema,optionRowSchema,optionalFeatureEntitySchema}from"../chunk-U7BPRRY5.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-VHIE2KYQ.js";import"../chunk-EON7T2SN.js";import"../chunk-I26FHSI6.js";export{infuseBlockSchema,optionRowSchema,optionalFeatureEntitySchema};
@@ -1 +1 @@
1
- import{buildSpellNameIndex,chosenRaceOptionKeys,collectAdditionalSpells,normalizeSpellRef,prefixOf,raceIsUngated,resolveSpellByName}from"../chunk-A7H6LX47.js";import"../chunk-UBUKCRZ3.js";import"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-I26FHSI6.js";export{buildSpellNameIndex,chosenRaceOptionKeys,collectAdditionalSpells,normalizeSpellRef,prefixOf,raceIsUngated,resolveSpellByName};
1
+ import{buildSpellNameIndex,chosenRaceOptionKeys,collectAdditionalSpells,normalizeSpellRef,prefixOf,raceIsUngated,resolveSpellByName}from"../chunk-CEHL7PPC.js";import"../chunk-UBUKCRZ3.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-I26FHSI6.js";export{buildSpellNameIndex,chosenRaceOptionKeys,collectAdditionalSpells,normalizeSpellRef,prefixOf,raceIsUngated,resolveSpellByName};
@@ -5,12 +5,12 @@ import type { DerivedStats, FeatureSource, ResolvedCharacter, ResolvedSpell, Spe
5
5
  export type AmountDerived = Pick<DerivedStats, "proficiencyBonus" | "mods" | "spellcastingClasses"> & Partial<Pick<DerivedStats, "abilitySpellcasting">>;
6
6
  export declare function ownerClassSlug(source: FeatureSource | undefined, resolved: Pick<ResolvedCharacter, "classes">): string | null;
7
7
  export declare function amountBindingsFor(owner: FeatureSource | undefined, resolved: Pick<ResolvedCharacter, "classes" | "totalLevel">, derived: AmountDerived): AmountBindings;
8
- export declare function spellcastingFor(spell: Pick<ResolvedSpell, "source" | "classSlug" | "ability">, derived: AmountDerived): {
9
- ability: Ability;
8
+ export declare function spellcastingFor(spell: Pick<ResolvedSpell, "source" | "classSlug" | "ability" | "itemCasting">, derived: AmountDerived): {
9
+ ability: Ability | null;
10
10
  saveDC: number;
11
11
  attackBonus: number;
12
12
  } | null;
13
- export declare function spellAmountBindings(spell: Pick<ResolvedSpell, "source" | "classSlug" | "ability">, resolved: Pick<ResolvedCharacter, "classes" | "totalLevel">, derived: AmountDerived): AmountBindings;
13
+ export declare function spellAmountBindings(spell: Pick<ResolvedSpell, "source" | "classSlug" | "ability" | "itemCasting">, resolved: Pick<ResolvedCharacter, "classes" | "totalLevel">, derived: AmountDerived): AmountBindings;
14
14
  export declare function spellRollBonus(spell: Pick<Spell, "damage_roll" | "description">): string | null;
15
15
  export declare function addSpellDamageRiders(roll: string, spell: Pick<ResolvedSpell, "slug" | "entity">, derived: Partial<Pick<DerivedStats, "spellDamageRiders">>): string;
16
16
  export declare function spellDamageRiderLines(spell: Pick<ResolvedSpell, "slug" | "entity">, derived: Partial<Pick<DerivedStats, "spellDamageRiders">>): Array<Pick<SpellDamageRider, "amount" | "damage_type" | "source" | "condition">>;
@@ -1 +1 @@
1
- import{addSpellDamageRiders,amountBindingsFor,ownerClassSlug,spellAmountBindings,spellDamageRiderLines,spellRollBonus,spellcastingFor}from"../chunk-MC6PLWRZ.js";import"../chunk-PZ3ZZ5H5.js";import"../chunk-PZUPZBTN.js";import"../chunk-NI364WV7.js";import"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-VIP3FH2O.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{addSpellDamageRiders,amountBindingsFor,ownerClassSlug,spellAmountBindings,spellDamageRiderLines,spellRollBonus,spellcastingFor};
1
+ import{addSpellDamageRiders,amountBindingsFor,ownerClassSlug,spellAmountBindings,spellDamageRiderLines,spellRollBonus,spellcastingFor}from"../chunk-CCAVZANF.js";import"../chunk-PZ3ZZ5H5.js";import"../chunk-KEXSF3CH.js";import"../chunk-PFQPP77Q.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-VIP3FH2O.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{addSpellDamageRiders,amountBindingsFor,ownerClassSlug,spellAmountBindings,spellDamageRiderLines,spellRollBonus,spellcastingFor};
@@ -63,6 +63,12 @@ export declare function collectChosenProficiencies(resolved: ResolvedCharacter):
63
63
  weapons: string[];
64
64
  saves: Ability[];
65
65
  };
66
+ export interface RuleProficiencySources {
67
+ skills: Record<string, string[]>;
68
+ expertise: Record<string, string[]>;
69
+ saves: Partial<Record<Ability, string[]>>;
70
+ }
71
+ export declare function collectRuleProficiencySources(resolved: ResolvedCharacter): RuleProficiencySources;
66
72
  export declare function computeEffectiveProficiencies(resolved: ResolvedCharacter): {
67
73
  languages: ProficiencyEntry[];
68
74
  tools: ProficiencyEntry[];
@@ -1 +1 @@
1
- import{__categoryToEntitySelectForTest,__matchesFilterForTest,buildDecisionLedger,collectChosenAbilityPoints,collectChosenProficiencies,computeEffectiveProficiencies,computeSuppressedProficiencies}from"../chunk-IGVRLGLM.js";import"../chunk-2EOGK6R6.js";import"../chunk-RQZCGXUZ.js";import"../chunk-PQAVMK3T.js";import"../chunk-HCK6IUB3.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-QBA757AU.js";import"../chunk-A7H6LX47.js";import"../chunk-UBUKCRZ3.js";import"../chunk-PZUPZBTN.js";import"../chunk-NI364WV7.js";import"../chunk-QVWT67WA.js";import"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.js";import"../chunk-O776WL7O.js";import"../chunk-3LWOVRLA.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import{wikilinkTailSlug}from"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-S5UCI27C.js";import"../chunk-6IC53O3Q.js";import"../chunk-I26FHSI6.js";export{__categoryToEntitySelectForTest,__matchesFilterForTest,buildDecisionLedger,collectChosenAbilityPoints,collectChosenProficiencies,computeEffectiveProficiencies,computeSuppressedProficiencies,wikilinkTailSlug};
1
+ import{__categoryToEntitySelectForTest,__matchesFilterForTest,buildDecisionLedger,collectChosenAbilityPoints,collectChosenProficiencies,collectRuleProficiencySources,computeEffectiveProficiencies,computeSuppressedProficiencies}from"../chunk-FD2VQ3H6.js";import"../chunk-2EOGK6R6.js";import"../chunk-RQZCGXUZ.js";import"../chunk-BPXQOJES.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-UWDHEIPY.js";import"../chunk-WAUNLUFQ.js";import"../chunk-CEHL7PPC.js";import"../chunk-UBUKCRZ3.js";import"../chunk-KEXSF3CH.js";import"../chunk-PFQPP77Q.js";import"../chunk-QVWT67WA.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-3LWOVRLA.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import{wikilinkTailSlug}from"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-S5UCI27C.js";import"../chunk-EON7T2SN.js";import"../chunk-I26FHSI6.js";export{__categoryToEntitySelectForTest,__matchesFilterForTest,buildDecisionLedger,collectChosenAbilityPoints,collectChosenProficiencies,collectRuleProficiencySources,computeEffectiveProficiencies,computeSuppressedProficiencies,wikilinkTailSlug};
@@ -13,6 +13,25 @@ export declare function effectiveItemRecovery(entry: EquipmentEntry, registry: E
13
13
  export declare function isConsumedOnUse(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): boolean;
14
14
  export declare function isScrollEntity(entity: unknown): boolean;
15
15
  export declare function isCastableScroll(entity: unknown): boolean;
16
+ export declare function settableSpellLevel(entity: unknown): number | null;
17
+ export declare function storesSpell(entity: unknown): boolean;
18
+ export declare function storedSpellNumbers(entity: unknown): {
19
+ saveDC?: number;
20
+ attackBonus?: number;
21
+ } | null;
22
+ export type ItemSpellUse = {
23
+ kind: "consume";
24
+ } | {
25
+ kind: "charges";
26
+ cost: number;
27
+ charges: {
28
+ current: number;
29
+ max: number;
30
+ };
31
+ } | {
32
+ kind: "at-will";
33
+ };
34
+ export declare function itemSpellUse(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): ItemSpellUse | null;
16
35
  export declare function effectiveItemCharges(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): NonNullable<EquipmentEntryState["charges"]> | undefined;
17
36
  export declare function effectiveItemArmorClass(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): {
18
37
  value: number;
@@ -1 +1 @@
1
- import{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,scrollSpellCost}from"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,scrollSpellCost};
1
+ import{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,itemSpellUse,scrollSpellCost,settableSpellLevel,storedSpellNumbers,storesSpell}from"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{WEAPON_DEFAULT_ACTION_COST,customizableOverrideKeys,defaultActionCost,effectiveItemArmorClass,effectiveItemCharges,effectiveItemRecovery,isCastableScroll,isConsumedOnUse,isScrollEntity,isWeaponLikeEntry,itemChargesMax,itemSpellUse,scrollSpellCost,settableSpellLevel,storedSpellNumbers,storesSpell};
@@ -1 +1 @@
1
- import{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes}from"../chunk-7UPYRKMF.js";import"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import"../chunk-4E2GIWJE.js";import"../chunk-PQAVMK3T.js";import"../chunk-HCK6IUB3.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-QBA757AU.js";import"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-NEMX7QGG.js";import"../chunk-56JK6VCL.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-6IC53O3Q.js";export{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes};
1
+ import{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes}from"../chunk-GPBPFKUK.js";import"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import"../chunk-4E2GIWJE.js";import"../chunk-BPXQOJES.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-UWDHEIPY.js";import"../chunk-WAUNLUFQ.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-NEMX7QGG.js";import"../chunk-56JK6VCL.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-EON7T2SN.js";export{buildFeatureAttackRows,buildUnarmedRow,computeAppliedBonuses,computeSlotsAndAttacks,emptyAppliedBonuses,isWeaponSlugProficient,pactWeaponIndexes};
@@ -1,11 +1,20 @@
1
- import type { FeatureEffect, SenseType, WeaponScope } from "@archivist-gg/dnd5e/types/feature-effect";
1
+ import type { FeatureEffect, SenseType, SpeedGateWord, WeaponScope } from "@archivist-gg/dnd5e/types/feature-effect";
2
2
  import type { Ability } from "@archivist-gg/dnd5e";
3
- import type { ConditionalCrit, DamageRider, DefenseGrant, DefenseItemSource, FeatureSource, SpeedMode, ResolvedCharacter, ResolvedFeature, RollModifierEntry, SaveOutcomeEntry, SpellDamageRider } from "./pc.types.js";
3
+ import type { ConditionalCrit, DamageRider, DamageRollOption, DefenseGrant, DefenseItemSource, FeatureSource, SpeedMode, ResolvedCharacter, ResolvedFeature, RollModifierEntry, SaveOutcomeEntry, SpellDamageRider } from "./pc.types.js";
4
4
  export interface WeaponAbilityOverride {
5
5
  ability: Ability;
6
6
  weaponSlugs?: string[];
7
7
  pactWeapon?: true;
8
8
  }
9
+ export interface SpeedEffectTerm {
10
+ mode: SpeedMode;
11
+ label: string;
12
+ value: number;
13
+ set: boolean;
14
+ condition?: string;
15
+ equalsWalk?: true;
16
+ inactiveWhile?: SpeedGateWord[];
17
+ }
9
18
  export interface FeatureEffectTotals {
10
19
  initiative_bonus: number;
11
20
  initiative_terms: {
@@ -45,13 +54,8 @@ export interface FeatureEffectTotals {
45
54
  label: string;
46
55
  value: number;
47
56
  }[];
48
- speed_terms: {
49
- mode: SpeedMode;
50
- label: string;
51
- value: number;
52
- set: boolean;
53
- condition?: string;
54
- }[];
57
+ speed_terms: SpeedEffectTerm[];
58
+ ignore_armor_strength: string[];
55
59
  speed_walk_set: number;
56
60
  attunement_set: number;
57
61
  ability_bonus: Partial<Record<Ability, number>>;
@@ -88,6 +92,9 @@ export interface FeatureEffectTotals {
88
92
  attackNotes: string[];
89
93
  damageBonuses: DamageRider[];
90
94
  spellDamageBonuses: SpellDamageRider[];
95
+ damageRollOptions: Array<DamageRollOption & {
96
+ scope?: WeaponScope[];
97
+ }>;
91
98
  }
92
99
  export declare function emptyFeatureEffectTotals(): FeatureEffectTotals;
93
100
  export declare function pushDefenseGrant(list: DefenseGrant[], value: string, source: string, condition?: string, item?: DefenseItemSource): void;
@@ -96,6 +103,7 @@ export interface FeatureEffectsOpts {
96
103
  activeBuffs?: Set<string>;
97
104
  levelFor?: (source: FeatureSource) => number;
98
105
  tableDiceFor?: (source: FeatureSource, column: string, level: number) => string | null;
106
+ tableCellFor?: (source: FeatureSource, column: string) => string | null;
99
107
  }
100
108
  export declare function foldsNow(rf: ResolvedFeature, activeBuffs: Set<string>): boolean;
101
109
  export declare function assembleEffectFeatures(resolved: ResolvedCharacter): {
@@ -1 +1 @@
1
- import{assembleEffectFeatures,classifyProficiencyEffect,collectProficiencyEffectGrants,computeFeatureEffects,emptyFeatureEffectTotals,foldsNow,foldsOnSelf,mergeDefenseItems,pushDefenseGrant,selfEffectsOf}from"../chunk-HCK6IUB3.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-QBA757AU.js";import"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{assembleEffectFeatures,classifyProficiencyEffect,collectProficiencyEffectGrants,computeFeatureEffects,emptyFeatureEffectTotals,foldsNow,foldsOnSelf,mergeDefenseItems,pushDefenseGrant,selfEffectsOf};
1
+ import{assembleEffectFeatures,classifyProficiencyEffect,collectProficiencyEffectGrants,computeFeatureEffects,emptyFeatureEffectTotals,foldsNow,foldsOnSelf,mergeDefenseItems,pushDefenseGrant,selfEffectsOf}from"../chunk-BPXQOJES.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import"../chunk-VTQ4RWEG.js";import"../chunk-WAUNLUFQ.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{assembleEffectFeatures,classifyProficiencyEffect,collectProficiencyEffectGrants,computeFeatureEffects,emptyFeatureEffectTotals,foldsNow,foldsOnSelf,mergeDefenseItems,pushDefenseGrant,selfEffectsOf};
@@ -1 +1 @@
1
- import{buildInfusionContext,createEntry,eligibleTargets,endInfusion,entryCharges,infuseEntry,infusionsEndedByChoice,infusionsEndedByClassEdit,isItemBound,isMarkedEntry,markerKey,normalizedPickKey,optionCandidates,parsePickKey,poolActiveWords,poolCountLabel,reconcileChoiceEdit,reconcileClassEdit,resolveCopyOption,resolveEntryEntity,resolveOptionRows,scaledInfuseItem,splitOne,withEntryCharges}from"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{buildInfusionContext,createEntry,eligibleTargets,endInfusion,entryCharges,infuseEntry,infusionsEndedByChoice,infusionsEndedByClassEdit,isItemBound,isMarkedEntry,markerKey,normalizedPickKey,optionCandidates,parsePickKey,poolActiveWords,poolCountLabel,reconcileChoiceEdit,reconcileClassEdit,resolveCopyOption,resolveEntryEntity,resolveOptionRows,scaledInfuseItem,splitOne,withEntryCharges};
1
+ import{buildInfusionContext,createEntry,eligibleTargets,endInfusion,entryCharges,infuseEntry,infusionsEndedByChoice,infusionsEndedByClassEdit,isItemBound,isMarkedEntry,markerKey,normalizedPickKey,optionCandidates,parsePickKey,poolActiveWords,poolCountLabel,reconcileChoiceEdit,reconcileClassEdit,resolveCopyOption,resolveEntryEntity,resolveOptionRows,scaledInfuseItem,splitOne,withEntryCharges}from"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{buildInfusionContext,createEntry,eligibleTargets,endInfusion,entryCharges,infuseEntry,infusionsEndedByChoice,infusionsEndedByClassEdit,isItemBound,isMarkedEntry,markerKey,normalizedPickKey,optionCandidates,parsePickKey,poolActiveWords,poolCountLabel,reconcileChoiceEdit,reconcileClassEdit,resolveCopyOption,resolveEntryEntity,resolveOptionRows,scaledInfuseItem,splitOne,withEntryCharges};
@@ -6,6 +6,7 @@ import type { FeatureEffect } from "../types/feature-effect.js";
6
6
  import { type EntryView, type InfusionContext } from "./pc.infusions.js";
7
7
  import type { EquipmentEntry, ResolvedFeature } from "./pc.types.js";
8
8
  export declare function itemBenefitsActive(entry: EquipmentEntry, entity: ItemEntity | ArmorEntity | WeaponEntity | null, registry: EntityRegistry | null, view?: EntryView | null): boolean;
9
+ export declare function itemSpellCastable(entry: EquipmentEntry, registry: EntityRegistry | null, view?: EntryView | null): boolean;
9
10
  export declare function itemLabel(entry: EquipmentEntry, entity: {
10
11
  name?: unknown;
11
12
  } | null): string;
@@ -0,0 +1 @@
1
+ import{ITEM_ROW_KINDS,buildItemFeatures,itemBenefitsActive,itemLabel,itemRowEffects,itemSpellCastable,readItemEffects}from"../chunk-UWDHEIPY.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-EON7T2SN.js";export{ITEM_ROW_KINDS,buildItemFeatures,itemBenefitsActive,itemLabel,itemRowEffects,itemSpellCastable,readItemEffects};
@@ -1 +1 @@
1
- import{PACT_WEAPON_CHOICE_ID,classPactWeaponPick,featOfSite,featPickSites,isTargetChoice,memberChoices,memberSpellTargets,nestedPickKeysToPrune,pactWeaponPick,poolMemberSites,poolMemberSitesOf,raceFeatSites,spellsReached}from"../chunk-QBA757AU.js";import"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{PACT_WEAPON_CHOICE_ID,classPactWeaponPick,featOfSite,featPickSites,isTargetChoice,memberChoices,memberSpellTargets,nestedPickKeysToPrune,pactWeaponPick,poolMemberSites,poolMemberSitesOf,raceFeatSites,spellsReached};
1
+ import{PACT_WEAPON_CHOICE_ID,classPactWeaponPick,featOfSite,featPickSites,isTargetChoice,memberChoices,memberSpellTargets,nestedPickKeysToPrune,pactWeaponPick,poolMemberSites,poolMemberSitesOf,raceFeatSites,spellsReached}from"../chunk-WAUNLUFQ.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{PACT_WEAPON_CHOICE_ID,classPactWeaponPick,featOfSite,featPickSites,isTargetChoice,memberChoices,memberSpellTargets,nestedPickKeysToPrune,pactWeaponPick,poolMemberSites,poolMemberSitesOf,raceFeatSites,spellsReached};
@@ -1 +1 @@
1
- import{characterSchema}from"../chunk-5FEXHY4U.js";import"../chunk-KM75CC6Q.js";import{keptSlugForLink}from"../chunk-PZ4L2EEG.js";import"../chunk-63YJPWTM.js";import*as yaml from"js-yaml";function parsePC(source){var _a;let raw;try{raw=yaml.load(source)}catch(e){const msg=e instanceof Error?e.message:String(e);return{success:false,error:`YAML parse error: ${msg}`}}if(!raw||typeof raw!=="object"){return{success:false,error:"Invalid YAML: expected an object"}}const result=characterSchema.safeParse(raw);if(!result.success){const issue=result.error.issues[0];const path=issue.path.length?issue.path.join("."):"(root)";return{success:false,error:`${path}: ${issue.message}`}}const data=result.data;const legacyState=data.state;const legacyCurrency=legacyState.currency;if(legacyCurrency&&!data.currency){data.currency=legacyCurrency}if(legacyCurrency){delete legacyState.currency}if(legacyState.attuned_items){delete legacyState.attuned_items}for(const entry of(_a=data.equipment)!=null?_a:[]){if(typeof entry.item!=="string")continue;const next=migrateRetiredItemLink(entry.item);if(next!==null)entry.item=next}return{success:true,data}}function migrateRetiredItemLink(item){var _a;const m=/^\[\[([^\]|]+)(\|[^\]]*)?\]\]$/.exec(item.trim());const kept=keptSlugForLink(m?m[1]:item);if(kept===void 0)return null;return m?`[[${kept}${(_a=m[2])!=null?_a:""}]]`:kept}export{parsePC};
1
+ import{characterSchema}from"../chunk-BWIEA5ZP.js";import"../chunk-KM75CC6Q.js";import{keptSlugForLink}from"../chunk-PZ4L2EEG.js";import"../chunk-63YJPWTM.js";import*as yaml from"js-yaml";function parsePC(source){var _a;let raw;try{raw=yaml.load(source)}catch(e){const msg=e instanceof Error?e.message:String(e);return{success:false,error:`YAML parse error: ${msg}`}}if(!raw||typeof raw!=="object"){return{success:false,error:"Invalid YAML: expected an object"}}const result=characterSchema.safeParse(raw);if(!result.success){const issue=result.error.issues[0];const path=issue.path.length?issue.path.join("."):"(root)";return{success:false,error:`${path}: ${issue.message}`}}const data=result.data;const legacyState=data.state;const legacyCurrency=legacyState.currency;if(legacyCurrency&&!data.currency){data.currency=legacyCurrency}if(legacyCurrency){delete legacyState.currency}if(legacyState.attuned_items){delete legacyState.attuned_items}for(const entry of(_a=data.equipment)!=null?_a:[]){if(typeof entry.item!=="string")continue;const next=migrateRetiredItemLink(entry.item);if(next!==null)entry.item=next}return{success:true,data}}function migrateRetiredItemLink(item){var _a;const m=/^\[\[([^\]|]+)(\|[^\]]*)?\]\]$/.exec(item.trim());const kept=keptSlugForLink(m?m[1]:item);if(kept===void 0)return null;return m?`[[${kept}${(_a=m[2])!=null?_a:""}]]`:kept}export{parsePC};
@@ -1 +1 @@
1
- import{heldPicks,levelPrereqMax,levelPrereqRefsMet,poolAnchorLevel,resolveAllPools,resolvePool,strandedPicks,withoutStrandedSites}from"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{heldPicks,levelPrereqMax,levelPrereqRefsMet,poolAnchorLevel,resolveAllPools,resolvePool,strandedPicks,withoutStrandedSites};
1
+ import{heldPicks,levelPrereqMax,levelPrereqRefsMet,poolAnchorLevel,resolveAllPools,resolvePool,strandedPicks,withoutStrandedSites}from"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-63YJPWTM.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{heldPicks,levelPrereqMax,levelPrereqRefsMet,poolAnchorLevel,resolveAllPools,resolvePool,strandedPicks,withoutStrandedSites};
@@ -1 +1 @@
1
- import{qualifiedGrantCovers}from"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import{collectChosenProficiencies,collectProficiencyGrants,computeEffectiveProficiencies,computeSuppressedProficiencies}from"../chunk-IGVRLGLM.js";import"../chunk-2EOGK6R6.js";import"../chunk-RQZCGXUZ.js";import"../chunk-PQAVMK3T.js";import"../chunk-HCK6IUB3.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import{normKey,proficiencyKey,proficiencyLabel,toProfSlug,weaponProfKey}from"../chunk-VTQ4RWEG.js";import"../chunk-QBA757AU.js";import"../chunk-A7H6LX47.js";import"../chunk-UBUKCRZ3.js";import"../chunk-PZUPZBTN.js";import"../chunk-NI364WV7.js";import"../chunk-QVWT67WA.js";import"../chunk-DY6FVAGA.js";import"../chunk-CMIEZQL4.js";import"../chunk-BGX36NPE.js";import"../chunk-O776WL7O.js";import"../chunk-3LWOVRLA.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-S5UCI27C.js";import"../chunk-6IC53O3Q.js";import"../chunk-I26FHSI6.js";function collectProficiencySources(resolved){const g=collectProficiencyGrants(resolved);const chosen=collectChosenProficiencies(resolved);return{...g,chosenLanguages:chosen.languages,chosenTools:chosen.tools,chosenWeapons:chosen.weapons}}function aggregateProficiencies(resolved){const{armor,weapons}=composeArmorWeapons(resolved);const effective=computeEffectiveProficiencies(resolved);return{armor:armor.kept,weapons:weapons.kept,tools:effective.tools,languages:effective.languages}}function proficiencyOverview(resolved,kind){if(kind==="armor"||kind==="weapons"){const c=composeArmorWeapons(resolved)[kind];return{effective:c.kept,removed:c.suppressed}}return{effective:computeEffectiveProficiencies(resolved)[kind],removed:computeSuppressedProficiencies(resolved)[kind]}}function weaponCoveredBy(effective,weapon){const cat=typeof weapon.category==="string"?weapon.category:"";const base=cat.split("-")[0];return effective.find(e=>{const key=weaponProfKey(e.value);if((key==="simple"||key==="martial")&&key===base)return true;if(cat&&key===normKey(cat))return true;return qualifiedGrantCovers(e.value,weapon)})}function composeArmorWeapons(resolved){const src=collectProficiencySources(resolved);return{armor:applyKindOverrides(resolved,"armor",composeGrantEntries([src.classArmor,src.featArmor,src.effectArmor])),weapons:applyKindOverrides(resolved,"weapons",composeGrantEntries([src.classWeaponFixed,src.classWeaponCategories,src.featWeapons,src.effectWeapons],src.chosenWeapons))}}function applyKindOverrides(resolved,kind,entries){var _a,_b,_c,_d;const ov=(_b=(_a=resolved.definition)==null?void 0:_a.overrides)==null?void 0:_b[kind];const key=v=>proficiencyKey(kind,v);const all=[...entries];for(const v of(_c=ov==null?void 0:ov.add)!=null?_c:[]){if(!all.some(e=>key(e.value)===key(v)))all.push({value:v,label:prettyName(v),sources:[],origin:"manual"})}const removes=new Set(((_d=ov==null?void 0:ov.remove)!=null?_d:[]).map(key));const byLabel=(a,b)=>a.label<b.label?-1:a.label>b.label?1:0;return{kept:all.filter(e=>!removes.has(key(e.value))).sort(byLabel),suppressed:all.filter(e=>removes.has(key(e.value))).sort(byLabel)}}function composeGrantEntries(buckets,picks=[]){const byKey=new Map;for(const bucket of buckets){for(const g of bucket){const key=toProfSlug(g.value);const existing=byKey.get(key);if(!existing){byKey.set(key,{value:g.value,label:prettyName(g.value),sources:[g.source],origin:"grant"});continue}if(!existing.sources.includes(g.source))existing.sources.push(g.source)}}for(const v of picks){const k=toProfSlug(v);if(!byKey.has(k))byKey.set(k,{value:v,label:prettyName(v),sources:[],origin:"pick"})}return[...byKey.values()].sort((a,b)=>a.label<b.label?-1:a.label>b.label?1:0)}function prettyName(slug){return proficiencyLabel(slug)}export{aggregateProficiencies,collectProficiencySources,proficiencyOverview,weaponCoveredBy};
1
+ import{qualifiedGrantCovers}from"../chunk-T55DELVL.js";import"../chunk-SEOASDO4.js";import{collectChosenProficiencies,collectProficiencyGrants,computeEffectiveProficiencies,computeSuppressedProficiencies}from"../chunk-FD2VQ3H6.js";import"../chunk-2EOGK6R6.js";import"../chunk-RQZCGXUZ.js";import"../chunk-BPXQOJES.js";import"../chunk-FOLHTMSC.js";import"../chunk-4JEF3CET.js";import{normKey,proficiencyKey,proficiencyLabel,toProfSlug,weaponProfKey}from"../chunk-VTQ4RWEG.js";import"../chunk-UWDHEIPY.js";import"../chunk-WAUNLUFQ.js";import"../chunk-CEHL7PPC.js";import"../chunk-UBUKCRZ3.js";import"../chunk-KEXSF3CH.js";import"../chunk-PFQPP77Q.js";import"../chunk-QVWT67WA.js";import"../chunk-PKIMOVQG.js";import"../chunk-CMIEZQL4.js";import"../chunk-CSTAQQGX.js";import"../chunk-O776WL7O.js";import"../chunk-3LWOVRLA.js";import"../chunk-DVUXUIPV.js";import"../chunk-YGH7S5ZF.js";import"../chunk-4IAMSRHD.js";import"../chunk-3QQOATV3.js";import"../chunk-DZITM5AG.js";import"../chunk-PZ4L2EEG.js";import"../chunk-QMEKQTUT.js";import"../chunk-EAARMPCW.js";import"../chunk-CAPYNIGK.js";import"../chunk-63YJPWTM.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-BREHZNTL.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";import"../chunk-S5UCI27C.js";import"../chunk-EON7T2SN.js";import"../chunk-I26FHSI6.js";function collectProficiencySources(resolved){const g=collectProficiencyGrants(resolved);const chosen=collectChosenProficiencies(resolved);return{...g,chosenLanguages:chosen.languages,chosenTools:chosen.tools,chosenWeapons:chosen.weapons}}function aggregateProficiencies(resolved){const{armor,weapons}=composeArmorWeapons(resolved);const effective=computeEffectiveProficiencies(resolved);return{armor:armor.kept,weapons:weapons.kept,tools:effective.tools,languages:effective.languages}}function proficiencyOverview(resolved,kind){if(kind==="armor"||kind==="weapons"){const c=composeArmorWeapons(resolved)[kind];return{effective:c.kept,removed:c.suppressed}}return{effective:computeEffectiveProficiencies(resolved)[kind],removed:computeSuppressedProficiencies(resolved)[kind]}}function weaponCoveredBy(effective,weapon){const cat=typeof weapon.category==="string"?weapon.category:"";const base=cat.split("-")[0];return effective.find(e=>{const key=weaponProfKey(e.value);if((key==="simple"||key==="martial")&&key===base)return true;if(cat&&key===normKey(cat))return true;return qualifiedGrantCovers(e.value,weapon)})}function composeArmorWeapons(resolved){const src=collectProficiencySources(resolved);return{armor:applyKindOverrides(resolved,"armor",composeGrantEntries([src.classArmor,src.featArmor,src.effectArmor])),weapons:applyKindOverrides(resolved,"weapons",composeGrantEntries([src.classWeaponFixed,src.classWeaponCategories,src.featWeapons,src.effectWeapons],src.chosenWeapons))}}function applyKindOverrides(resolved,kind,entries){var _a,_b,_c,_d;const ov=(_b=(_a=resolved.definition)==null?void 0:_a.overrides)==null?void 0:_b[kind];const key=v=>proficiencyKey(kind,v);const all=[...entries];for(const v of(_c=ov==null?void 0:ov.add)!=null?_c:[]){if(!all.some(e=>key(e.value)===key(v)))all.push({value:v,label:prettyName(v),sources:[],origin:"manual"})}const removes=new Set(((_d=ov==null?void 0:ov.remove)!=null?_d:[]).map(key));const byLabel=(a,b)=>a.label<b.label?-1:a.label>b.label?1:0;return{kept:all.filter(e=>!removes.has(key(e.value))).sort(byLabel),suppressed:all.filter(e=>removes.has(key(e.value))).sort(byLabel)}}function composeGrantEntries(buckets,picks=[]){const byKey=new Map;for(const bucket of buckets){for(const g of bucket){const key=toProfSlug(g.value);const existing=byKey.get(key);if(!existing){byKey.set(key,{value:g.value,label:prettyName(g.value),sources:[g.source],origin:"grant"});continue}if(!existing.sources.includes(g.source))existing.sources.push(g.source)}}for(const v of picks){const k=toProfSlug(v);if(!byKey.has(k))byKey.set(k,{value:v,label:prettyName(v),sources:[],origin:"pick"})}return[...byKey.values()].sort((a,b)=>a.label<b.label?-1:a.label>b.label?1:0)}function prettyName(slug){return proficiencyLabel(slug)}export{aggregateProficiencies,collectProficiencySources,proficiencyOverview,weaponCoveredBy};
@@ -1,4 +1,4 @@
1
- import type { ResolvedCharacter } from "./pc.types.js";
1
+ import type { ResolvedCharacter, FeatureSource } from "./pc.types.js";
2
2
  export type ProficiencyOrigin = "grant" | "pick" | "manual" | "custom";
3
3
  export interface ProficiencyEntry {
4
4
  value: string;
@@ -29,4 +29,6 @@ export interface ProficiencyGrants {
29
29
  effectTools: ProficiencyGrant[];
30
30
  effectLanguages: ProficiencyGrant[];
31
31
  }
32
+ export declare const UNKNOWN_GRANT_SOURCE = "Unknown";
33
+ export declare function grantSourceName(resolved: ResolvedCharacter, kind: FeatureSource["kind"], slug: string): string;
32
34
  export declare function collectProficiencyGrants(resolved: ResolvedCharacter): ProficiencyGrants;
@@ -43,4 +43,5 @@ export declare function computeProficiencies(resolved: ResolvedCharacter): {
43
43
  languages: string[];
44
44
  saves: Ability[];
45
45
  };
46
+ export declare const HAND_SET_HALF_SOURCE = "Set by you";
46
47
  export declare function recalc(resolved: ResolvedCharacter, registry?: EntityRegistry): DerivedStats;