mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 12:41:07 +01:00
.
This commit is contained in:
parent
a3ca96bee6
commit
80012b474a
11 changed files with 39 additions and 30 deletions
|
|
@ -98,7 +98,9 @@ export default class DamageField extends fields.SchemaField {
|
|||
});
|
||||
}
|
||||
|
||||
const token = game.scenes.find(x => x.active).tokens.find(x => x.id === target.id);
|
||||
const token = target.id
|
||||
? game.scenes.find(x => x.active).tokens.find(x => x.id === target.id)
|
||||
: actor.prototypeToken;
|
||||
if (config.hasHealing)
|
||||
damagePromises.push(
|
||||
actor.takeHealing(config.damage).then(updates => targetDamage.push({ token, updates }))
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export default class TargetField extends fields.SchemaField {
|
|||
let targets;
|
||||
// If the Action is configured as self-targeted, set targets as the owner. Probably better way than to fallback to getDependentTokens
|
||||
if (this.target?.type === CONFIG.DH.GENERAL.targetTypes.self.id)
|
||||
targets = [this.actor.token ?? this.actor.getDependentTokens()[0]];
|
||||
targets = [this.actor.token ?? this.actor.prototypeToken];
|
||||
else {
|
||||
targets = Array.from(game.user.targets);
|
||||
if (this.target.type !== CONFIG.DH.GENERAL.targetTypes.any.id) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue