1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! # NoctisRoll
//!
//! A modern, modular TRPG dice rolling system implementing the OneDice standard.
//!
//! ## Features
//!
//! - **Modular design**: Each dice type is implemented as a separate module
//! - **OneDice standard**: Full implementation of the OneDice specification
//! - **Type safety**: Strongly typed API with compile-time guarantees
//! - **Extensible**: Easy to add new dice types and operations
//! - **Performance**: Optimized for both single rolls and batch operations
//!
//! ## Quick Start
//!
//! ```rust
//! use noctisroll::prelude::*;
//!
//! // Roll 2d20 with advantage (keep highest)
//! let dice = StandardDice::new(2, 20).keep_highest(1);
//! let result = dice.roll();
//! println!("Roll: {}", result);
//!
//! // Parse and evaluate a dice expression
//! #[cfg(feature = "parser")]
//! {
//! let expr = "2d20kh1 + 5";
//! let result = noctisroll::eval(expr).unwrap();
//! println!("Result: {}", result);
//! }
//! ```
/// Re-exports for convenient usage
/// Evaluate a dice expression string
/// Roll a simple dice expression