dice-roller / rpg-dice-roller

An advanced JS based dice roller that can roll various types of dice and modifiers, along with mathematical equations.
https://dice-roller.github.io/documentation
MIT License
238 stars 57 forks source link

Roll dropping/keeping with `H|L` #96

Closed GreenImp closed 4 years ago

GreenImp commented 4 years ago

Is your feature request related to a problem? Please describe. In the enhanced parser engine re-work, we have implemented roll dropping/keeping with notation like:

4d6d1  // roll 4d6 and drop the lowest roll (drop defaults to lowest)
4d6k1  // roll 4d6 and only keep the highest roll (keep defaults to highest)
4d6dh2 // roll 4d6 and drop the highest 2 rolls
4d6kl2 // roll 4d6 and only keep the lowest 2 rolls

This has replaced the old syntax of:

4d6-L // roll 4d6 and subtract the lowest roll
4d6+H // roll 4d6 and add the highest roll

This also allowed for things like this:

4d6*L // roll 4d6 and multiple the total by the lowest roll

The old syntax no longer works (As of the unreleased v4.0.0.), and there is also no way of using H|L in mathematical equations. THey can only be dropped or kept.

Describe the solution you'd like I'm not sure whether the old syntax is really that helpful, as it could be ambiguous;

(4d6*2d8)-L

Is the L the lowest of all the rolls (4d6, 2d8), or is it the lowest of the last rolls (2d8) or even the first (4d6)?

With this in mind, I'm not certain what should be done. Either we:

A benifit of having the old syntax working is that it makes it more backwards compatible. A downside is the overhead to develop it, and the possible confusion of having two different ways of dropping/keeping dice.

GreenImp commented 4 years ago

Closing this as the overhead to develop it is greater than the need for it - As far as I'm aware, no-one is missing this notation syntax.