From 183e39d9ebfe6e48e5ce666dee36b5347d47f53e Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 12 Sep 2025 18:06:17 +0800 Subject: feat: add unique modifier to dice calculations and parsing --- src/parser.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/parser.rs') diff --git a/src/parser.rs b/src/parser.rs index 8f4633e..a1800a2 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -140,6 +140,9 @@ impl DiceParser { .map_err(|_| DiceError::ParseError("无效的丢弃低数值".to_string()))?; Ok(DiceModifier::DropLow(num)) } + Rule::unique => { + Ok(DiceModifier::Unique) + } _ => Err(DiceError::ParseError("未知的修饰符".to_string())), } } -- cgit v1.2.3-70-g09d2