- Upgrade dependencies
- Port code to pest 2.4 (
prec_climberbeing deprecated)
- FIX: Panic when parsing "+ 3" .
- FIX: OOM error on too big numbers. We now limit to 5000 dices of 5000 sides. Thanks to @Monadic-Cat for setting up the fuzzy tests that discovers these. Some panics still can occurs when numbers are very big and overflow on operation but I think it's the correct behaviour.
- FIX: translation issue in CdE ill dice
- NEW: Added
RollHistory::OpenParenthesisandRollHistory::CloseParenthesisin order to keep the parenthesis of the expression on printing history.
- FIX: distinguish float from integer properly
- FIX: can put signed number in expr again
- For
cdehelpers, if the element was passed in French, the printing of the result will be in French as well
- BREAKING: remove
ova()syntax from grammar, I want to avoid cluttering grammar with multiple interpretations of the roll result. I let the user of the crate to detect an OVA roll, and use helpers::compute_ova to get the result. More interpretations to come. Moreover, helpers are not active by default. - NEW: target accepts enumeration of values to consider success:
3d6 t[2,4,6]will count even dice as success. - NEW: can make a deck of cards and draw cards from it. Feature gated under
cards.
- NEW: double target
ttoption, see @JamesLaverack's PR - Enhance tests thanks to this PR.
- FIX: Total was 0 if expression contain only one dice.
- FIX: Total was 0 if expression contain only one number.
- NEW & BREAKING: can use float constant. Ex:
D6 * 1.5. This small addition change theRollResultstructure a little bit, asRollHistory::Valuevariant now holds aValueinstead ofi64. Hence the major version bump.
- FIX: issue #2
- NEW: added
Criticto mark a dice roll as critic
- NEW: added
Roller::roll_within order to provide an externalrand::Rng(idea by rardiol) - NEW:
RollerderivesDebug
- supports for signed number after an operator:
d20 + -4is accepted.
# 2.0.0
- NEW & BREAKING: support repeat a roll x times:
(2d6 + 6) ^ 8will roll2d6 + 6eight times- to store this,
RollResulthas been refactored and break a bit of the API. To convert your code, either you were only using theimpl Displayand nothing change, but if you were calling some method onRollResultyou'll need to adapt your code:let result = Roller::new("1d6 : initiative").unwrap().roll().unwrap(); let result = result.as_single().unwrap(); // old code
- to store this,
- NEW: repeated rolls can be summed:
(2d6 + 2) ^+ 6will roll2d6 + 2six times and sum all the results. - NEW: repeated rolls can be sorted:
(2d6 + 2) ^# 6will sort the rolls - NEW: OVA roll support:
ova(12)orova(-5) - CHANGED: When specifying an explosion value, if the dice result is >= the value, it explodes. (It was exploding on exactly the value before, which made no sense)
- CHANGED: When printing SingleRollResult, "Result" was replaced by "="
- RollResult and RollHistory are
Clone(by mcpar-land)
# 1.0.0
- Add
Rollerto expose stable API for future optimization - BREAKING: Removed free function
rollandfind_first_dice, useRollerto get all the dices - BREAKING: reason starts with
:instead of! !is now an alias forie- on both exploding dice (
!ande), if number is omitted, default to dice max - remove dep to
once_cell
- Add
find_first_dice: look for the first dice of the expression and return it
- Support for Fudge/Fate dice
# 0.3.0
- Result is printed bold
- Keep operations as separator
- Keep literal value in the result display
# 0.2.0
- Error reporting
- Accept no nb dice (default to 1):
d6==1d6 - Accept uppercase
D
# 0.1.x
- First release, subsequent releases were metadata changes for crates.io