mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 04:01:06 +01:00
Feature/165 action save (#231)
* Roll All Save button + Merge Attack & Roll Chat message * Fix conflicts again
This commit is contained in:
parent
b7e4169079
commit
8b834036fa
18 changed files with 369 additions and 140 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