diff options
| -rw-r--r-- | README.md | 94 | ||||
| -rw-r--r-- | diceparser.cpp | 2 | ||||
| -rw-r--r-- | result/diceresult.h | 1 |
3 files changed, 57 insertions, 40 deletions
@@ -1,9 +1,61 @@ - -[](http://www.rolisteam.org) +[](http://www.rolisteam.org) # DiceParser -Rolisteam Dice Parser +Rolisteam Dice Parser run dice commands. It is available on several platforms. +The syntax is simple and powerful. + +[Full documentation here](https://github.com/Rolisteam/DiceParser/blob/master/HelpMe.md) + + +## [Invite to Your Discord Server](https://discordapp.com/oauth2/authorize?&client_id=279722369260453888&scope=bot&permissions=0) + +[](https://discordbots.org/bot/279722369260453888) + + +## Features + +* `99.9%` uptime +* Roll any kind of dice +* Customizable prefix +* Custom alias/macro to improve game experience +* Manage colorized dice +* Many operators + +## Examples: + +### 3D100 +Roll 3 dice with 100 faces + +### 10D10e[=10]s +Roll 10 dice with 10 faces, 10 explodes, and sort the result. + +### 100291D66666666s +roll 100291 dice with 66666666666 faces and sort result + +### 15D10c[>7] +roll 15 dice with 10 faces and it counts number of dice which are above 7 + +### 1D8+2D6+7 +roll 1 die with 8 faces and add the result to 2 dice with 6 faces and add 7. + +### D25 +roll 1 die with 25 faces + +### 88-1D20 +88 minus the value of 1 die of 20 faces + +### 8+8+8 +compute: 24 + + + +### 100/28*3 +compute: 100/28 = 3 +3*3 = 9 + + +More examples at : https://github.com/Rolisteam/DiceParser/blob/master/HelpMe.md ## Grammar The grammar is something like this: @@ -50,39 +102,3 @@ Parenthese =: (expression) Count =: c Validator ``` - -## Example: - - -### 3D100 -Roll 3 dice with 100 faces - -### 10D10e[=10]s -Roll 10 dice with 10 faces, 10 explodes, and sort the result. - -### 100291D66666666s -roll 100291 dice with 66666666666 faces and sort result - -### 15D10c[>7] -roll 15 dice with 10 faces and it counts number of dice which are above 7 - -### 1D8+2D6+7 -roll 1 die with 8 faces and add the result to 2 dice with 6 faces and add 7. - -### D25 -roll 1 die with 25 faces - -### 88-1D20 -88 minus the value of 1 die of 20 faces - -### 8+8+8 -compute: 24 - - - -### 100/28*3 -compute: 100/28 = 3 -3*3 = 9 - - -More examples at : https://github.com/Rolisteam/DiceParser/blob/master/HelpMe.md diff --git a/diceparser.cpp b/diceparser.cpp index daa8d9d..3e90fe8 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -24,6 +24,7 @@ #include <QStringList> #include <QObject> #include <QFile> +#include <functional> #include "node/startingnode.h" #include "node/scalaroperatornode.h" @@ -48,7 +49,6 @@ #include "node/variablenode.h" #include "node/bind.h" - #define DEFAULT_FACES_NUMBER 10 DiceParser::DiceParser() diff --git a/result/diceresult.h b/result/diceresult.h index 8ff041f..8ea807a 100644 --- a/result/diceresult.h +++ b/result/diceresult.h @@ -22,6 +22,7 @@ #ifndef DICERESULT_H #define DICERESULT_H #include <QList> +#include <functional> #include "die.h" #include "result.h" |