@archivist-gg/dnd5e 0.3.11 → 0.3.13

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 (164) hide show
  1. package/LICENSES/SRD.md +38 -3
  2. package/dist/armor/armor.codec.js +3 -3
  3. package/dist/armor/armor.parser.js +2 -2
  4. package/dist/armor/armor.schema.d.ts +1 -0
  5. package/dist/armor/armor.schema.js +1 -1
  6. package/dist/armor/armor.types.d.ts +2 -0
  7. package/dist/background/background.codec.js +5 -5
  8. package/dist/background/background.parser.js +4 -4
  9. package/dist/background/background.schema.js +3 -3
  10. package/dist/chunk-2LULMQTF.js +14 -0
  11. package/dist/{chunk-CBEKVAX4.js → chunk-4BZ47YJ4.js} +10 -3
  12. package/dist/{chunk-T2SNEJOE.js → chunk-4SLOJXJ4.js} +1 -1
  13. package/dist/{chunk-2DFENQIJ.js → chunk-5GKJAUMX.js} +2 -0
  14. package/dist/{chunk-J77CKYV3.js → chunk-5KGV6TF7.js} +1 -1
  15. package/dist/{chunk-CHUALUIX.js → chunk-6ZY3U6BQ.js} +1 -1
  16. package/dist/{chunk-DNAJRMNN.js → chunk-A54HHCWW.js} +6 -7
  17. package/dist/{chunk-2M34FLAY.js → chunk-BRGLDWUP.js} +3 -1
  18. package/dist/chunk-CM5CWO4K.js +735 -0
  19. package/dist/{chunk-3HX5VLWP.js → chunk-DPM6V7YX.js} +1 -1
  20. package/dist/chunk-EJP263OP.js +186 -0
  21. package/dist/{chunk-G247QXWW.js → chunk-EL6QPF6I.js} +1 -1
  22. package/dist/{chunk-SMLXZUBH.js → chunk-EYX4JMAU.js} +4 -1
  23. package/dist/{chunk-AW3EHF3L.js → chunk-FC4IGH5Y.js} +1 -1
  24. package/dist/{chunk-PI4LLJG4.js → chunk-FPGXFD2M.js} +2 -2
  25. package/dist/{chunk-23LZLBJK.js → chunk-G6MHJDVT.js} +6 -2
  26. package/dist/{chunk-NWDF5HG3.js → chunk-G7ED5H2G.js} +1 -1
  27. package/dist/chunk-H5PTKYXL.js +101 -0
  28. package/dist/{chunk-LWFTHJIE.js → chunk-HHBD4SQ6.js} +1 -1
  29. package/dist/{chunk-PP2UHLBA.js → chunk-HJQNK3J5.js} +8 -0
  30. package/dist/{chunk-JC5UNIVM.js → chunk-HS6FIOLP.js} +2 -0
  31. package/dist/chunk-IHE6KVC3.js +13 -0
  32. package/dist/{chunk-BLRW2UU6.js → chunk-J53ERF6K.js} +2 -2
  33. package/dist/{chunk-MQ747UCR.js → chunk-JNNNBEUH.js} +65 -2
  34. package/dist/{chunk-LDDCNPHD.js → chunk-K5NJBTE2.js} +1 -1
  35. package/dist/{chunk-4ISR76DH.js → chunk-KSTV7J2U.js} +9 -3
  36. package/dist/chunk-LBEXLN6I.js +91 -0
  37. package/dist/{chunk-UBBKSYBY.js → chunk-LHZXYFBU.js} +30 -1
  38. package/dist/{chunk-U3BABVJF.js → chunk-LVX6TQ3R.js} +2 -2
  39. package/dist/{chunk-R747YKS7.js → chunk-M2OWVAZG.js} +1 -1
  40. package/dist/{chunk-7YU4NPKR.js → chunk-MC5YJ4PB.js} +1 -1
  41. package/dist/{chunk-JCEV7KYN.js → chunk-MUIU7RZ3.js} +1 -1
  42. package/dist/{chunk-R2ZV233X.js → chunk-MYY2C5MB.js} +3 -3
  43. package/dist/{chunk-S56D6B6C.js → chunk-PLOSP4XQ.js} +3 -3
  44. package/dist/{chunk-JANNRGJC.js → chunk-PX25R3DK.js} +1 -1
  45. package/dist/{chunk-V373TRJE.js → chunk-Q5XTEYHD.js} +191 -125
  46. package/dist/{chunk-MAH6DCRI.js → chunk-Q6UOHCCT.js} +1 -1
  47. package/dist/{chunk-2INMRR3Q.js → chunk-QEO7LYTG.js} +215 -94
  48. package/dist/{chunk-PJMG5XV3.js → chunk-QSBJ6NEM.js} +1 -1
  49. package/dist/{chunk-BL3VELKP.js → chunk-R2V5LN3I.js} +1 -1
  50. package/dist/{chunk-4DOMDEBZ.js → chunk-RQNJXADQ.js} +1 -1
  51. package/dist/{chunk-GFZ7PITJ.js → chunk-S3YUXDSC.js} +6 -1
  52. package/dist/chunk-T5GZBKIQ.js +927 -0
  53. package/dist/{chunk-PZCE7DJM.js → chunk-UE6LKRXQ.js} +15 -1
  54. package/dist/{chunk-5N2GW72F.js → chunk-UZXG6QSY.js} +2 -1
  55. package/dist/{chunk-QHMWA3SZ.js → chunk-VDPRBUU5.js} +1 -1
  56. package/dist/{chunk-4XTNPNQB.js → chunk-VPYBK2MG.js} +1 -1
  57. package/dist/{chunk-V6LJFP4R.js → chunk-X7VZY4ON.js} +2 -2
  58. package/dist/{chunk-HZA7OE7N.js → chunk-XCFC7LGF.js} +2 -1
  59. package/dist/{chunk-BIA32MQ5.js → chunk-XJRNEQPD.js} +1 -1
  60. package/dist/{chunk-UIRMA5KM.js → chunk-YDGMBMYI.js} +1 -1
  61. package/dist/{chunk-6X4KUDMU.js → chunk-ZCTUYGNV.js} +7 -2
  62. package/dist/{chunk-XTRDCSJB.js → chunk-ZMJQUZQH.js} +4 -1
  63. package/dist/chunk-ZUQW5VBZ.js +89 -0
  64. package/dist/class/class.codec.js +7 -7
  65. package/dist/class/class.parser.js +6 -6
  66. package/dist/class/class.schema.d.ts +10 -0
  67. package/dist/class/class.schema.js +5 -5
  68. package/dist/entities/base-item-resolver.js +2 -2
  69. package/dist/entities/slug.d.ts +18 -8
  70. package/dist/entities/slug.js +3 -1
  71. package/dist/feat/feat.codec.js +5 -5
  72. package/dist/feat/feat.parser.js +4 -4
  73. package/dist/feat/feat.schema.d.ts +16 -3
  74. package/dist/feat/feat.schema.js +3 -3
  75. package/dist/index.js +7190 -4116
  76. package/dist/item/item.actions-map.d.ts +40 -5
  77. package/dist/item/item.actions-map.js +5 -84
  78. package/dist/item/item.attunement.js +3 -9
  79. package/dist/item/item.bonuses.js +5 -2
  80. package/dist/item/item.codec.js +3 -3
  81. package/dist/item/item.conditions.js +4 -1
  82. package/dist/item/item.conditions.types.d.ts +4 -0
  83. package/dist/item/item.cost.d.ts +3 -0
  84. package/dist/item/item.cost.js +29 -0
  85. package/dist/item/item.icon.d.ts +15 -0
  86. package/dist/item/item.icon.js +211 -0
  87. package/dist/item/item.parser.js +2 -2
  88. package/dist/item/item.schema.d.ts +16 -1
  89. package/dist/item/item.schema.js +3 -1
  90. package/dist/item/item.types.d.ts +9 -2
  91. package/dist/monster/monster.parser.js +5 -5
  92. package/dist/monster/monster.schema.js +4 -4
  93. package/dist/optional-feature/optional-feature.codec.js +4 -4
  94. package/dist/optional-feature/optional-feature.parser.js +3 -3
  95. package/dist/optional-feature/optional-feature.schema.d.ts +229 -3
  96. package/dist/optional-feature/optional-feature.schema.js +6 -2
  97. package/dist/pc/pc.additional-spells.js +2 -2
  98. package/dist/pc/pc.asi-flatten.d.ts +62 -1
  99. package/dist/pc/pc.asi-flatten.js +16 -0
  100. package/dist/pc/pc.conditions.js +1 -1
  101. package/dist/pc/pc.containment.d.ts +45 -0
  102. package/dist/pc/pc.containment.js +24 -0
  103. package/dist/pc/pc.decision-engine.d.ts +21 -3
  104. package/dist/pc/pc.decision-engine.js +21 -12
  105. package/dist/pc/pc.entry-overrides.d.ts +79 -0
  106. package/dist/pc/pc.entry-overrides.js +40 -0
  107. package/dist/pc/pc.equipment.d.ts +2 -2
  108. package/dist/pc/pc.equipment.js +18 -7
  109. package/dist/pc/pc.feature-effects.js +2 -2
  110. package/dist/pc/pc.infusions.d.ts +220 -0
  111. package/dist/pc/pc.infusions.js +64 -0
  112. package/dist/pc/pc.parser.js +18 -1
  113. package/dist/pc/pc.pools.d.ts +1 -1
  114. package/dist/pc/pc.pools.js +11 -3
  115. package/dist/pc/pc.proficiencies.js +19 -12
  116. package/dist/pc/pc.recalc.d.ts +39 -36
  117. package/dist/pc/pc.recalc.js +58 -30
  118. package/dist/pc/pc.resolver.js +19 -12
  119. package/dist/pc/pc.resource-seed.js +1 -1
  120. package/dist/pc/pc.resources.d.ts +6 -1
  121. package/dist/pc/pc.resources.js +3 -1
  122. package/dist/pc/pc.rest.d.ts +21 -1
  123. package/dist/pc/pc.rest.js +52 -19
  124. package/dist/pc/pc.schema.d.ts +14 -0
  125. package/dist/pc/pc.schema.js +1 -1
  126. package/dist/pc/pc.slotting.d.ts +36 -3
  127. package/dist/pc/pc.slotting.js +13 -5
  128. package/dist/pc/pc.tool-picks.d.ts +51 -0
  129. package/dist/pc/pc.tool-picks.js +18 -0
  130. package/dist/pc/pc.types.d.ts +70 -12
  131. package/dist/pc/pool-layout.d.ts +14 -0
  132. package/dist/pc/pool-layout.js +7 -3
  133. package/dist/race/race.codec.js +6 -6
  134. package/dist/race/race.parser.js +5 -5
  135. package/dist/race/race.schema.js +4 -4
  136. package/dist/schemas/attack-schema.d.ts +1 -1
  137. package/dist/schemas/choice-schema.js +2 -2
  138. package/dist/schemas/feature-effect-schema.d.ts +16 -3
  139. package/dist/schemas/feature-effect-schema.js +1 -1
  140. package/dist/schemas/feature-schema.js +3 -3
  141. package/dist/schemas/selection-pool-schema.d.ts +10 -0
  142. package/dist/schemas/selection-pool-schema.js +1 -1
  143. package/dist/srd/retired-items.d.ts +14 -0
  144. package/dist/srd/retired-items.js +11 -0
  145. package/dist/subclass/subclass.codec.js +7 -7
  146. package/dist/subclass/subclass.parser.js +6 -6
  147. package/dist/subclass/subclass.schema.d.ts +10 -0
  148. package/dist/subclass/subclass.schema.js +5 -5
  149. package/dist/types/choice.d.ts +8 -0
  150. package/dist/types/equipment-grant.d.ts +18 -1
  151. package/dist/types/equipment-grant.js +12 -0
  152. package/dist/types/feature-effect.d.ts +6 -1
  153. package/dist/types/optional-feature.types.d.ts +79 -1
  154. package/dist/types/selection-pool.d.ts +16 -1
  155. package/dist/weapon/weapon.classify.d.ts +10 -8
  156. package/dist/weapon/weapon.classify.js +2 -2
  157. package/dist/weapon/weapon.codec.js +3 -3
  158. package/dist/weapon/weapon.parser.js +2 -2
  159. package/dist/weapon/weapon.schema.d.ts +1 -0
  160. package/dist/weapon/weapon.schema.js +1 -1
  161. package/dist/weapon/weapon.types.d.ts +2 -0
  162. package/package.json +1 -1
  163. package/dist/chunk-O4SRD3J5.js +0 -165
  164. package/dist/chunk-WXWPK3LI.js +0 -55
package/LICENSES/SRD.md CHANGED
@@ -27,8 +27,9 @@ Coast. This project is unofficial and not affiliated with or endorsed by Wizards
27
27
 
28
28
  ## Provenance and changes made (CC-BY "indicate if changes were made")
29
29
 
30
- The shipped SRD data is MODIFIED, and it is a MERGE. It was not taken from the SRD PDFs. It is
31
- assembled by `tools/srd-canonical/` from:
30
+ The shipped SRD data is MODIFIED, and it is a MERGE. Apart from the few SRD 5.2 equipment
31
+ descriptions transcribed from the document itself (below), it was not taken from the SRD PDFs. It
32
+ is assembled by `tools/srd-canonical/` from:
32
33
 
33
34
  - the **Open5e** v2 API, queried with the official-SRD document filter
34
35
  `document__key__in=srd-2014` / `srd-2024`, the immediate redistribution source of the SRD
@@ -36,8 +37,13 @@ assembled by `tools/srd-canonical/` from:
36
37
  - a structured-rules JSON dump, used to enrich mechanical fields, to expand the SRD's generic
37
38
  magic-item variants into one entity per base item, and, for the 15 conditions per edition, as
38
39
  the text source (Open5e exposes no condition endpoint for these documents);
40
+ - the **SRD 5.2** document itself (`SRD_CC_v5.2.pdf`,
41
+ https://media.dndbeyond.com/compendium-images/srd/5.2/SRD_CC_v5.2.pdf, CC-BY-4.0), for the
42
+ 2024 equipment descriptions Open5e does not carry, transcribed verbatim into the overlay (see
43
+ the equipment paragraph below);
39
44
  - virtual-tabletop activation data, used to derive typed item effects;
40
- - a hand-curated overlay (`tools/srd-canonical/overlays/`), authored for this project.
45
+ - a hand-curated overlay (`tools/srd-canonical/overlays/`), authored for this project apart from
46
+ the SRD 5.2 transcriptions it carries.
41
47
 
42
48
  Content is reformatted to this project's schema and to Markdown, cross-references become vault
43
49
  wikilinks, and dice and save expressions become this project's inline roll tags; narrative prose
@@ -53,4 +59,33 @@ the ENTITY and not about every byte of its text, the emit path additionally runs
53
59
  markup (reference tags, source-book abbreviation suffixes, template pointers, third-party
54
60
  database identifiers) and the editorial commentary its contributors wrote about the SRD.
55
61
 
62
+ The mundane equipment (adventuring gear including the packs and poisons, ammunition, spellcasting
63
+ foci, artisan's tools, tools, musical instruments and gaming sets; the gear pass,
64
+ `tools/srd-canonical/merger-rules/gear-merge.ts`) follows the same rules. A record is selected by
65
+ the structured-rules dump's own per-entry SRD flags or, for the members listed in
66
+ `tools/srd-canonical/data/gear-open5e-join.json` (Map, String, Firearm Bullets (10), Dragonchess
67
+ Set and Three-Dragon Ante Set, which Open5e's `srd-2024` document carries but the dump leaves
68
+ unflagged), by Open5e's document filter. Firearm Bullet, also listed, ships as the single piece of
69
+ the SRD's Firearm Bullets (10), as the flagged single pieces (Arrow, Bolt, Needle, Sling Bullet)
70
+ do for their bundles. Names, structure (type, weight, cost, focus kind, container capacity) and
71
+ the `pack_contents` strings, including the seven SRD pack phrases that name no item of their own
72
+ ("10 feet of string", "alms box", "block of incense", "censer", "vestments", "little bag of
73
+ sand", "small knife"), come from the structured-rules data, a name being the SRD name the dump
74
+ records where it records one; two SRD 5.2 poisons carry their SRD 5.2 names, Spider's Sting and
75
+ Crawler Mucus. The container data of the following records comes instead from the hand-curated
76
+ overlay: the Portable Hole (a magic item, in both editions), marked as a container whose
77
+ contents weigh nothing, where the dump carries no container capacity; the 2014 Scholar's Pack,
78
+ whose `pack_contents` carry the ten sheets of parchment its SRD 5.1 description names
79
+ (`Parchment (one sheet) (x10)`), where the dump lists one; and the 2024 Chest and Vial, whose
80
+ `holds_items` says the Chest holds items (the dump gives it a volume only) and the Vial (which
81
+ holds up to 4 ounces of liquid) holds no items. The text comes from Open5e (its items and item
82
+ sets under the same document filter), never from the structured-rules dump. The 2024 records
83
+ without usable Open5e text
84
+ (fourteen poisons, the five arcane foci and the Glass Bottle, each listed with its page in
85
+ `tools/srd-canonical/overlays/srd-2024.yaml`) are transcribed verbatim from the SRD 5.2 document
86
+ and checked against it by `tools/srd-canonical/verify-srd52-transcriptions.ts`. The 2024 Belt of
87
+ Giant Strength (Frost or Stone) takes its Strength score, 23, from the hand-curated overlay,
88
+ transcribed from the SRD 5.2 table, because the structured-rules data names the frost and stone
89
+ giants' belts separately.
90
+
56
91
  Credit to **Open5e** (https://open5e.com) as the immediate SRD-redistribution source.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  armorCodec
3
- } from "../chunk-AW3EHF3L.js";
4
- import "../chunk-5N2GW72F.js";
5
- import "../chunk-JC5UNIVM.js";
3
+ } from "../chunk-FC4IGH5Y.js";
4
+ import "../chunk-UZXG6QSY.js";
5
+ import "../chunk-HS6FIOLP.js";
6
6
  import "../chunk-UA5KS2PL.js";
7
7
  export {
8
8
  armorCodec
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  parseArmor
3
- } from "../chunk-5N2GW72F.js";
4
- import "../chunk-JC5UNIVM.js";
3
+ } from "../chunk-UZXG6QSY.js";
4
+ import "../chunk-HS6FIOLP.js";
5
5
  import "../chunk-UA5KS2PL.js";
6
6
  export {
7
7
  parseArmor
@@ -22,6 +22,7 @@ export declare const armorEntitySchema: z.ZodObject<{
22
22
  edition: z.ZodOptional<z.ZodString>;
23
23
  entries: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
24
24
  rendering_hint: z.ZodOptional<z.ZodString>;
25
+ icon: z.ZodOptional<z.ZodString>;
25
26
  has_fluff: z.ZodOptional<z.ZodBoolean>;
26
27
  has_fluff_images: z.ZodOptional<z.ZodBoolean>;
27
28
  image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  armorEntitySchema
3
- } from "../chunk-JC5UNIVM.js";
3
+ } from "../chunk-HS6FIOLP.js";
4
4
  import "../chunk-UA5KS2PL.js";
5
5
  export {
6
6
  armorEntitySchema
@@ -26,6 +26,8 @@ export interface ArmorEntity {
26
26
  entries?: unknown[];
27
27
  /** Carried as the empty string on every converter armor carrier today (27). */
28
28
  rendering_hint?: string;
29
+ /** The icon key (I3): a key of the renderer's icon set or a Lucide name. */
30
+ icon?: string;
29
31
  has_fluff?: boolean;
30
32
  has_fluff_images?: boolean;
31
33
  /** One wikilink, or an array for >= 2 fluff images (images-ON emit). */
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  backgroundCodec
3
- } from "../chunk-MAH6DCRI.js";
4
- import "../chunk-4DOMDEBZ.js";
5
- import "../chunk-JCEV7KYN.js";
3
+ } from "../chunk-Q6UOHCCT.js";
4
+ import "../chunk-RQNJXADQ.js";
5
+ import "../chunk-MUIU7RZ3.js";
6
6
  import "../chunk-IN4M4X7P.js";
7
- import "../chunk-2M34FLAY.js";
8
- import "../chunk-XTRDCSJB.js";
7
+ import "../chunk-BRGLDWUP.js";
8
+ import "../chunk-ZMJQUZQH.js";
9
9
  import "../chunk-UA5KS2PL.js";
10
10
  export {
11
11
  backgroundCodec
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  parseBackground
3
- } from "../chunk-4DOMDEBZ.js";
4
- import "../chunk-JCEV7KYN.js";
3
+ } from "../chunk-RQNJXADQ.js";
4
+ import "../chunk-MUIU7RZ3.js";
5
5
  import "../chunk-IN4M4X7P.js";
6
- import "../chunk-2M34FLAY.js";
7
- import "../chunk-XTRDCSJB.js";
6
+ import "../chunk-BRGLDWUP.js";
7
+ import "../chunk-ZMJQUZQH.js";
8
8
  import "../chunk-UA5KS2PL.js";
9
9
  export {
10
10
  parseBackground
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  backgroundEntitySchema,
3
3
  langProfSchema
4
- } from "../chunk-JCEV7KYN.js";
4
+ } from "../chunk-MUIU7RZ3.js";
5
5
  import "../chunk-IN4M4X7P.js";
6
- import "../chunk-2M34FLAY.js";
7
- import "../chunk-XTRDCSJB.js";
6
+ import "../chunk-BRGLDWUP.js";
7
+ import "../chunk-ZMJQUZQH.js";
8
8
  import "../chunk-UA5KS2PL.js";
9
9
  export {
10
10
  backgroundEntitySchema,
@@ -0,0 +1,14 @@
1
+ // src/types/equipment-grant.ts
2
+ function isCategoryGrant(g) {
3
+ return !!g && typeof g === "object" && typeof g.category === "string" && g.category.length > 0;
4
+ }
5
+ var equipmentCategoryKey = (i, j, k) => `equipment-${i}-opt-${j}-cat-${k}`;
6
+ var equipmentCategoryKeys = (grants, i, j) => grants.flatMap((g, k) => isCategoryGrant(g) ? [equipmentCategoryKey(i, j, k)] : []);
7
+ var isStartingEquipmentKey = (key) => key.startsWith("equipment-");
8
+
9
+ export {
10
+ isCategoryGrant,
11
+ equipmentCategoryKey,
12
+ equipmentCategoryKeys,
13
+ isStartingEquipmentKey
14
+ };
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-LVQLWRCU.js";
10
10
  import {
11
11
  bareEntitySlug
12
- } from "./chunk-6X4KUDMU.js";
12
+ } from "./chunk-ZCTUYGNV.js";
13
13
  import {
14
14
  normalizeAbility
15
15
  } from "./chunk-WELIKLZF.js";
@@ -88,7 +88,7 @@ function assembleEffectFeatures(resolved) {
88
88
  const pushBoon = (item, pool) => {
89
89
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
90
90
  const e = item.entity;
91
- if (!e || ((_b2 = (_a2 = e.effects) == null ? void 0 : _a2.length) != null ? _b2 : 0) === 0) return;
91
+ if (!e || item.itemBound === true || ((_b2 = (_a2 = e.effects) == null ? void 0 : _a2.length) != null ? _b2 : 0) === 0) return;
92
92
  buffFeatures.push({
93
93
  feature: { id: item.slug, name: e.name, activatable: (_c2 = e.activatable) != null ? _c2 : false, effects: e.effects },
94
94
  // source is inert for the fold; attribute to the pool's owning class
@@ -182,6 +182,11 @@ function scaled(base, key, scalesAt, level) {
182
182
  }
183
183
  return best;
184
184
  }
185
+ function riderScope(appliesTo) {
186
+ if (appliesTo === void 0 || appliesTo === "all" || appliesTo === "spell") return void 0;
187
+ const words = Array.isArray(appliesTo) ? appliesTo : [appliesTo];
188
+ return words.includes("weapon") ? void 0 : [...words];
189
+ }
185
190
  function applyEffect(out, eff, label, level) {
186
191
  var _a, _b, _c, _d, _e, _f, _g, _h;
187
192
  switch (eff.kind) {
@@ -296,11 +301,13 @@ function applyEffect(out, eff, label, level) {
296
301
  break;
297
302
  case "damage-bonus":
298
303
  if (((_g = eff.applies_to) != null ? _g : "weapon") !== "spell") {
304
+ const scope = riderScope(eff.applies_to);
299
305
  out.damageBonuses.push({
300
306
  amount: eff.amount,
301
307
  damage_type: eff.damage_type,
302
308
  source: label,
303
- ...eff.condition ? { condition: eff.condition } : {}
309
+ ...eff.condition ? { condition: eff.condition } : {},
310
+ ...scope ? { scope } : {}
304
311
  });
305
312
  }
306
313
  break;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  featEntitySchema
3
- } from "./chunk-U3BABVJF.js";
3
+ } from "./chunk-LVX6TQ3R.js";
4
4
 
5
5
  // src/feat/feat.parser.ts
6
6
  import { parseYaml } from "@archivist-gg/core";
@@ -40,6 +40,8 @@ var weaponEntitySchema = z.object({
40
40
  // string today, so `.min(1)` is forbidden here.
41
41
  rendering_hint: z.string().optional(),
42
42
  // 98
43
+ // The icon key (I3): a key of the renderer's icon set or a Lucide name; itemIconKey reads it first.
44
+ icon: z.string().optional(),
43
45
  has_fluff: z.boolean().optional(),
44
46
  // 1
45
47
  has_fluff_images: z.boolean().optional(),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  subclassEntitySchema
3
- } from "./chunk-BLRW2UU6.js";
3
+ } from "./chunk-J53ERF6K.js";
4
4
  import {
5
5
  aliasFeaturesByLevelActionCost
6
6
  } from "./chunk-4U55VNC7.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseFeat
3
- } from "./chunk-T2SNEJOE.js";
3
+ } from "./chunk-4SLOJXJ4.js";
4
4
 
5
5
  // src/feat/feat.codec.ts
6
6
  import yaml from "js-yaml";
@@ -1,3 +1,7 @@
1
+ import {
2
+ isTwoHandedWeapon
3
+ } from "./chunk-LHZXYFBU.js";
4
+
1
5
  // src/item/item.conditions.ts
2
6
  function unwrapSlug(maybeWiki) {
3
7
  if (!maybeWiki) return "";
@@ -11,13 +15,8 @@ function evaluateCondition(cond, ctx) {
11
15
  return ctx.derived.equippedSlots.armor === void 0 ? "true" : "false";
12
16
  case "no_shield":
13
17
  return ctx.derived.equippedSlots.shield === void 0 ? "true" : "false";
14
- case "wielding_two_handed": {
15
- const main = (_a = ctx.derived.equippedSlots.mainhand) == null ? void 0 : _a.entity;
16
- if (!main || typeof main !== "object" || !("properties" in main)) return "false";
17
- const props = main.properties;
18
- if (!Array.isArray(props)) return "false";
19
- return props.some((p) => p === "two_handed") ? "true" : "false";
20
- }
18
+ case "wielding_two_handed":
19
+ return isTwoHandedWeapon((_a = ctx.derived.equippedSlots.mainhand) == null ? void 0 : _a.entity, ctx.registry) ? "true" : "false";
21
20
  case "is_class": {
22
21
  const target = cond.value.toLowerCase();
23
22
  return ctx.classList.some((c) => unwrapSlug(c.name) === target) ? "true" : "false";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  featureEffectSchema
3
- } from "./chunk-XTRDCSJB.js";
3
+ } from "./chunk-ZMJQUZQH.js";
4
4
 
5
5
  // src/schemas/choice-schema.ts
6
6
  import { z } from "zod";
@@ -12,6 +12,8 @@ var entityFilterSchema = z.object({
12
12
  available_to: z.literal("self").optional(),
13
13
  weapon_category: z.enum(["simple", "martial"]).optional(),
14
14
  armor_category: z.enum(["light", "medium", "heavy", "shield"]).optional(),
15
+ item_type: z.array(z.string().min(1)).nonempty().optional(),
16
+ mundane: z.boolean().optional(),
15
17
  list: z.string().min(1).optional(),
16
18
  level: z.number().int().min(0).max(9).optional(),
17
19
  edition: z.string().min(1).optional()