m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/dice.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/dice.js')
-rw-r--r--src/dice.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dice.js b/src/dice.js
index 1587eef..cbc7325 100644
--- a/src/dice.js
+++ b/src/dice.js
@@ -41,6 +41,12 @@ const subtract = (die1, die2) => {
}
}
+const explode = (die1, die2) => {
+ return () => {
+ return die1()
+ }
+}
+
exports.pool = pool
exports.roll = roll
exports.constant = constant
@@ -48,3 +54,4 @@ exports.d = d
exports.add = add
exports.subtract = subtract
exports.negative = negative
+exports.explode = explode