Help Doc: ---------------------------- Key: n = number (integers only) l = list (of anything) ln = list of numbers exp = expression (i.e. any valid expression) Operators: +,-,/,* Integer math only d ex. n1dn2 = Roll a n2 sided die n1 times and sum the results. @[] ex. n@[expr] = evaluate expr n times and put the results in a list. <,> Selectors. ex. n1>ln = select the greatest n1 items from the list ln. & ex. &ln = sum the numbers in the list ln. Default order of prececence, highest to lowest: ()'s d *,/ +,- @ >,< & Examples: 3d6 ! Returns a value 3 to 18. (1d4)d20 ! Rolls a 20 sided die 1 to 4 times and sums the results. 6@[3d6] ! Returns 6 values of 3 to 18 in a list. 6>12@[3d6] ! Returns the best 6 of 12 3d6's in a list. 6@[&3>4@[(1d5)+1]] ! Equivelant to the ol' "Roll 6 stats -- 4d6, re-roll 1's, drop the lowest die." Note that n1dn2 is logically equivelant to &n1@[1dn2] ---------------------------- Sample output: ---------------------------- Command: 3d6 Value: 9 Command: 3d6 Value: 10 Command: 6@[3d6] ( 14 13 11 13 9 13) Command: 6@[3d6] ( 7 11 15 17 7 7) Command: 6@[&3>4@[(1d5)+1]] ( 14 12 15 12 10 11) Command: 6@[&3>4@[(1d5)+1]] ( 16 15 12 14 16 14) Command: 4@[6@[3d6]] ( ( 13 8 6 9 4 12) ( 13 7 9 10 11 9) ( 9 12 10 9 13 13) ( 10 8 9 7 7 12) ) Command: X = 3d6 Symbol "X" created. Value: 0 Command: 4@[X] ( 10 12 14 9) Command: X<20@[X] ( 6 7 7 7 8 9 9 10 10 10 11 11 11 12 12) Command: X<20@[X] ( 4 5 7 7) ----------------------------
In reply to Dice calcs? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |