From 851a25aa6428ba0db305c571125555e9785f1d35 Mon Sep 17 00:00:00 2001 From: Dapoolp Date: Sat, 19 Jul 2025 17:40:35 +0200 Subject: [PATCH] Fix damage save --- module/applications/ui/chatLog.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index 595b00a3..90d93e54 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -215,10 +215,10 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo if (message.system.onSave && message.system.targets.find(t => t.id === target.id)?.saved?.success === true) { const mod = CONFIG.DH.ACTIONS.damageOnSave[message.system.onSave]?.mod ?? 1; Object.entries(damages).forEach((k,v) => { - let newTotal = 0; + v.total = 0; v.forEach(part => { - v.total = Math.ceil(v.total * mod); - newTotal += v.total; + part.total = Math.ceil(part.total * mod); + v.total += part.total; }) }) }