From 4b12beea5a870ee0e0852d9c90439941ff2c74fd Mon Sep 17 00:00:00 2001 From: Jared Date: Sat, 30 Nov 2019 16:16:04 -0700 Subject: [PATCH] make usable object unique otherwise when you decrement an object on line 90, you're decrementing ALL instances of this object. --- commands/use.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/use.js b/commands/use.js index 6ed02b5..91d81e2 100644 --- a/commands/use.js +++ b/commands/use.js @@ -24,7 +24,7 @@ module.exports = { return say("You don't have anything like that."); } - const usable = item.getBehavior('usable'); + const usable = JSON.parse(JSON.stringify(item.getBehavior('usable'))); if (!usable) { return say("You can't use that."); }