diff --git a/scripts/module.js b/scripts/module.js index e8be08d..0955de3 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -183,35 +183,38 @@ Hooks.on('renderChatMessage', (message, html, data) => { // Hook into DiceSoNice to trigger effects // Hook into DiceSoNice to trigger effects Hooks.on('diceSoNiceRollStart', (messageId, context) => { - // console.log('DSN Hook Fired', messageId, context); + console.log('DSN Hook Fired', messageId, context); const roll = context.roll; if (!roll) return; if (isCriticalHit(roll)) { - // console.log('DSN: Critical Hit Detected'); + console.log('DSN: Critical Hit Detected'); const effect = game.settings.get('dh-immersive-crits', 'dsnCritEffect'); - // console.log('DSN Effect:', effect); + console.log('DSN Effect:', effect); if (effect && effect !== 'none') { // Check if roll.dice exists and has elements if (roll.dice && roll.dice.length > 0) { roll.dice.forEach(die => { if (!die.options) die.options = {}; die.options.specialEffect = effect === 'default' ? 'Stars' : capitalize(effect); - // console.log('Applied effect to die:', die); + console.log('Applied effect to die:', die); }); } else { // Determine if we need to iterate terms for Duality Rolls - // console.log('No roll.dice found. Checking terms:', roll.terms); + console.log('No roll.dice found. Checking terms:', roll.terms); if (roll.terms) { roll.terms.forEach(term => { if (term.faces) { // It's a die if (!term.options) term.options = {}; term.options.specialEffect = effect === 'default' ? 'Stars' : capitalize(effect); + console.log('Applied effect to term:', term); } }); } } } + } else { + console.log('DSN: Not a Critical Hit', roll.constructor.name, roll); } });