Skip to content

Non-left-to-right parsing of dice roll notation #85

@Vlek

Description

@Vlek

Things like 4d6K1d2 are not happening from left-to-right. Right now, this is the order that they're being handled:

❯ roll 4d6K1d2 -v
Rolled: 4d6: [6, 2, 5, 6]
Rolled: 1d2: [1]
Adding: 19 + 1 = 20
Keeping highest: 1: [6]
6

The expected order would be:
Roll 4d6
Keep the highest 1
Roll the highest 1d6 roll's worth of d2

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions