From 6455376a976b26d34c0583594d88dd0bcb7263ed Mon Sep 17 00:00:00 2001 From: pyoor Date: Mon, 21 May 2018 12:17:48 -0400 Subject: [PATCH] Add utils.script.offset --- lib/utils/script.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/utils/script.js b/lib/utils/script.js index fa988f6..af7f874 100644 --- a/lib/utils/script.js +++ b/lib/utils/script.js @@ -79,6 +79,10 @@ class script extends utils { return `(${params.join(', ')})` } + static offset (s) { + return `(${s} % ${random.range(1, 3)})` + } + static randListIndex (objName) { return `${random.number()} % ${o.pick(objName)}.length` }