chore: remove debug console logs
This commit is contained in:
parent
c7589a55ab
commit
d3e66b8846
1 changed files with 0 additions and 9 deletions
|
|
@ -129,7 +129,6 @@ function isCriticalHit(roll) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hopeTotal !== undefined && fearTotal !== undefined) {
|
if (hopeTotal !== undefined && fearTotal !== undefined) {
|
||||||
console.log('Duality Check:', hopeTotal, fearTotal);
|
|
||||||
return hopeTotal === fearTotal;
|
return hopeTotal === fearTotal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -203,38 +202,30 @@ Hooks.on('renderChatMessageHTML', (message, html, data) => {
|
||||||
// Hook into DiceSoNice to trigger effects
|
// Hook into DiceSoNice to trigger effects
|
||||||
// Hook into DiceSoNice to trigger effects
|
// Hook into DiceSoNice to trigger effects
|
||||||
Hooks.on('diceSoNiceRollStart', (messageId, context) => {
|
Hooks.on('diceSoNiceRollStart', (messageId, context) => {
|
||||||
console.log('DSN Hook Fired', messageId, context);
|
|
||||||
const roll = context.roll;
|
const roll = context.roll;
|
||||||
if (!roll) return;
|
if (!roll) return;
|
||||||
|
|
||||||
if (isCriticalHit(roll)) {
|
if (isCriticalHit(roll)) {
|
||||||
console.log('DSN: Critical Hit Detected');
|
|
||||||
const effect = game.settings.get('dh-immersive-crits', 'dsnCritEffect');
|
const effect = game.settings.get('dh-immersive-crits', 'dsnCritEffect');
|
||||||
console.log('DSN Effect:', effect);
|
|
||||||
if (effect && effect !== 'none') {
|
if (effect && effect !== 'none') {
|
||||||
// Check if roll.dice exists and has elements
|
// Check if roll.dice exists and has elements
|
||||||
if (roll.dice && roll.dice.length > 0) {
|
if (roll.dice && roll.dice.length > 0) {
|
||||||
roll.dice.forEach(die => {
|
roll.dice.forEach(die => {
|
||||||
if (!die.options) die.options = {};
|
if (!die.options) die.options = {};
|
||||||
die.options.specialEffect = effect === 'default' ? 'Stars' : capitalize(effect);
|
die.options.specialEffect = effect === 'default' ? 'Stars' : capitalize(effect);
|
||||||
console.log('Applied effect to die:', die);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Determine if we need to iterate terms for Duality Rolls
|
// Determine if we need to iterate terms for Duality Rolls
|
||||||
console.log('No roll.dice found. Checking terms:', roll.terms);
|
|
||||||
if (roll.terms) {
|
if (roll.terms) {
|
||||||
roll.terms.forEach(term => {
|
roll.terms.forEach(term => {
|
||||||
if (term.faces) { // It's a die
|
if (term.faces) { // It's a die
|
||||||
if (!term.options) term.options = {};
|
if (!term.options) term.options = {};
|
||||||
term.options.specialEffect = effect === 'default' ? 'Stars' : capitalize(effect);
|
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);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue