From 0fb7252e74bd875518aa8d8537c47dd59ca8f283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eup=C3=B3lemo=20Castro?= Date: Sat, 19 Feb 2022 02:28:47 -0300 Subject: [PATCH] Revert "Issue 24" --- dice-roller.js | 6 ++---- module.json | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dice-roller.js b/dice-roller.js index 54c5dd1..aadf1e7 100644 --- a/dice-roller.js +++ b/dice-roller.js @@ -42,10 +42,8 @@ Hooks.on("renderChatMessage", async (app, html, msg) => { const die = roll.dice[0]; let bonus = 0; - const operator = roll.terms.filter(e => e.operator === "+") - const operatorIndex = roll.terms.findIndex(e => e.operator === "+") - if (operator.length > 0) { - bonus = roll.terms[operatorIndex + 1].number; + if (roll.terms.includes("+")) { + bonus = roll.terms[roll.terms.indexOf("+") + 1]; } if (pattern.test(formula)) { diff --git a/module.json b/module.json index ed95bcc..25227dc 100644 --- a/module.json +++ b/module.json @@ -4,8 +4,8 @@ "description": "Dice roller using syntax of L5R 4th Edition.", "author": "Eupolemo Castro", "version": "1.3.0", - "minimumCoreVersion": "0.8.8", - "compatibleCoreVersion": "9.249", + "minimumCoreVersion": "0.7.0", + "compatibleCoreVersion": "0.7.9", "scripts": ["./dice-roller.js"], "url": "https://github.com/eupolemo/fvtt-l5r4ed-dice-roller", "manifest": "https://github.com/eupolemo/fvtt-l5r4ed-dice-roller/raw/main/module.json",