mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
Merge branch 'feature/party-sheet' into sidebar-character-sheet-changes
This commit is contained in:
commit
bf8744a88b
7 changed files with 47 additions and 23 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue