mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 07:36:26 +01:00
Fix damage save
This commit is contained in:
parent
c1eac701aa
commit
851a25aa64
1 changed files with 3 additions and 3 deletions
|
|
@ -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) {
|
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;
|
const mod = CONFIG.DH.ACTIONS.damageOnSave[message.system.onSave]?.mod ?? 1;
|
||||||
Object.entries(damages).forEach((k,v) => {
|
Object.entries(damages).forEach((k,v) => {
|
||||||
let newTotal = 0;
|
v.total = 0;
|
||||||
v.forEach(part => {
|
v.forEach(part => {
|
||||||
v.total = Math.ceil(v.total * mod);
|
part.total = Math.ceil(part.total * mod);
|
||||||
newTotal += v.total;
|
v.total += part.total;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue