mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
229 - Narrative Countdown Window Update (#237)
* Improved * Fixed the mode not sticking * Removed console log
This commit is contained in:
parent
ac7fb93635
commit
a79b7189b6
16 changed files with 258 additions and 187 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { DHBaseAction } from "../action/action.mjs";
|
||||
import { DHBaseAction } from '../action/action.mjs';
|
||||
|
||||
const fields = foundry.data.fields;
|
||||
|
||||
|
|
@ -42,6 +42,9 @@ export default class DHAdversaryRoll extends foundry.abstract.TypeDataModel {
|
|||
|
||||
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;
|
||||
this.currentTargets =
|
||||
this.targetSelection !== true
|
||||
? Array.from(game.user.targets).map(t => DHBaseAction.formatTarget(t))
|
||||
: this.targets;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ export default class DHDamageRoll extends foundry.abstract.TypeDataModel {
|
|||
const fields = foundry.data.fields;
|
||||
|
||||
return {
|
||||
messageType: new fields.StringField({initial: 'damage'}),
|
||||
messageType: new fields.StringField({ initial: 'damage' }),
|
||||
title: new fields.StringField(),
|
||||
roll: new fields.DataField({}),
|
||||
targets: new fields.ArrayField(
|
||||
|
|
@ -28,7 +28,7 @@ export default class DHDamageRoll extends foundry.abstract.TypeDataModel {
|
|||
action: new fields.StringField(),
|
||||
message: new fields.StringField()
|
||||
}),
|
||||
directDamage: new fields.BooleanField({initial: true})
|
||||
directDamage: new fields.BooleanField({ initial: true })
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -38,6 +38,9 @@ export default class DHDamageRoll extends foundry.abstract.TypeDataModel {
|
|||
|
||||
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;
|
||||
this.currentTargets =
|
||||
this.targetSelection !== true
|
||||
? Array.from(game.user.targets).map(t => DHBaseAction.formatTarget(t))
|
||||
: this.targets;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import DHAdversaryRoll from "./adversaryRoll.mjs";
|
||||
import DHAdversaryRoll from './adversaryRoll.mjs';
|
||||
|
||||
export default class DHDualityRoll extends DHAdversaryRoll {
|
||||
get messageTemplate() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue