#[repr(u8)]pub enum Modifier {
Min(i32),
Max(i32),
Exploding(ExplodingKind, Option<ComparePoint>),
ReRoll(bool, Option<ComparePoint>),
Unique(bool, Option<ComparePoint>),
TargetSuccess(ComparePoint),
TargetFailure(ComparePoint, ComparePoint),
CriticalSuccess(Option<ComparePoint>),
CriticalFailure(Option<ComparePoint>),
Keep(KeepKind, u32),
Drop(KeepKind, u32),
Sort(SortKind),
}
Expand description
Modifiers are special optional notations placed after a die or expression group.
Group expression can only use Keep/Drop, TargetSuccess/Failure, and Sort.
Modifiers are applied in the order of the list below even if they were written in a different order in the input.
If more than one of the same modifier appears in the input, the last modifier is the one that will be applied.
Variants§
Min(i32)
min{amount}
Update the roll value to amount
if it was below it.
Max(i32)
max{amount}
Update the roll value to amount
if it was above it.
Exploding(ExplodingKind, Option<ComparePoint>)
The roll explodes whenever the value passed the compare point or it’s the highest value on the dice if not specified.
The roll can explode more than once.
See ExplodingKind for the different variants of exploding available.
ReRoll(bool, Option<ComparePoint>)
r
or r{compare_point}
| ro
or ro{compare_point}
for reroll once
Rerolls the dice if it was the lowest number on the dice or it hit the compare point.
Unique(bool, Option<ComparePoint>)
u
or u{compare_point}
| uo
or uo{compare_point}
for reroll unique once
Rerolls the dice if the value was previously seen before.
TargetSuccess(ComparePoint)
{compare_point}
The final roll value sum will be now determined by the amount of rolls that passed the compare point, +1 for every roll.
TargetFailure(ComparePoint, ComparePoint)
{success_compare_point}f{failure_compare_point}
The final roll value sum will be now determined by the amount of rolls that passed or failed the compare points, +1 for every success roll, -1 for every fail roll.
CriticalSuccess(Option<ComparePoint>)
cs
or cs{compare_point}
Purely cosmetic, adds the **
notation if the roll was the highest value on the dice or passed the compare point.
CriticalFailure(Option<ComparePoint>)
cf
or cf{compare_point}
Purely cosmetic, adds the __
notation if the roll was the lowest value on the dice or hit the compare point.
Keep(KeepKind, u32)
k{amount}
, kh{amount}
or kl{amount}
Drops every roll except the highest or lowest {amount}
.
(Defaults to keep highest).
Drop(KeepKind, u32)
d{amount}
, dh{amount}
or dl{amount}
Drops {amount}
of lowest or highest rolls.
(Defaults to drop lowest).
Sort(SortKind)
s
, sa
or sd
Sorts the roll values in ascending or descending order.
(Defaults to sort ascending).