Added visible modifier to GroupRoll leader result

This commit is contained in:
WBHarry 2025-11-08 21:58:29 +01:00
parent c3bd9f15a5
commit 56d0776811
3 changed files with 18 additions and 7 deletions

View file

@ -9,6 +9,14 @@ export default class DHGroupRoll extends foundry.abstract.TypeDataModel {
members: new fields.ArrayField(new fields.EmbeddedDataField(GroupRollMemberField))
};
}
get totalModifier() {
return this.members.reduce((acc, m) => {
if (m.manualSuccess === null) return acc;
return acc + (m.manualSuccess ? 1 : -1);
}, 0);
}
}
class GroupRollMemberField extends foundry.abstract.DataModel {