From 28b687062e36cda5846c9c5d69bf822ea8c2ca81 Mon Sep 17 00:00:00 2001 From: AnimiVulpis Date: Fri, 27 Oct 2017 17:41:26 +0200 Subject: [PATCH 1/3] roll: add page --- pages/common/roll.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/roll.md diff --git a/pages/common/roll.md b/pages/common/roll.md new file mode 100644 index 000000000..c2885351f --- /dev/null +++ b/pages/common/roll.md @@ -0,0 +1,27 @@ +# roll + +> Rolls a user-defined dice sequence. + +- Roll 3 6-sided dices and sums the results: + +`roll 3d` + +- Roll 1 8-sided dice, add 3 and sum the results: + +`roll d8 + 3` + +- Roll 4 6-sided dices, keep the 3 highest results and sum the results: + +`roll 4d6h3` + +- Roll 2 12-sided dices 2 times and show every roll: + +`roll --verbose 2{2d12}` + +- Roll 2 20-sided dices until the result is bigger than 10: + +`roll "2d20>10"` + +- Roll 2 5-sided dices 3 times and show the total sum: + +`roll --sum-series 3{2d5}` From dacc52d182967d01feb62b44718cfb66766b8ed0 Mon Sep 17 00:00:00 2001 From: AnimiVulpis Date: Mon, 30 Oct 2017 23:18:41 +0100 Subject: [PATCH 2/3] Incorporate change requests - Fix wrong usage of dices vs. dice - Tokenize everything --- pages/common/roll.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pages/common/roll.md b/pages/common/roll.md index c2885351f..ae44c15f2 100644 --- a/pages/common/roll.md +++ b/pages/common/roll.md @@ -2,26 +2,26 @@ > Rolls a user-defined dice sequence. -- Roll 3 6-sided dices and sums the results: +- Roll 3 6-sided dice and sums the results: -`roll 3d` +`roll {{3}}{{d}}` -- Roll 1 8-sided dice, add 3 and sum the results: +- Roll 1 8-sided die, add 3 and sum the results: -`roll d8 + 3` +`roll {{d}}{{8}} + {{3}}` -- Roll 4 6-sided dices, keep the 3 highest results and sum the results: +- Roll 4 6-sided dice, keep the 3 highest results and sum the results: -`roll 4d6h3` +`roll {{4}}{{d}}{{6}}{{h}}{{3}}` -- Roll 2 12-sided dices 2 times and show every roll: +- Roll 2 12-sided dice 2 times and show every roll: -`roll --verbose 2{2d12}` +`roll --verbose {{2}}{{{2}}{{d}}{{12}}}` -- Roll 2 20-sided dices until the result is bigger than 10: +- Roll 2 20-sided dice until the result is bigger than 10: -`roll "2d20>10"` +`roll "{{2}}{{d}}{{20}}{{>}}{{10}}"` -- Roll 2 5-sided dices 3 times and show the total sum: +- Roll 2 5-sided dice 3 times and show the total sum: -`roll --sum-series 3{2d5}` +`roll --sum-series {{3}}{{{2}}{{d}}{{5}}}` From 0e48d77af1020d2c8d02bea3080ec34f8e65c43f Mon Sep 17 00:00:00 2001 From: AnimiVulpis Date: Tue, 31 Oct 2017 22:47:37 +0100 Subject: [PATCH 3/3] Fix tokenization --- pages/common/roll.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/common/roll.md b/pages/common/roll.md index ae44c15f2..74cbb007f 100644 --- a/pages/common/roll.md +++ b/pages/common/roll.md @@ -4,24 +4,24 @@ - Roll 3 6-sided dice and sums the results: -`roll {{3}}{{d}}` +`roll {{3d}}` - Roll 1 8-sided die, add 3 and sum the results: -`roll {{d}}{{8}} + {{3}}` +`roll {{d8 + 3}}` - Roll 4 6-sided dice, keep the 3 highest results and sum the results: -`roll {{4}}{{d}}{{6}}{{h}}{{3}}` +`roll {{4d6h3}}` - Roll 2 12-sided dice 2 times and show every roll: -`roll --verbose {{2}}{{{2}}{{d}}{{12}}}` +`roll --verbose {{2{2d12}}}` - Roll 2 20-sided dice until the result is bigger than 10: -`roll "{{2}}{{d}}{{20}}{{>}}{{10}}"` +`roll "{{2d20>10}}"` - Roll 2 5-sided dice 3 times and show the total sum: -`roll --sum-series {{3}}{{{2}}{{d}}{{5}}}` +`roll --sum-series {{3{2d5}}}`