@yipe/dice 0.2.5 → 0.2.6

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,18 @@ 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: 1,
2790
+ modifier: 0,
2791
+ rollType: "flat",
2792
+ keep: void 0,
2793
+ bestOf: 0
2794
+ },
2795
+ false
2796
+ );
2797
+ mainExpression = `${config.keep.total}${mode}${config.keep.count}(${baseDieExpression})`;
2787
2798
  } else {
2788
2799
  const isComplex = baseDie.length > `d${config.sides}`.length;
2789
2800
  const isHalflingShorthand = baseDie === "hd20";