Support complex expressions on CoC advancement rolls. #55

Merged
projectmoon merged 2 commits from cthulhu-advancement-variables into master 2021-03-18 20:54:52 +00:00
1 changed files with 2 additions and 3 deletions
Showing only changes of commit 5a8e40181e - Show all commits

View File

@ -11,7 +11,7 @@ pub struct CthRoll(pub DiceRoll);
#[async_trait]
impl Command for CthRoll {
fn name(&self) -> &'static str {
"roll percentile pool"
"roll percentile dice"
}
async fn execute(&self, ctx: &Context<'_>) -> ExecutionResult {
@ -32,11 +32,10 @@ pub struct CthAdvanceRoll(pub AdvancementRoll);
#[async_trait]
impl Command for CthAdvanceRoll {
fn name(&self) -> &'static str {
"roll percentile pool"
"roll skill advancement dice"
}
async fn execute(&self, ctx: &Context<'_>) -> ExecutionResult {
//TODO this will be converted to a result when supporting variables.
let roll_with_ctx = AdvancementRollWithContext(&self.0, ctx);
let executed_roll = advancement_roll(&roll_with_ctx).await?;
let html = format!(