Fix Effect Action & Add Hope tumation settings to hook

This commit is contained in:
Dapoolp 2025-07-06 22:52:25 +02:00
parent 532c245ca3
commit 74c657992c
10 changed files with 66 additions and 78 deletions

View file

@ -138,10 +138,10 @@ export default class DHRoll extends Roll {
export const registerRollDiceHooks = () => {
Hooks.on(`${CONFIG.DH.id}.postRollDuality`, async(config, message) => {
if(config.roll.type !== 'action') return;
if(!game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation).hope || config.roll.type !== 'action' || (!config.roll.hasOwnProperty('success') && !config.targets.length)) return;
const actor = await fromUuid(config.source.actor),
rollResult = config.roll.result || config.targets.some(t => t.hit),
rollResult = config.roll.success || config.targets.some(t => t.hit),
updates = [];
let looseSpotlight = false;
if(!actor) return;