From f9771635344c1a7d889370c35d4c598eed05dafb Mon Sep 17 00:00:00 2001 From: WBHarry Date: Mon, 6 Jul 2026 21:00:00 +0200 Subject: [PATCH] Swapped to registering two modifiers, c for comboStrike and cc for compoundComboStrike --- module/dice/die/baseDie.mjs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/module/dice/die/baseDie.mjs b/module/dice/die/baseDie.mjs index 867ee699..d0de4582 100644 --- a/module/dice/die/baseDie.mjs +++ b/module/dice/die/baseDie.mjs @@ -3,14 +3,22 @@ import { adjustDice } from '../../helpers/utils.mjs'; export default class BaseDie extends foundry.dice.terms.Die { static MODIFIERS = { ...foundry.dice.terms.Die.MODIFIERS, + cc: 'compoundComboDice', c: 'comboDice' }; - async comboDice(modifier) { + async compoundComboDice() { + return this.handleComboDice(true); + } + + async comboDice() { + return this.handleComboDice(false); + } + + async handleComboDice(maxIncreasesDiceSize) { /* ComboDice only works with exactly two dice and both have to be the same denomination */ if (this.number !== 2) return false; - const maxIncreasesDiceSize = modifier.endsWith('1'); const result = await this.continueCombo(maxIncreasesDiceSize); /* The flow of DiceSoNice has no way of knowign that some of the results of a Die should be a different denomination @@ -56,7 +64,7 @@ export default class BaseDie extends foundry.dice.terms.Die { this.results.push({ result: newRoll.total, denomination: denomination, active: true }); this.number += 1; - return this.continueCombo(); + return this.continueCombo(maxIncreasesDiceSize); } /** @override */