Skip to content

[Feature request]: Allow math equations in keep/drop notation #317

Description

@Dark-Hobbit

Feature request and related problem

Currently, you can use math operations to determine the number of dice rolled and the size of the dice rolled. That covers most cases, but sometimes in "Roll and Keep" systems you might want to change the number of dice kept as well. As far as I can see it is not possible to do, since the keep/drop notation expects to receive a number and not the parenthesis required for such logic.

This is mostly the case when building dynamic roll commands that have base roll and keep values depending on character attribute/skill and adding situational bonuses to the kept part (for example when automating rolls on Alchemy).

Is it something that could be potentially supported in this library, or too situational in your opinion?

Suggested solution

Currently works - "(4+2)d10!!kh2"
Currently does not work but would be great if it did - "(4+2)d10!!kh(2+2)"

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions