From 3b87e1d4a8f4c80a70b45e3c159dffbbc55442bb Mon Sep 17 00:00:00 2001 From: WBHarry Date: Mon, 6 Jul 2026 21:03:59 +0200 Subject: [PATCH] Added a warning notification if comboDice modifiers are used on anything but a pair of dice --- lang/en.json | 3 ++- module/dice/die/baseDie.mjs | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lang/en.json b/lang/en.json index b9a81b29..e24eef0f 100755 --- a/lang/en.json +++ b/lang/en.json @@ -3253,7 +3253,8 @@ "knowTheTide": "Know The Tide gained a token", "lackingItemTransferPermission": "User {user} lacks owner permission needed to transfer items to {target}", "noTokenTargeted": "No token is targeted", - "behaviorRegionRequiresGM": "Creating a Region with an attached Behavior requires an online GM" + "behaviorRegionRequiresGM": "Creating a Region with an attached Behavior requires an online GM", + "comboDiceOnlyTwoDiceError": "Combo dice functionality only works on a single pair of two dice" }, "Progress": { "migrationLabel": "Performing system migration. Please wait and do not close Foundry." diff --git a/module/dice/die/baseDie.mjs b/module/dice/die/baseDie.mjs index d0de4582..0798db26 100644 --- a/module/dice/die/baseDie.mjs +++ b/module/dice/die/baseDie.mjs @@ -17,7 +17,10 @@ export default class BaseDie extends foundry.dice.terms.Die { async handleComboDice(maxIncreasesDiceSize) { /* ComboDice only works with exactly two dice and both have to be the same denomination */ - if (this.number !== 2) return false; + if (this.number !== 2) { + ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.comboDiceOnlyTwoDiceError')); + return false; + } const result = await this.continueCombo(maxIncreasesDiceSize);