From 196ec07e7947b570c7ba48b0f5ffd42ce354229a Mon Sep 17 00:00:00 2001 From: WBHarry Date: Fri, 14 Nov 2025 21:18:31 +0100 Subject: [PATCH] Fixed so leader in group roll gains resourcse --- module/applications/ui/chatLog.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index bcd6126e..c62affeb 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -192,6 +192,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo async groupRollButton(event, message) { const path = event.currentTarget.dataset.path; + const isLeader = path === 'leader'; const { actor: actorData, trait } = foundry.utils.getProperty(message.system, path); const actor = game.actors.get(actorData._id); @@ -222,7 +223,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo hasRoll: true, skips: { createMessage: true, - resources: true + resources: !isLeader } }; const result = await actor.diceRoll({ @@ -234,6 +235,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo }); if (!result) return; + await game.system.api.fields.ActionFields.CostField.execute.call({ actor }, result); const newMessageData = foundry.utils.deepClone(message.system); foundry.utils.setProperty(newMessageData, `${path}.result`, result.roll);