From f7b184d8b6523d77dea71d96f2cda5adb6e4931a Mon Sep 17 00:00:00 2001 From: sasquach45932 Date: Wed, 8 Nov 2023 21:23:13 +0100 Subject: [PATCH] Enhancement: Shadow Of The Demon Lord --- src/roller.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/roller.js b/src/roller.js index 43b8b3b..375955e 100644 --- a/src/roller.js +++ b/src/roller.js @@ -395,8 +395,7 @@ class LMRTFYRoller extends Application { const rollMode = game.settings.get("core", "rollMode"); game.settings.set("core", "rollMode", this.mode || CONST.DICE_ROLL_MODES); - if (game.combat?.combatants !== undefined) - { + if (game.combat?.combatants !== undefined) { let combatantFound for (let actor of this.actors) { combatantFound = null @@ -404,14 +403,14 @@ class LMRTFYRoller extends Application { if (combatant.actor?._id === actor._id) { combatantFound = combatant } - } + } if (combatantFound) { game.combat.rollInitiative(combatantFound._id) - } + } else { + ui.notifications.warn(game.i18n.localize("LMRTFY.DemonLordNoCombat")); + } } - } - else - { + } else { ui.notifications.warn(game.i18n.localize("LMRTFY.DemonLordNoCombat")); }