Fixed so rerolling damage doesn't make damageParts an object

This commit is contained in:
WBHarry 2025-08-15 21:16:44 +02:00
parent 006f9dde1f
commit 3f0457b8b9

View file

@ -164,7 +164,7 @@ export default class DamageRoll extends DHRoll {
const change = c.changes.find(ch => ch.key === 'system.bonuses.rally');
if (change) a.push({ value: c.id, label: change.value });
return a;
}, [])
}, []);
if (rallyChoices.length) {
mods.rally = {
label: 'DAGGERHEART.CLASS.Feature.rallyDice',
@ -322,11 +322,13 @@ export default class DamageRoll extends DHRoll {
[`system.damage.${damageType}`]: {
...updateMessage,
total: parsedRoll.total,
[`parts.${part}`]: {
parts: [
{
...rollPart,
total: parsedRoll.total,
dice: rerolledDice
}
]
}
});
}