From bd08a103535b8bb7e76a3fea7c5b25c0284149d3 Mon Sep 17 00:00:00 2001 From: raeleus Date: Thu, 26 Sep 2024 07:52:02 -0700 Subject: [PATCH] Fixed #forgetspell using case sensitive matching. --- Input.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Input.js b/Input.js index 473bbb6..93a5b5a 100644 --- a/Input.js +++ b/Input.js @@ -1465,10 +1465,10 @@ function doForgetSpell(command) { var dontWord = character.name == "You" ? "don't" : "doesn't" var tryWord = character.name == "You" ? "try" : "tries" - var found = character.spells.find((element) => element == arg0) + var found = character.spells.find(x => x.toLowerCase() == arg0.toLowerCase()) if (found == null) return `\n[${character.name} ${tryWord} to forget the spell ${arg0}, but ${character.name} ${dontWord} even know it]\n` - var index = character.spells.findIndex((element) => element.toLowerCase() == arg0.toLowerCase()) + var index = character.spells.findIndex(x => x.toLowerCase() == arg0.toLowerCase()) character.spells.splice(index, 1) return `\n[${character.name} forgot the spell ${arg0}]\n`