ianfhunter / GNOLL

GNOLL is an efficient dice notation parser for multiple programming languages that supports a wide set of dice notation
https://www.ianhunter.ie/GNOLL/
GNU General Public License v3.0
40 stars 24 forks source link

Feature Request: Flipflopping #202

Closed ianfhunter closed 1 year ago

ianfhunter commented 2 years ago

Is your feature request related to a problem? Please describe.

In games like Unknown Armies, there is a concept called Flipflopping. If you are rolling a d100 and get a 18, you can swap the digits to get 81.

Describe the solution you'd like

We should allow Flipflopping to scale to other dice combinations. E.g. a 1d100 with values 162 could be flipflopped or maximized to 621.

We should also allow Flipflopping for a minimal result

considering 'fh/fl' (high/low, similar to drop/keep) as the operator (e.g. 1d100fh)

Describe alternatives you've considered

Additional context

Troll and Anydice do this with custom formulae which is not ideal for casual users.

ianfhunter commented 2 years ago

F may conflict with filter

ianfhunter commented 2 years ago

Very low level of implementation in dice rollers

ianfhunter commented 1 year ago

How does this work for values > 99 ?

ianfhunter commented 1 year ago

I think this can maybe be done via sorting #15 instead.

instead of d100 (flipflop), you can do z10;d10 sorted