mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-14 00:28:11 +02:00
Roll All Save button + Merge Attack & Roll Chat message
This commit is contained in:
parent
19cc10a3c9
commit
9f3c587d83
18 changed files with 355 additions and 113 deletions
|
|
@ -19,6 +19,7 @@ export default class DHDamageRoll extends foundry.abstract.TypeDataModel {
|
|||
})
|
||||
})
|
||||
),
|
||||
targetSelection: new fields.BooleanField({ initial: true }),
|
||||
hasSave: new fields.BooleanField({ initial: false }),
|
||||
onSave: new fields.StringField(),
|
||||
source: new fields.SchemaField({
|
||||
|
|
@ -34,4 +35,9 @@ export default class DHDamageRoll extends foundry.abstract.TypeDataModel {
|
|||
get messageTemplate() {
|
||||
return `systems/daggerheart/templates/chat/${this.messageType}-roll.hbs`;
|
||||
}
|
||||
|
||||
prepareDerivedData() {
|
||||
this.hasHitTarget = this.targets.filter(t => t.hit === true).length > 0;
|
||||
this.currentTargets = this.targetSelection !== true ? Array.from(game.user.targets).map(t => DHBaseAction.formatTarget(t)) : this.targets;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue