@archivist-gg/dnd5e 0.1.1 → 0.2.0

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 (65) hide show
  1. package/dist/background/background.codec.js +4 -4
  2. package/dist/background/background.parser.js +3 -3
  3. package/dist/background/background.schema.js +2 -2
  4. package/dist/{chunk-FFULAF2P.js → chunk-2BWAID3Y.js} +2 -2
  5. package/dist/{chunk-FUK7QSN5.js → chunk-42Y5IJKT.js} +1 -1
  6. package/dist/{chunk-TPZSPU4L.js → chunk-4JHOHWBI.js} +1 -1
  7. package/dist/{chunk-ZLG6FQFB.js → chunk-5WQD3WNZ.js} +16 -1
  8. package/dist/{chunk-FEOB24KP.js → chunk-73HOFQQ5.js} +1 -1
  9. package/dist/{chunk-YDPWD2T7.js → chunk-7VJ6BOA5.js} +4 -1
  10. package/dist/{chunk-DABBCYTT.js → chunk-CZPMTQOY.js} +1 -1
  11. package/dist/{chunk-DRNZJNJP.js → chunk-DZXSWSBP.js} +1 -1
  12. package/dist/{chunk-RVYYKYFL.js → chunk-GE4TLPWM.js} +1 -1
  13. package/dist/{chunk-VLKIB33F.js → chunk-K6Q5OUGK.js} +6 -0
  14. package/dist/{chunk-PMADYMUI.js → chunk-L7E2UT5A.js} +1 -1
  15. package/dist/{chunk-CDW7R2QT.js → chunk-NXSWH3AE.js} +4 -1
  16. package/dist/{chunk-IDTDACM6.js → chunk-PHQRGDRQ.js} +1 -1
  17. package/dist/{chunk-BAXWWGFJ.js → chunk-Q5K6LWBZ.js} +1 -1
  18. package/dist/chunk-R5SQHP2X.js +1092 -0
  19. package/dist/{chunk-Z6GXV2GO.js → chunk-TLYDBT5F.js} +1 -1
  20. package/dist/{chunk-ADLTSHOR.js → chunk-TQZB4OCJ.js} +16 -12
  21. package/dist/{chunk-A7T5L7SS.js → chunk-TUIFSVLI.js} +1 -1
  22. package/dist/{chunk-GEJSJP6E.js → chunk-V6SOFUJW.js} +1 -1
  23. package/dist/{chunk-Z4TL2V7S.js → chunk-VTYUBINW.js} +1 -1
  24. package/dist/{chunk-B7UXKNLD.js → chunk-W7HWMMBF.js} +1 -1
  25. package/dist/{chunk-SSXBYF3P.js → chunk-XLSVNUTK.js} +1 -1
  26. package/dist/{chunk-GIOH5JB5.js → chunk-XTIQWSFM.js} +1 -1
  27. package/dist/{chunk-PKC77VZP.js → chunk-ZZGEVJKX.js} +1 -1
  28. package/dist/class/class.codec.js +5 -5
  29. package/dist/class/class.parser.js +4 -4
  30. package/dist/class/class.schema.js +3 -3
  31. package/dist/feat/feat.codec.js +4 -4
  32. package/dist/feat/feat.parser.js +3 -3
  33. package/dist/feat/feat.schema.js +2 -2
  34. package/dist/index.js +321 -75
  35. package/dist/item/item.actions-map.d.ts +10 -3
  36. package/dist/item/item.actions-map.js +13 -8
  37. package/dist/item/item.codec.js +3 -3
  38. package/dist/item/item.parser.js +2 -2
  39. package/dist/item/item.schema.d.ts +3 -0
  40. package/dist/item/item.schema.js +1 -1
  41. package/dist/item/item.types.d.ts +8 -0
  42. package/dist/pc/pc.decision-engine.js +8 -1
  43. package/dist/pc/pc.equipment.js +7 -3
  44. package/dist/pc/pc.feature-effects.js +9 -2
  45. package/dist/pc/pc.parser.js +1 -1
  46. package/dist/pc/pc.pools.js +8 -3
  47. package/dist/pc/pc.recalc.js +20 -10
  48. package/dist/pc/pc.resolver.d.ts +59 -1
  49. package/dist/pc/pc.resolver.js +20 -342
  50. package/dist/pc/pc.schema.d.ts +21 -0
  51. package/dist/pc/pc.schema.js +1 -1
  52. package/dist/pc/pc.types.d.ts +37 -5
  53. package/dist/race/race.codec.js +5 -5
  54. package/dist/race/race.parser.js +4 -4
  55. package/dist/race/race.schema.js +3 -3
  56. package/dist/schemas/choice-schema.js +1 -1
  57. package/dist/schemas/feature-schema.js +2 -2
  58. package/dist/subclass/subclass.codec.js +5 -5
  59. package/dist/subclass/subclass.parser.js +4 -4
  60. package/dist/subclass/subclass.schema.js +3 -3
  61. package/dist/types/choice.d.ts +5 -0
  62. package/dist/weapon/weapon-mastery.d.ts +3 -0
  63. package/package.json +1 -1
  64. package/dist/chunk-6PXE7T7C.js +0 -79
  65. package/dist/chunk-TJCNX6UZ.js +0 -521
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-4TIJKN6O.js";
6
6
  import {
7
7
  featureSchema
8
- } from "./chunk-DABBCYTT.js";
8
+ } from "./chunk-CZPMTQOY.js";
9
9
  import {
10
10
  resourceSchema
11
11
  } from "./chunk-PZOWBI3B.js";
@@ -1,3 +1,6 @@
1
+ import {
2
+ bareEntitySlug
3
+ } from "./chunk-R5SQHP2X.js";
1
4
  import {
2
5
  defaultSlotForType,
3
6
  effectiveArmor,
@@ -5,9 +8,6 @@ import {
5
8
  isWeaponEntity,
6
9
  resolveEntityForEntry
7
10
  } from "./chunk-UC4FE5X3.js";
8
- import {
9
- bareEntitySlug
10
- } from "./chunk-TJCNX6UZ.js";
11
11
  import {
12
12
  readNumericBonus
13
13
  } from "./chunk-LWFTHJIE.js";
@@ -17,15 +17,19 @@ import {
17
17
 
18
18
  // src/weapon/weapon-mastery.ts
19
19
  var MASTERY = {
20
- cleave: { label: "Cleave", description: "If you hit a creature with a melee attack roll using this weapon, you can make an attack roll with the weapon against a second creature within 5 feet of the first that is also within your reach. On a hit, the second creature takes the weapon's damage, but don't add your ability modifier to that damage unless it is negative. You can make this extra attack only once per turn." },
21
- graze: { label: "Graze", description: "If your attack roll with this weapon misses a creature, you can deal damage to that creature equal to the ability modifier you used to make the attack roll. This damage is the same type dealt by the weapon, and the damage can be increased only by increasing the ability modifier." },
22
- nick: { label: "Nick", description: "When you make the extra attack of the Light property, you can make it as part of the Attack action instead of as a Bonus Action. You can make this extra attack only once per turn." },
23
- push: { label: "Push", description: "If you hit a creature with this weapon, you can push the creature up to 10 feet straight away from yourself if it is Large or smaller." },
24
- sap: { label: "Sap", description: "If you hit a creature with this weapon, that creature has Disadvantage on its next attack roll before the start of your next turn." },
25
- slow: { label: "Slow", description: "If you hit a creature with this weapon and deal damage, you can reduce its Speed by 10 feet until the start of your next turn. If the creature is hit more than once by weapons that have this property, the Speed reduction doesn't exceed 10 feet." },
26
- topple: { label: "Topple", description: "If you hit a creature with this weapon, you can force the creature to make a Constitution saving throw (DC 8 plus the ability modifier used to make the attack roll and your Proficiency Bonus). On a failed save, the creature has the Prone condition." },
27
- vex: { label: "Vex", description: "If you hit a creature with this weapon and deal damage, you have Advantage on your next attack roll against that creature before the end of your next turn." }
20
+ cleave: { label: "Cleave", description: "If you hit a creature with a melee attack roll using this weapon, you can make an attack roll with the weapon against a second creature within 5 feet of the first that is also within your reach. On a hit, the second creature takes the weapon's damage, but don't add your ability modifier to that damage unless it is negative. You can make this extra attack only once per turn.", gist: "hit a 2nd creature in reach" },
21
+ graze: { label: "Graze", description: "If your attack roll with this weapon misses a creature, you can deal damage to that creature equal to the ability modifier you used to make the attack roll. This damage is the same type dealt by the weapon, and the damage can be increased only by increasing the ability modifier.", gist: "on miss: ability-mod damage" },
22
+ nick: { label: "Nick", description: "When you make the extra attack of the Light property, you can make it as part of the Attack action instead of as a Bonus Action. You can make this extra attack only once per turn.", gist: "extra Light attack (no Bonus Action)" },
23
+ push: { label: "Push", description: "If you hit a creature with this weapon, you can push the creature up to 10 feet straight away from yourself if it is Large or smaller.", gist: "on hit: pushed 10 ft" },
24
+ sap: { label: "Sap", description: "If you hit a creature with this weapon, that creature has Disadvantage on its next attack roll before the start of your next turn.", gist: "on hit: target Disadvantage" },
25
+ slow: { label: "Slow", description: "If you hit a creature with this weapon and deal damage, you can reduce its Speed by 10 feet until the start of your next turn. If the creature is hit more than once by weapons that have this property, the Speed reduction doesn't exceed 10 feet.", gist: "on hit: -10 ft Speed" },
26
+ topple: { label: "Topple", description: "If you hit a creature with this weapon, you can force the creature to make a Constitution saving throw (DC 8 plus the ability modifier used to make the attack roll and your Proficiency Bonus). On a failed save, the creature has the Prone condition.", gist: "on fail: Prone" },
27
+ vex: { label: "Vex", description: "If you hit a creature with this weapon and deal damage, you have Advantage on your next attack roll against that creature before the end of your next turn.", gist: "on hit: you gain Advantage next" }
28
28
  };
29
+ function masteryGist(slug) {
30
+ var _a;
31
+ return (_a = MASTERY[slug]) == null ? void 0 : _a.gist;
32
+ }
29
33
  function masteryDerived(slug, abilityMod, proficiencyBonus) {
30
34
  if (slug === "topple") return { label: "Save DC", value: 8 + proficiencyBonus + abilityMod };
31
35
  if (slug === "graze") return { label: "On miss", value: abilityMod };
@@ -451,7 +455,7 @@ function buildAttackRow(args) {
451
455
  const g = MASTERY[mSlug];
452
456
  if (g) {
453
457
  const derived = masteryDerived(mSlug, mods[ability], proficiencyBonus);
454
- row.mastery = { slug: mSlug, label: g.label, description: g.description, ...derived ? { derived } : {} };
458
+ row.mastery = { slug: mSlug, label: g.label, description: g.description, gist: masteryGist(mSlug), ...derived ? { derived } : {} };
455
459
  }
456
460
  }
457
461
  return row;
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-3DZ74AKK.js";
4
4
  import {
5
5
  choiceSchema
6
- } from "./chunk-CDW7R2QT.js";
6
+ } from "./chunk-NXSWH3AE.js";
7
7
 
8
8
  // src/background/background.schema.ts
9
9
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  bareEntitySlug
3
- } from "./chunk-TJCNX6UZ.js";
3
+ } from "./chunk-R5SQHP2X.js";
4
4
  import {
5
5
  ABILITY_KEYS
6
6
  } from "./chunk-WP2CX2JO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseBackground
3
- } from "./chunk-DRNZJNJP.js";
3
+ } from "./chunk-DZXSWSBP.js";
4
4
 
5
5
  // src/background/background.codec.ts
6
6
  import yaml from "js-yaml";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-4TIJKN6O.js";
6
6
  import {
7
7
  featureSchema
8
- } from "./chunk-DABBCYTT.js";
8
+ } from "./chunk-CZPMTQOY.js";
9
9
  import {
10
10
  resourceSchema
11
11
  } from "./chunk-PZOWBI3B.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseSubclass
3
- } from "./chunk-PMADYMUI.js";
3
+ } from "./chunk-L7E2UT5A.js";
4
4
 
5
5
  // src/subclass/subclass.codec.ts
6
6
  import yaml from "js-yaml";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  featEntitySchema
3
- } from "./chunk-BAXWWGFJ.js";
3
+ } from "./chunk-Q5K6LWBZ.js";
4
4
 
5
5
  // src/feat/feat.parser.ts
6
6
  import { parseYaml } from "@archivist-gg/core";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseRace
3
- } from "./chunk-IDTDACM6.js";
3
+ } from "./chunk-PHQRGDRQ.js";
4
4
 
5
5
  // src/race/race.codec.ts
6
6
  import yaml from "js-yaml";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  classCodec
3
- } from "../chunk-RVYYKYFL.js";
4
- import "../chunk-FUK7QSN5.js";
5
- import "../chunk-Z6GXV2GO.js";
3
+ } from "../chunk-GE4TLPWM.js";
4
+ import "../chunk-42Y5IJKT.js";
5
+ import "../chunk-TLYDBT5F.js";
6
6
  import "../chunk-4TIJKN6O.js";
7
- import "../chunk-DABBCYTT.js";
7
+ import "../chunk-CZPMTQOY.js";
8
8
  import "../chunk-WYGD2UGN.js";
9
9
  import "../chunk-PZOWBI3B.js";
10
10
  import "../chunk-3DZ74AKK.js";
11
- import "../chunk-CDW7R2QT.js";
11
+ import "../chunk-NXSWH3AE.js";
12
12
  import "../chunk-NXR3BD2V.js";
13
13
  export {
14
14
  classCodec
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  parseClass
3
- } from "../chunk-FUK7QSN5.js";
4
- import "../chunk-Z6GXV2GO.js";
3
+ } from "../chunk-42Y5IJKT.js";
4
+ import "../chunk-TLYDBT5F.js";
5
5
  import "../chunk-4TIJKN6O.js";
6
- import "../chunk-DABBCYTT.js";
6
+ import "../chunk-CZPMTQOY.js";
7
7
  import "../chunk-WYGD2UGN.js";
8
8
  import "../chunk-PZOWBI3B.js";
9
9
  import "../chunk-3DZ74AKK.js";
10
- import "../chunk-CDW7R2QT.js";
10
+ import "../chunk-NXSWH3AE.js";
11
11
  import "../chunk-NXR3BD2V.js";
12
12
  export {
13
13
  parseClass
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  classEntitySchema
3
- } from "../chunk-Z6GXV2GO.js";
3
+ } from "../chunk-TLYDBT5F.js";
4
4
  import "../chunk-4TIJKN6O.js";
5
- import "../chunk-DABBCYTT.js";
5
+ import "../chunk-CZPMTQOY.js";
6
6
  import "../chunk-WYGD2UGN.js";
7
7
  import "../chunk-PZOWBI3B.js";
8
8
  import "../chunk-3DZ74AKK.js";
9
- import "../chunk-CDW7R2QT.js";
9
+ import "../chunk-NXSWH3AE.js";
10
10
  import "../chunk-NXR3BD2V.js";
11
11
  export {
12
12
  classEntitySchema
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  featCodec
3
- } from "../chunk-FEOB24KP.js";
4
- import "../chunk-GIOH5JB5.js";
5
- import "../chunk-BAXWWGFJ.js";
6
- import "../chunk-CDW7R2QT.js";
3
+ } from "../chunk-73HOFQQ5.js";
4
+ import "../chunk-XTIQWSFM.js";
5
+ import "../chunk-Q5K6LWBZ.js";
6
+ import "../chunk-NXSWH3AE.js";
7
7
  import "../chunk-NXR3BD2V.js";
8
8
  export {
9
9
  featCodec
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  parseFeat
3
- } from "../chunk-GIOH5JB5.js";
4
- import "../chunk-BAXWWGFJ.js";
5
- import "../chunk-CDW7R2QT.js";
3
+ } from "../chunk-XTIQWSFM.js";
4
+ import "../chunk-Q5K6LWBZ.js";
5
+ import "../chunk-NXSWH3AE.js";
6
6
  import "../chunk-NXR3BD2V.js";
7
7
  export {
8
8
  parseFeat
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  featEntitySchema
3
- } from "../chunk-BAXWWGFJ.js";
4
- import "../chunk-CDW7R2QT.js";
3
+ } from "../chunk-Q5K6LWBZ.js";
4
+ import "../chunk-NXSWH3AE.js";
5
5
  import "../chunk-NXR3BD2V.js";
6
6
  export {
7
7
  featEntitySchema