@yipe/dice 0.2.5 → 0.2.7

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.
@@ -2783,7 +2783,17 @@ var RollBuilder = class _RollBuilder {
2783
2783
  case "flat":
2784
2784
  if (config.keep) {
2785
2785
  const mode = config.keep.mode === "highest" ? "kh" : "kl";
2786
- mainExpression = `${config.keep.total}${mode}${config.keep.count}(${baseDie})`;
2786
+ const baseDieExpression = this.configToSingleExpressionWithoutModifier(
2787
+ {
2788
+ ...config,
2789
+ count: config.count,
2790
+ modifier: 0,
2791
+ rollType: "flat",
2792
+ keep: void 0
2793
+ },
2794
+ false
2795
+ );
2796
+ mainExpression = `${config.keep.total}${mode}${config.keep.count}(${baseDieExpression})`;
2787
2797
  } else {
2788
2798
  const isComplex = baseDie.length > `d${config.sides}`.length;
2789
2799
  const isHalflingShorthand = baseDie === "hd20";