summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/toy.groovy1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index 84978aa..70848fc 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -168,6 +168,7 @@ def getPunish = { loadInteger("toy.punishment") ?: 0; };
def adjustPunish = { p -> save("toy.punishment", Math.max(getPunish() + (int)p, 0)); };
def getAway = { loadString("toy.owner.away") };
def setAway = { a -> save("toy.owner.away", a) };
+def randRange = { min, max -> (int)min + getRandom((int)(1 + max - min)) }
def namedEvents;
def loadEvents = {
return (loadMap("toy.events") ?: [:]);